Skip to content
Business logic Audit finding Intermediate

Incompatibility With Rebasing/Deflationary/Inflationary tokens

The strategy contracts do not account for tokens whose balances change during transfers or over time, such as rebasing, deflationary, or inflationary tokens. This could lead to a loss of funds because the contract's internal accounting may not match the actual token balance.

defsec Follow

Originally disclosed on Code4rena

Submitted by defsec

The Strategy 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

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
  • Consider to check before/after balance on the vault.

naps62 (Sandclock) disputed:

we did not intend to support those currencies in the first place

dmvt (judge) commented:

As with issues #55 and #164, this oversight can cause a loss of funds and therefor constitutes a medium risk. Simply saying you don’t support something does not mean that thing doesn’t exist or won’t cause a vulnerability in the future.

The original report as published on Code4rena, by defsec. 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 contract does not verify the actual token balance change after transfers, so it cannot detect fees or rebasing adjustments.

Impact

This oversight could cause a loss of funds, as the judge noted, even though the project said it did not intend to support such tokens.

What the attacker needed

Use of a rebasing or fee-on-transfer token

The fix

The contracts should check the vault balance before and after transfers and account for any rebasing, inflation, or deflation before accepting user-supplied tokens.

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 wallet's balance: deflationary tokens take a fee on each transfer, so the receiver gets less than sent; rebasing tokens adjust balances periodically. If a contract assumes the amount sent equals the amount received, its records become wrong and funds can be lost.

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 defsec

View all

16 more disclosed reports, best first.

More from Sandclock 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.