Closed code423n4 closed 1 year ago
bytes032 marked the issue as low quality report
LQ because of front-running on Arb
GalloDaSballo marked the issue as unsatisfactory: Insufficient proof
OTM -> Cannot redeem ITM -> Redeem is on purpose
GalloDaSballo marked the issue as duplicate of #1584
GalloDaSballo marked the issue as satisfactory
Lines of code
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/perp-vault/PerpetualAtlanticVaultLP.sol#L145-L175
Vulnerability details
PerpetualAtlanticVaultLP
holders receives premium/funding for their deposited WETH, which are used to writePerpetualAtlanticVault
put options.However, they are able to redeem their WETH anytime as long as there are available WETH in
PerpetualAtlanticVaultLP
. As the losses from the options are deducted fromPerpetualAtlanticVaultLP
viasettle()
,PerpetualAtlanticVaultLP
holders can evade the loss and redeem their WETH by frontrunningsettle()
operation. They can then backrunsettle()
to re-deposit the redeemed WETH at a lower share price.Even though, Arbitrum does not have a mempool at the moment, there could possibly be MEV opportunities in the future when they decentralize the sequencer. And this issue is also applicable if the project intends to expand to other chains or make it omnichain.
Impact
The issue can allow
PerpetualAtlanticVaultLP
holders to arbitrage by evading options while receiving premium/funding, causing the other holders to inccur higher losses.Proof of Concept
Imagine the following scenario,
PerpetualAtlanticVaultLP
holder has deposited WETH inPerpetualAtlanticVaultLP
and receives premium/funding for them.settle()
transaction and proceed to frontrun them by callingredeem()
to evade the option loss and withdraws her WETH & rDPX.settle()
transactions withdeposit()
, to deposit the WETH & rDPX at a lower share price and continue to receive premium/funding for them.Recommended Mitigation Steps
Add in a time lock on
PerpetualAtlanticVaultLP
redemption, to allow holders to request redemption and only allow them to retrieve the WETH & rDPX after a certain period of time. Note that holders should not receive fundings upon redemption request.Assessed type
MEV