Open sherlock-admin opened 2 years ago
Input validation is not within the scope of the audit. We expect to use other resources to ensure that users are executing the redemptions properly outside of the smart contract.
Duplicate of #239
Not a duplicate of #239 but of #81
Jeiwan
high
User can accidentally burn their iPT tokens during redemption
Summary
User can accidentally burn their iPT tokens during redemption
Vulnerability Detail
The
redeem
function that redeems iPT tokens burns iPT tokens even when theholdings
mapping is empty and the redeemed amount is 0 (Redeemer.sol#L403-L434).Impact
A user can accidentally call the
redeem
function after maturity but before the otherredeem
function is called (the one that burns external PT tokens–they have identical names). User's iPT tokens will be burned and no underlying tokens will be sent in exchange.Code Snippet
Redeemer.sol#L403:
Tool used
Manual Review
Recommendation
Consider disallowing calling the second
redeem
function (the one that redeems iPT tokens) before the firstredeem
function (the one that redeems external PT tokens) is called.Duplicate of #81