Smart contract unable to operate due to lack of token funds
Temporary freezing of funds for at least 15 minutes
Bypassing Max Limit of Flash Loan amount
Description
Brief/Intro
The flashLoan() allows users to borrow collateral on Active Pool. The amount that can be borrowed is limited to maxFlashLoan(token) means one can borrow within the maximum limit of the amount. This limit can be bypassed with a reentrant call on the flashLoan() function.
Vulnerability Details
The ActivePool contract misses reentrancy protection on flashLoan() which leads to borrowing over the max borrow limit of the token.
Impact Details
Bypass the max borrow amount and borrow until the Pool rans out of collateral.
References
MakerDao has Reentrancy Protection on the FlashLoan module: https://github.com/makerdao/dss-flash/blob/9d492aa6148c35f568400a1ab85cd6df43b2ccc8/src/flash.sol#L74