-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
settle()
does not allow forfeiting of put options, which prevent release of locked WETH when required
#1479
Comments
bytes032 marked the issue as sufficient quality report |
bytes032 marked the issue as primary issue |
psytama marked the issue as disagree with severity |
There is no exploit or loss of funds. |
GalloDaSballo marked the issue as unsatisfactory: |
GalloDaSballo removed the grade |
GalloDaSballo changed the severity to QA (Quality Assurance) |
Downgrading to QA for Documentation |
Hi @GalloDaSballo , this issue has the same root cause as #1956, as it is referring to the inability to settle OTM options. I use the term "forfeit options" as it is stated the docs under Atlantic Perpetual PUTS Options https://dopex.notion.site/rDPX-V2-RI-b45b5b402af54bcab758d62fb7c69cb4. |
This previously downgraded issue has been upgraded by GalloDaSballo |
Agree |
GalloDaSballo marked the issue as duplicate of #1956 |
GalloDaSballo marked the issue as satisfactory |
Lines of code
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/perp-vault/PerpetualAtlanticVault.sol#L315-L333
Vulnerability details
settle()
is used byRdpxV2Core
admin to closePerpetualAtlanticVault
put options and realize the profits when they are ITM.However, it does not allow forfeiting of put options, which means there is no mechanism to unlock the associated locked WETH unless they are ITM.
There are scenarios where such a function is required, such as during an emergency or migration (transferring to a new vault version and deprecating the existing vault). In these cases, there is no mechanism to unlock the WETH associated with the OTM put options. Furthermore, in these situation, funding payment for the OTM options will likely be paused as well.
Impact
Without a mechanism to forfeit put options, the associated locked WETH will be stuck in
PerpetualAtlanticVaultLP
without any mechanism to release them.Proof of Concept
scenario 1 - migration
Scenario 2 - unpausing after extended pause due to emergency
calculateFunding()
andprovideFunding()
for epoch N+1. That means there are no funding payment for Epoch N+1.settle()
and realize the profits from the active options.Recommended Mitigation Steps
Add the ability for
settle()
to forfeit put options.Assessed type
Other
The text was updated successfully, but these errors were encountered: