sherlock-audit / 2022-10-illuminate-judging

3 stars 0 forks source link

__141345__ - Slippage control should use `shares` rather than `assets` #202

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

141345

medium

Slippage control should use shares rather than assets

Summary

In mint(), the slippage control parameter is using the underlying assets, but it should use the PT token shares.

Vulnerability Detail

When sellUnderlying(), the token received is the PT token, the units to calculate the slippage should be the shares of PT token, rather than the underlying.

Impact

Code Snippet

https://github.com/sherlock-audit/2022-10-illuminate/blob/main/src/tokens/ERC5095.sol#L194-L199

Tool used

Manual Review

Recommendation

Use shares rather than assets.

Duplicate of #225

141345 commented 1 year ago

Escalate for 21 USDC

This is a duplicate of https://github.com/sherlock-audit/2022-10-illuminate-judging/issues/31

sherlock-admin commented 1 year ago

Escalate for 21 USDC

This is a duplicate of https://github.com/sherlock-audit/2022-10-illuminate-judging/issues/31

You've created a valid escalation for 21 USDC!

To remove the escalation from consideration: Delete your comment. To change the amount you've staked on this escalation: Edit your comment (do not create a new comment).

You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.