Underlying With Non-Standard Decimals Not Supported
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
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
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.
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.