Closed c4-bot-8 closed 3 months ago
hansfriese marked the issue as satisfactory
hansfriese marked the issue as selected for report
hansfriese marked the issue as not selected for report
hansfriese marked the issue as duplicate of #238
hansfriese marked the issue as duplicate of #238
Lines of code
https://github.com/code-423n4/2024-06-size/blob/8850e25fb088898e9cf86f9be1c401ad155bea86/src/libraries/Multicall.sol#L29 https://github.com/code-423n4/2024-06-size/blob/8850e25fb088898e9cf86f9be1c401ad155bea86/src/libraries/Multicall.sol#L37
Vulnerability details
Impact
Users can mint more
borrowAToken
thanborrowATokenCap
using a multicall.Proof of Concept
During a multicall, it validates the
borrowATokenCap
requirement after executing functions.But it uses
borrowAToken.balanceOf(address(this))
instead ofborrowAToken.totalSupply()
and it won't work as expected becauseborrowAToken.balanceOf(address(this)) < borrowAToken.totalSupply()
.As a result,
validateBorrowATokenIncreaseLteDebtTokenDecrease()
would pass when it should revert with lowerborrowATokenSupplyBefore/borrowATokenSupplyAfter
amounts.Tools Used
Manual Review
Recommended Mitigation Steps
It should validate using
borrowAToken.totalSupply()
.Assessed type
Invalid Validation