Platform: Code4rena
Start Date: 16/11/2021
Pot Size: $30,000 USDC
Total HM: 3
Participants: 18
Period: 3 days
Judge: leastwood
Total Solo HM: 2
Id: 56
League: ETH
Rank: 14/18
Findings: 1
Award: $57.06
🌟 Selected for report: 0
🚀 Solo Findings: 0
hubble
Systems like Index servers depend on events to maintain its state. Missing or overlapping events can cause such systems to have wrong state.
File: contracts/v3/alchemix/Alchemist.sol 292 function setBorrowFee(uint256 _borrowFee) external onlyGov { // Check that the borrow fee is within the acceptable range. Setting the borrow fee greater than 100% could // potentially break internal logic when calculating the borrow fee. require(_borrowFee <= PERCENT_RESOLUTION, 'Alchemist: borrow fee above maximum.');
... borrowFee = _borrowFee;
299 emit HarvestFeeUpdated(_borrowFee); } Bug at line 299.
Manual review
Add a new event at the top event BorrowFeeUpdated(uint256 fee);
Update function setBorrowFee at line 299 292 function setBorrowFee(uint256 _borrowFee) external onlyGov { // Check that the borrow fee is within the acceptable range. Setting the borrow fee greater than 100% could // potentially break internal logic when calculating the borrow fee. require(_borrowFee <= PERCENT_RESOLUTION, 'Alchemist: borrow fee above maximum.');
... borrowFee = _borrowFee;
299 emit BorrowFeeUpdated(_borrowFee); }
#0 - Xuefeng-Zhu
2021-12-09T06:10:20Z