Closed c4-bot-7 closed 10 months ago
Does not account for last-second bid timing manipulation.
An attacker could bid right before the end of phase 1 to snipe all collateral for less debt.
How?
0xSorryNotSorry marked the issue as insufficient quality report
Invalid. Bidders need to pay full debt in phase 1 of the auction.
Trumpero marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/2376d9af792584e3d15ec9c32578daa33bb56b43/src/loan/AuctionHouse.sol#L96-L102 https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/2376d9af792584e3d15ec9c32578daa33bb56b43/src/loan/AuctionHouse.sol#L134-L161
Vulnerability details
Impact
The Dutch auction format is vulnerable to timing manipulation which hinders debt recovery. Additional bid secrecy or flexibility is needed.
Proof of Concept
The Dutch auction style allows snipers to bid high collateral for low debt at the very end. This reduces debt recovery. Timing manipulation is easy The key functions are in
AuctionHouse.sol
.When an auction starts, the full debt amount is recorded: #L96-L102
The
getBidDetail()
function calculates how much collateral vs debt is currently offered: https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/2376d9af792584e3d15ec9c32578daa33bb56b43/src/loan/AuctionHouse.sol#L134-L161Does not account for last-second bid timing manipulation.
An attacker could bid right before the end of phase 1 to snipe all collateral for less debt.
Attacker Joe borrows 10 ETH with 100 ETH collateral. Auction starts and Joe bids 1 ETH for 9 ETH debt at the very end. Joe recovers 99 ETH while only repaying 1 ETH.
Recommended Mitigation Steps
Ensuring fair bids via secrecy or time flexibility could improve debt recovery.
Assessed type
Timing