First Flight #18: T-Swap

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

t-swap does not support rebase token

Summary

t-swap does not support rebase token

Vulnerability Details

In T-Swap, we will use the balanceOf() to calculate the share, or swap amount. The vulnerability is that the balanceOf() for rebase token can change without desposit/withdraw/swap operations.
The core Invariant x * y = k will be broken.

Impact

The core Invariant x * y = k will be broken. k may increase or decrease without any operation in t-swap. This will cause all operations into a mess.
In readme, Our system works because the ratio of Token A & WETH will always stay the same.
Actually, this assumption will be broken for rebase token

Tools Used

Manual

Recommendations

Add one blacklist to the rebase token.

Updates

Appeal created

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Rebase

Support

FAQs

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