Skip to content
Business logic Audit finding Intermediate

Incompatibility With Rebasing/Deflationary/Inflationary token

The contracts do not account for tokens whose balances change during transfers or over time, such as rebasing, deflationary, or inflationary tokens. An attacker could exploit this by using such a token to cause incorrect accounting, potentially leading to loss of funds or other issues.

Jujic Follow

Originally disclosed on Code4rena

Submitted by Jujic, also found by cmichel, defsec, hagrid, hickuphh3, IllIllI, minhquanym, Ruhum, and shenwilly

The scope contracts do not appear to support rebasing/deflationary/inflationary tokens whose balance changes during transfers or over time. The necessary checks include at least verifying the amount of tokens transferred to contracts before and after the actual transfer to infer any fees/interest.

Proof of Concept

TokenManager.sol

Recommended Mitigation Steps

Make sure token vault accounts for any rebasing/inflation/deflation. Add support in contracts for such tokens before accepting user-supplied tokens.

ankurdubey521 (Biconomy) confirmed

pauliax (judge) commented:

Grouping all the issues related to the incompatibility with weird ERC20s together and making this a primary issue because it is the most generic.


The original report as published on Code4rena, by Jujic. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the contracts do not verify the actual amount of tokens received after a transfer, so they fail to account for fees or balance changes.

Impact

This could lead to incorrect accounting and potential loss of funds for users or the protocol.

What the attacker needed

Use of a rebasing/deflationary/inflationary token

The fix

The contracts should be updated to check the actual token balance before and after transfers to account for any fees or rebasing, or such tokens should be disallowed.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Some tokens automatically change a user's balance over time or take a fee on each transfer. The contracts here assume the balance stays the same, so they can get confused about how much money is actually there. This could let someone trick the system into thinking they have more or less than they really do.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by Jujic

View all

4 more disclosed reports, best first.

More from Biconomy - Smart Contract Wallet contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.