DeFiHardhat
35,000 USDC
View results
Submission Details
Severity: low
Invalid

`UnripeFacet.addMigratedUnderlying()` wouldn't work with FOT tokens.

Summary

UnripeFacet.addMigratedUnderlying() wouldn't work with FOT tokens.

Vulnerability Details

addMigratedUnderlying() increases the underlying by amount after the transfer and the underlying tracking might be broken if unripeToken is a FOT token.

function addMigratedUnderlying(
address unripeToken,
uint256 amount
) external payable nonReentrant {
LibDiamond.enforceIsContractOwner();
IERC20(s.u[unripeToken].underlyingToken).safeTransferFrom(
msg.sender,
address(this),
amount
);
LibUnripe.incrementUnderlying(unripeToken, amount);
}

Impact

UnripeFacet would be broken with FOT unripeToken.

Tools Used

Manual Review

Recommendations

Underlying balances should be tracked using pre/post balances.

Updates

Lead Judging Commences

giovannidisiena Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Fee-on-transfer/rebase tokens

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.