Open code423n4 opened 1 year ago
bytes032 marked the issue as sufficient quality report
psytama marked the issue as disagree with severity
This should be a medium severity as if such a case arises there are ways we can compensate the users.
GalloDaSballo changed the severity to 2 (Med Risk)
The argument here is that when the contracts are paused yield would be lost, I think this has historically been awarded as Medium
GalloDaSballo marked the issue as duplicate of #1496
GalloDaSballo changed the severity to QA (Quality Assurance)
Lines of code
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/perp-vault/PerpetualAtlanticVault.sol#L408 https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/core/RdpxV2Core.sol#L795
Vulnerability details
CalculateFunding()
andprovideFunding()
are used to calculate the funding rate and transfer the funding payments toPerpetualAtlanticVault
for rewarding thePerpetualAtlanticVaultLP
option writers.However, they are disabled when
RdpxV2Core
ispaused()
, which causes the option writers to be shortchanged as they are not able to fully redeem their LP shares if there are still OTM options.There could be legitimate reasons where the protocol is paused for a short period of time, and the protocol still wish to keep the options active (for hedging). In that case, the protocol should still pay the funding to the option writers.
Impact
PerpetualAtlanticVaultLP
option writers will lose funding payments when paused despite having their WETH locked inPerpetualAtlanticVaultLP
.Proof of Concept
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/perp-vault/PerpetualAtlanticVault.sol#L405-L408
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/core/RdpxV2Core.sol#L795
Recommended Mitigation Steps
Remove
_whenNotPaused()
fromCalculateFunding()
andprovideFunding()
.Assessed type
Other