First Flight #18: T-Swap

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

Rebasing Tokens Can Cause Unexpected Slippage Due to Rebase Events

[L-05] Rebasing Tokens Can Cause Unexpected Slippage Due to Rebase Events

Description:
Rebasing tokens, which adjust their supply dynamically based on predefined criteria such as price fluctuations or schedules, pose unique challenges when integrated with Automated Market Makers (AMMs) that rely on the y*x=k invariant. This invariant, central to AMMs like Uniswap, assumes a constant product across all trades. However, rebasing operations can disrupt this equilibrium by altering token balances without direct user action, potentially causing unexpected slippage and impacting liquidity providers (LPs).

  • The essence of AMMs like Uniswap is maintaining a constant product (k) throughout transactions. Rebasing alters token balances, which, unless accounted for explicitly by the protocol, can disrupt the k value.

  • Users may encounter unforeseen slippage around rebase events. For instance, a rebase increasing token supply could decrease its relative price, affecting swap outcomes.

  • LPs face impermanent loss risks, potentially exacerbated by rebases. A rebase altering pool token ratios can lead to market price deviations, increasing potential losses for LPs.

Impact:
The integration of rebasing tokens within AMMs can lead to significant discrepancies between expected and actual trade outcomes, primarily due to unexpected slippage caused by rebases. This can erode trust in the platform and deter participation, especially from LPs wary of heightened impermanent loss risks.

Proof of Concept:
Consider an AMM pool with rebasing Token A and stablecoin B.
If Token A undergoes a rebase that increases its supply, its price relative to B decreases.
A user attempting a swap shortly after the rebase might receive significantly fewer tokens than anticipated based on pre-rebase prices, illustrating unexpected slippage.

Recommended Mitigation:

To mitigate these challenges, consider the following approaches:

  1. Custom AMM Logic: Develop custom logic within the AMM to account for rebases explicitly. This could involve adjusting the invariant formula or implementing mechanisms that protect users and LPs from adverse effects of rebases.

  2. Rebase Handling Mechanisms: Introduce mechanisms that adjust pool balances or LP shares post-rebase to maintain the integrity of the market mechanism and reduce potential losses for LPs.

  3. User Education: Clearly communicate the implications of rebasing tokens within AMMs, including potential impacts on trade outcomes and LP risks. Transparency helps manage expectations and fosters informed decision-making. or completly stop usage of rebasing tokens,

By addressing these challenges proactively, platforms can better integrate rebasing tokens into their ecosystems, ensuring fairer outcomes for all participants and maintaining the robustness of their AMM mechanisms.

Updates

Appeal created

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Rebase

Support

FAQs

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