First Flight #18: T-Swap

First Flight #18
Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

weird-ERC20, ERC777 can break protocol invariant

Summary

  1. ERC777 will have hooks that execute before and after a transaction. This might cause some intended behavior to happen.

  2. weird-erc20 - for eg., USDT is weird during transfers, not providing a return value for transaction status.

  3. USDC is centralized and is a proxy contract, so there can be possibility of Circle saying they charge a fee of x% on transfers, which will break the protocol invariant.

Impact

breaks protocol invariant, hence protocol becomes unusable.

Recommendations

  1. restricting weird erc20's thats potential risk to the protocol or only allow allowlisted erc20's to be traded.

  2. Follow FREI-PI/CEI design pattern to revert any transaction that is breaking the invariant to always maintain the property.

  3. use at your own risk.

Updates

Appeal created

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

ERC777

Support

FAQs

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