You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An operator creates a pool and a borrower attempts to borrow from it. The operator front-runs the borrower's request with a call to setPool, altering the auctionLength to 1. Once the borrower's loan is initiated, the operator immediately puts the loan up for auction, lasting only one block (~12 seconds). The operator then seizes the loan in the next block, effectively stealing the collateral from the borrower.
Vulnerability Details
Operator creates a reasonable pool
Borrower calls borrow on pool
Operator front runs with a call to setPool
Operator changes the auctionLength to 1
Once the borrower borrows operator puts loan up for auction.
Since auctionLength is 1 the auction lasts for a single block. This is due to the fact that a block is executed ~12 seconds.
Then the operator calls seizeLoan in next block to steal collateral from borrower.
Impact
Customer can have his collateral taken unexpectedly
Tools Used
manual
Recommendations
Have a minimum auctionLength
The text was updated successfully, but these errors were encountered:
Operator can steal customers collateral via front running
Severity
Medium Risk
Relevant GitHub Links
https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L232
Summary
An operator creates a pool and a borrower attempts to borrow from it. The operator front-runs the borrower's request with a call to setPool, altering the auctionLength to 1. Once the borrower's loan is initiated, the operator immediately puts the loan up for auction, lasting only one block (~12 seconds). The operator then seizes the loan in the next block, effectively stealing the collateral from the borrower.
Vulnerability Details
Impact
Customer can have his collateral taken unexpectedly
Tools Used
manual
Recommendations
Have a minimum auctionLength
The text was updated successfully, but these errors were encountered: