Skip to content
Business logic Audit finding Intermediate

User's can be grieved by not submitting the private key

In EMPAM auctions, the private key must be submitted to settle the auction, but the key holder can refuse to submit it, preventing bidders from claiming their assets. This allows the key holder to grief bidders.

FindEverythingX Follow with devblixt, hash and 4 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2024-03-axis-finance-judging/issues/174

Found by

FindEverythingX, devblixt, hash, jecikpo, merlin, novaman33, underdog

Summary

User's can be grieved by not submitting the private key

Vulnerability Detail

Bids cannot be refunded once the auction concludes. And bids cannot be claimed until the auction has been settled. Similarly a EMPAM auction cannot be cancelled once started.

Solidity
    function claimBids(
        uint96 lotId_,
        uint64[] calldata bidIds_
    )
        external
        override
        onlyInternal
        returns (BidClaim[] memory bidClaims, bytes memory auctionOutput)
    {
        // Standard validation
        _revertIfLotInvalid(lotId_);
        _revertIfLotNotSettled(lotId_);
Solidity
    function refundBid(
        uint96 lotId_,
        uint64 bidId_,
        address caller_
    ) external override onlyInternal returns (uint96 refund) {
        // Standard validation
        _revertIfLotInvalid(lotId_);
        _revertIfBeforeLotStart(lotId_);
        _revertIfBidInvalid(lotId_, bidId_);
        _revertIfNotBidOwner(lotId_, bidId_, caller_);
        _revertIfBidClaimed(lotId_, bidId_);
        _revertIfLotConcluded(lotId_);
Solidity
    function _cancelAuction(uint96 lotId_) internal override {
        // Validation
        // Batch auctions cannot be cancelled once started, otherwise the seller could cancel the auction after bids have been submitted
        _revertIfLotActive(lotId_);
Solidity
    function cancelAuction(uint96 lotId_) external override onlyInternal {
        // Validation
        _revertIfLotInvalid(lotId_);
        _revertIfLotConcluded(lotId_);
Solidity
    function _settle(uint96 lotId_)
        internal
        override
        returns (Settlement memory settlement_, bytes memory auctionOutput_)
    {
        // Settle the auction
        // Check that auction is in the right state for settlement
        if (auctionData[lotId_].status != Auction.Status.Decrypted) {
            revert Auction_WrongState(lotId_);
        }

For EMPAM auctions, the private key associated with the auction has to be submitted before the auction can be settled. In auctions where the private key is held by the seller, they can grief the bidder's or in cases where a key management solution is used, both seller and bidder's can be griefed by not submitting the private key.

Impact

User's will not be able to claim their assets in case the private key holder doesn't submit the key for decryption

Code Snippet

https://github.com/sherlock-audit/2024-03-axis-finance/blob/cadf331f12b485bac184111cdc9ba1344d9fbf01/moonraker/src/modules/auctions/EMPAM.sol#L747-L756

Tool used

Manual Review

Recommendation

Acknowledge the risk involved for the seller and bidder

Discussion

sherlock-admin4

The protocol team fixed this issue in the following PRs/commits: https://github.com/Axis-Fi/moonraker/pull/143

10xhash

The protocol team fixed this issue in the following PRs/commits: Axis-Fi/moonraker#143

Fixed Now bidder's can claim refund unless the private key is submitted following a dedicatedSettlePeriod

sherlock-admin4

The Lead Senior Watson signed off on the fix.

The original report as published on Sherlock, by FindEverythingX. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the auction settlement requires the private key to be submitted, but there is no fallback mechanism to allow bidders to claim refunds if the key is not provided within a reasonable time.

What the attacker needed

EMPAM auction with encrypted bids; private key holder refuses to submit key

The fix

The protocol team fixed this issue by allowing bidders to claim refunds after a dedicated settle period if the private key is not submitted.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

In some auctions, bids are encrypted and need a private key to be decrypted before the auction can be settled. If the person holding that key refuses to provide it, the auction never settles, and bidders cannot get their funds back or claim what they won.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by FindEverythingX

View all

2 more disclosed reports, best first.

More from Axis Finance

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.