Swan will receives less fee due to rounding
In Solidity, the expression uint256 buyerFee = (asset.price * asset.royaltyFee) / 100; calculates a percentage fee but is subject to "rounding down" errors due to integer division. Since Solidity's uint256 type only supports whole numbers, any fraction in the division is truncated, potentially making the calculated buyerFee slightly less than the true intended percentage.
For example, if asset.price * asset.royaltyFee equals 999, dividing by 100 would result in 9 instead of 9.99, as the decimal part is discarded. This can cause minor discrepancies that accumulate over multiple transactions, leading to slightly inaccurate fee calculations.
loss of funds
Manual Review
Modify the transferRoyalties function to round up the required fee amount
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.