Skip to content
Business logic Audit finding Intermediate

dust amounts will be removed in OFT tokens

When the protocol requests a cross-chain transfer of rsETH to cover a withdrawal, the OFT standard strips decimal precision that cannot be represented in the shared system, so the amount actually received is slightly less than requested. This can leave the treasury short of the amount needed to complete the withdrawal.

pashap9990 Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2024-11-autonomint-judging/issues/786

Found by

pashap9990

Root Cause

dust amounts will be removed in OFT tokens https://github.com/sherlock-audit/2024-11-autonomint/blob/main/Blockchain/Blockchian/contracts/lib/CDSLib.sol#L779

PoC

https://docs.layerzero.network/v2/developers/evm/oft/quickstart#token-transfer-precision

The OFT Standard also handles differences in decimal precision before every cross-chain transfer by "cleaning" the amount from any decimal precision that cannot be represented in the shared system. The OFT Standard defines these small token transfer amounts as "dust".

when CDS depositors want to withdraw their assets from CDS contract also they get their share from liquidations amounts and if current chain dosen't have enough liquidity to send to user the protocol get need amount from other chain and let's assume needed amount is 1234567890123456789 rsETH and CDS::withdraw send message to other chain for getting need amount but because of remove dust amount 1234567000000000000 rsETH received from other chains and this causes treasury doesn't have enough rsETH to cover withdraw transaction

Impact

Breaks core contract functionality

Mitigation

consider to remove dust amount before send message to other chains

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

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

Impact

The treasury may not hold enough rsETH to cover the withdrawal, which breaks core contract functionality.

What the attacker needed

Cross-chain OFT token transfer; withdrawal needs liquidity from another chain

The fix

The protocol should remove the dust amount itself before sending the cross-chain message, so the requested and received amounts match.

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.

Tokens on different blockchains can support different numbers of decimal places. When a token is moved between chains, the transfer system rounds the amount down to what both chains can represent, and the tiny leftover is called 'dust'. Here the protocol asks for an exact amount but receives a slightly smaller one, so it may not have enough to pay the user.

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 pashap9990

View all

12 more disclosed reports, best first.

More from Autonomint Colored Dollar V1

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.