Curved Topaz Boa
Medium
Since the protocol will support multiple chains having multiple stablecoins, it it possible for the stable coin to have decimals > 18. The Axion protocol will not support such tokens.
In all the below mentioned methods it is assumed that the boost token will always have >= 18 decimals. I'm mentioning all those instances below:
https://github.com/sherlock-audit/2024-10-axion/blob/main/liquidity-amo/contracts/MasterAMO.sol#L332C5-L334C61
https://github.com/sherlock-audit/2024-10-axion/blob/main/liquidity-amo/contracts/MasterAMO.sol#L336C5-L338C6
https://github.com/sherlock-audit/2024-10-axion/blob/main/liquidity-amo/contracts/SolidlyV3AMO.sol#L343C5-L355C6
No response
No response
No response
The protocol won't be able to support such tokens where the decimals are >18.
No response
Adding the below check will be enough.
function toUsdAmount(uint256 boostAmount) internal view returns (uint256) {
if(boostDecimals > usdDecimals) {
return boostAmount / 10 ** (boostDecimals - usdDecimals);
} else {
return boostAmount / 10 ** (usdDecimals - boostDecimals);
}
}