Platform: Code4rena
Start Date: 08/12/2021
Pot Size: $30,000 ETH
Total HM: 12
Participants: 26
Period: 3 days
Judge: leastwood
Total Solo HM: 9
Id: 65
League: ETH
Rank: 9/26
Findings: 1
Award: $690.85
🌟 Selected for report: 0
🚀 Solo Findings: 0
690.8489 USDC - $690.85
0v3rf10w
divide-before-multiply
can lead to miscalculation of fees in below function
Vulnerable Function : Basket.handleFees(uint256) (Basket.sol#133-153) :
uint256 feePct = timeDiff * licenseFee / ONE_YEAR; uint256 fee = startSupply * feePct / (BASE - feePct); _mint(publisher, fee * (BASE - factory.ownerSplit()) / BASE); _mint(Ownable(address(factory)).owner(), fee * factory.ownerSplit() / BASE);
Manual and Slither
Consider ordering multiplication before division to prevent miscalculation
#0 - 0xleastwood
2022-03-27T03:06:21Z
Duplicate of #60