Summary:
The calculation in InheritanceManager::buyOutEstateNFT may suffer from precision loss, particularly when dealing with ERC20 tokens with small decimal values.
Vulnerability Details:
Using integer division in the expression
uint256 finalAmount = (value / divisor) * multiplier;
can lead to rounding errors because Solidity rounds down on division.
Impact:
Low – Results in minor discrepancies that could be critical when dealing with precise financial calculations.
Tools Used:
slither, aderyn, foundry
Recommendations:
Either restrict the asset types to those with appropriate decimal precision, introduce precision values or adjust the calculation method to maintain precision.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.