The borrow function checks collateralization after updating state instead of validating the requested amount upfront.
The LendingPool contract allows users to borrow amounts that exceed their safe collateralization ratio. When a user with 1,000,000 worth of collateral attempts to borrow 900,000 tokens, the transaction will succeeds despite the liquidation threshold of 80% limiting the maximum borrow to 800,000 tokens.
Let's say a user deposits collateral worth 1,000,000 tokens. They then call borrow(900000)
. The contract updates the debt before validating against the liquidation threshold, allowing the position to become undercollateralized. This creates an immediate liquidation opportunity and puts protocol funds at risk.
The LendingPool allows borrowing amounts that exceed the safe collateralization ratio, putting the protocol at risk of undercollateralized positions.
Add pre-validation of borrow 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.