-
Notifications
You must be signed in to change notification settings - Fork 0
IllIllI - Sense PT redemptions do not allow for known loss scenarios #111
Comments
I agree with the stated problem from this report, the only thing I would change about the Recommendation is that we can check is if the Lender contract has approved the periphery. |
Hah i find this one kinda funny since another of your tickets recommended doing the opposite and ensuring yield can never be negative. Buuut i would clarify here that were are not discussing the stETH <-> ETH conversion rates but strictly the actual stETH yields. So yes, they can be negative should slashing exceed yields, but Lido has historically been nowhere close to this outside of tiny (~1 minutes?) periods. (Even then i am unsure if lido has been slashed yet / I might be confusing them with another staking service) Given we have terms of 3+ months, it is extremely unrealistic for this to ever have any impact. So I would vaguely accept the issue (to align with my report on the other negative yield ticket), and then definitely downgrade this to medium at most, perhaps low. |
Escalate for 1 USDC Reminder @Evert0x |
You've created a valid escalation for 1 USDC! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
Escalate for 40 USDC |
You've created a valid escalation for 40 USDC! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
Escalation accepted |
This issue's escalations have been accepted! Contestants' payouts and scores will be updated according to the changes made on this issue. |
IllIllI
high
Sense PT redemptions do not allow for known loss scenarios
Summary
Sense PT redemptions do not allow for known loss scenarios, which will lead to principal losses
Vulnerability Detail
The Sense PT redemption code in the
Redeemer
expects any losses during redemption to be due to a malicious adapter, and requires that there be no losses. However, there are legitimate reasons for there to be losses which aren't accounted for, which will cause the PTs to be unredeemable. The Lido FAQ page lists two such reasons:https://help.lido.fi/en/articles/5230603-what-are-the-risks-of-staking-with-lido
If Lido is slashed, or there are withdrawal restrictions, the Sense series sponsor will be forced to settle the series, regardless of the exchange rate (or miss out on their rewards). The Sense
Divider
contract anticipates and properly handles these losses, but the Illuminate code does not.Lido is just one example of a Sense token that exists in the Illuminate code base - there may be others added in the future which also require there to be allowances for losses.
Impact
Permanent freezing of funds
There may be a malicious series sponsor that purposely triggers a loss, either by DOSing Lido validators, or by withdrawing enough to trigger withdrawal restrictions. In such a case, the exchange rate stored by Sense during the settlement will lead to losses, and users that hold Illumimate PTs (not just the users that minted Illuminate PTs with Sense PTs), will lose their principal, because Illuminate PT redemptions are an a share-of-underlying basis, not on the basis of the originally-provided token.
While the Illuminate project does have an emergency
withdraw()
function that would allow an admin to rescue the funds and manually distribute them, this would not be trustless and defeats the purpose of having a smart contract.Code Snippet
The Sense adapter specifically used in the Illuminate tests is the one that corresponds to wstETH:
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/test/fork/Contracts.sol#L36-L39
The code for the redemption of the Sense PTs assumes that one PT equals at least one underlying, which may not be the case:
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Redeemer.sol#L360-L398
Redemptions of Illuminate PTs for underlyings is based on shares of each Illuminate PT's
totalSupply()
of the available underlying, not the expect underlying total:https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Redeemer.sol#L422
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Redeemer.sol#L464
https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/Redeemer.sol#L517
Tool used
Manual Review
Recommendation
Allow losses during redemption if Sense's
Periphery.verified()
returnstrue
The text was updated successfully, but these errors were encountered: