You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.
sherlock-admin opened this issue
Mar 28, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
If the TVL of the collateral vault has been 0 for that epoch, no one will be able to claim the funds.
The odds of that happening are low, since such an epoch could be resolved with triggerNullEpoch. However, the function triggerDepeg does account for it and forbids being called if any of the vaults has TVL 0, so triggerEndEpoch should too:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
minhtrng
medium
Funds from premium vault can get stuck after sending to collateral vault
Summary
When an epoch ends without depeg and collateral vault has 0 TVL, funds from premium vault will get stuck in the collateral vault.
Vulnerability Detail
When an epoch ends without depeg, the premiums from premium vault will be send to the collateral vault and the claim TVL will be set accordingly:
If the TVL of the collateral vault has been 0 for that epoch, no one will be able to claim the funds.
The odds of that happening are low, since such an epoch could be resolved with
triggerNullEpoch
. However, the functiontriggerDepeg
does account for it and forbids being called if any of the vaults has TVL 0, sotriggerEndEpoch
should too:Impact
Lock of funds
Code Snippet
https://github.com/sherlock-audit/2023-03-Y2K/blob/ae7f210d8fbf21b9abf09ef30edfa548f7ae1aef/Earthquake/src/v2/Controllers/ControllerPeggedAssetV2.sol#L183-L192
Tool used
Manual Review
Recommendation
Perform the same check (shown above) for
triggerEndEpoch
Duplicate of #108
The text was updated successfully, but these errors were encountered: