Skip to content
Business logic Audit finding Intermediate

Maximum bid will always be used in Auction

The AuctionCrowdfund contract allowed anyone, including the NFT seller, to repeatedly call the bid function and force the crowdfund to bid up to its maximumBid, even when members did not want to bid that high. This could cause the crowdfund to pay more than necessary, benefiting the seller at the expense of the party members.

Anurag Jain Follow

Originally disclosed on Code4rena

Submitted by csanuragjain, also found by Lambda

AuctionCrowdfund contract is designed in a way to allow bidding max upto maximumBid. But due to a flaw, anyone (including NFT seller) can make sure that CrowdFund bid always remain equal to maximumBid thus removing the purpose of maximumBid. This also causes loss to Party participating in this Auction as the auction will always end up with maximumBid even when it could have stopped with lower bid as shown in POC.

Proof of Concept

  1. An auction is started for NFT N in the market
  2. Party Users P1 starts an AuctionCrowdfund with maximumBid as 100 for this auction.
function initialize(AuctionCrowdfundOptions memory opts)
        external
        payable
        onlyConstructor
    {
...
maximumBid = opts.maximumBid;
...
}
  1. P1 bids amount 10 for the NFT N using bid function
  2. Some bad news arrives for the NFT collection including NFT N reducing its price
  3. P1 decides not to bid more than amount 10 due to this news
  4. NFT collection owner who is watching this AuctionCrowdfund observes that bidding is only 10 but Party users have maximumBid of 100
  5. NFT collection owner asks his friend to bid on this NFT in the auction market (different from crowd fund)
  6. NFT collection owner now takes advantage of same and himself calls the bid function of AuctionCrowdfund via Proxy
function bid() external onlyDelegateCall {
...
}
  1. Now since last bid belongs to collection owner friend, so AuctionCrowdfund contract simply extends its bid further
if (market.getCurrentHighestBidder(auctionId_) == address(this)) {
            revert AlreadyHighestBidderError();
        }
        // Get the minimum necessary bid to be the highest bidder.
        uint96 bidAmount = market.getMinimumBid(auctionId_).safeCastUint256ToUint96();
        // Make sure the bid is less than the maximum bid.
        if (bidAmount > maximumBid) {
            revert ExceedsMaximumBidError(bidAmount, maximumBid);
        }
        lastBid = bidAmount;
  1. NFT collection owner keeps repeating step 7-9 until AuctionCrowdfund reaches the final maximum bid of 100
  2. After auction completes, collection owner gets 100 amount instead of 10 even though crowd fund users never bidded for amount 100

Recommended Mitigation Steps

maximumbid concept can easily be bypassed as shown above and will not make sense. Either remove it completely

OR

bid function should only be callable via crowdfund members then attacker would be afraid if new bid will come or not and there should be a consensus between crowdfund members before bidding which will protect this scenario.

merklejerk (PartyDAO) acknowledged and commented:

While it doesn’t solve it for all crowdfunds, we will allow some crowdfunds to restrict who can call their bid() function to host-only.

HardlyDifficult (judge) commented:

This is a form of leaking value - agree with Medium risk.

0xble (PartyDAO) confirmed and resolved:

Mitigated by: https://github.com/PartyDAO/partybidV2/pull/140


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

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

The bid function was externally callable by anyone, allowing an attacker to repeatedly trigger bids up to the maximumBid without the members' consent.

Impact

The crowdfund could be forced to pay the maximumBid even when members only intended to bid a lower amount, causing a loss to party participants.

What the attacker needed

An active AuctionCrowdfund; attacker can call bid function; attacker can place competing bids

The fix

The bid function should be restricted to crowdfund members only, and there should be consensus among members before bidding.

How it was found

  1. An auction is started for NFT N in the market.
  2. Party Users P1 starts an AuctionCrowdfund with maximumBid as 100 for this auction.
  3. P1 bids amount 10 for the NFT N using bid function.
  4. NFT collection owner asks his friend to bid on this NFT in the auction market.
  5. NFT collection owner calls the bid function of AuctionCrowdfund via Proxy.
  6. NFT collection owner keeps repeating step 7-9 until AuctionCrowdfund reaches the final maximum bid of 100.

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.

A crowdfund lets a group pool money to bid on an NFT, with a cap on the total bid. The problem was that anyone could call the bid function, so the seller could use a friend to place a competing bid and then trigger the crowdfund to automatically raise its bid up to the cap. This meant the group could end up paying the maximum even if they only wanted to bid a smaller amount.

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 Anurag Jain

View all

63 more disclosed reports, best first.

More from Party Protocol

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.