sherlock-audit / 2024-03-axis-finance-judging

1 stars 0 forks source link

thisvishalsingh - Inadequate Handling of Lot Cancellation Post-Partial Settlement #223

Closed sherlock-admin4 closed 7 months ago

sherlock-admin4 commented 7 months ago

thisvishalsingh

high

Inadequate Handling of Lot Cancellation Post-Partial Settlement

Summary

The AuctionHouse contract not properly manage the cancellation of lots after a partial settlement, potentially resulting in the loss of funds for bidders or the seller.

Vulnerability Detail

// In the AuctionHouse contract
function settle(uint96 lotId_) external override nonReentrant {
    ...
    // Settlement logic here
    ...
}

// @audit Hypothetical cancellation logic (not present in code)
function cancelLot(uint96 lotId_) external {
    ...
    // Cancellation logic should handle refunds and returns here
    ...
}

Impact

Bidders may not receive due refunds, and sellers might not get back the unsold portion of their assets.

Code Snippet

https://github.com/sherlock-audit/2024-03-axis-finance/blob/main/moonraker/src/AuctionHouse.sol#L465

Tool used

Manual Review

Recommendation

Cancellation Handling: Implement and clearly define lot cancellation logic, especially after partial settlements.