Submitted by 0xWagmi, also found by Matin, vangrim, catellatech, MohammedRizwan, Hama, 836541, okolicodes, Inspecktor, erebus, GangsOfBrahmin, Bauchibred, lsaudit, ravikiranweb3, zaevlad, tapir, niki, and IceBear
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/perp-vault/PerpetualAtlanticVaultLP.sol#L118 
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/perp-vault/PerpetualAtlanticVaultLP.sol#L283
A  malicious early depositor can profit from future depositors deposits. While the late depositors will lose part of their funds to the attacker.
The first depositor can buy a small number of shares and next he should wait until   owner  settle an options through RdpxCore so it will result in calling addRDPX in PerpetualAtlanticVaultLP by transfering rdpxTokens into it and updating _rdpxCollateral, as rdpx Token has 18 decimals https://arbiscan.io/token/0x32eb7902d4134bf98a28b963d26de779af92a212 even small amount of rdpx token result in giving a higher totalVaultCollateral() so then it calculates assets.mulDivDown(supply,totalVaultCollateral); , then it  will make shares very expensive for the next depositors,
copy this test into /tests/perp-vault/Integration.t.sol
forge test --match-path ./tests/perp-vault/Integration.t.sol -vvvv
 Foundry
Consider requiring a minimal amount of share tokens to be minted for the first minter
witherblock (Dopex) acknowledged and commented:
Alex the Entreprenerd (Judge) commented:
