Skip to content
Business logic Audit finding Intermediate

Underlying With Non-Standard Decimals Not Supported

0x0 Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2022-10-astaria-judging/issues/33

Found by

0x0

Summary

Arithmetic operations are performed with the assumption that the token always has 18 decimals.

Vulnerability Detail

LiquidationAccountant.claim

Arithmetic operations assume the token has 18 decimals. Not all tokens use 18 decimals, such as Tether.

Impact

  • The addition of underlying capital that does not use 18 decimals will not be possible.

Code Snippet

Solidity
uint256 transferAmount = withdrawRatio.mulDivDown(balance, 1e18);

Tool used

Manual Review

Recommendation

  • Consider whether the addition of capital that does not use 18 decimals is desirable in the future. If it is, refactor contracts to support tokens with non-standard decimals.

The original report as published on Sherlock, by 0x0. 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.

What is known

A medium-severity business logic bug in Astaria. Sherlock made it public on 3 November 2022. Found in the 8 audit contest (finding M-21).

About Business logic

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

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

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 from Astaria

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.