Skip to content
Business logic Audit finding Intermediate

Early contributor can always become majority of crowdfund leading to rugging risks.

A contributor to a crowdfund can call the buy function with a price lower than the total contributions, causing their own contribution to exceed half of the purchase price and giving them majority voting power. This could let them use majority attacks to steal the NFT from the party.

Trust Follow

Originally disclosed on Code4rena

Submitted by Trust, also found by cccz and rvierdiiev

Voting power is distributed to crowdfund contributors according to the amount contributed divided by NFT purchase price. Attacker can call the buy() function of BuyCrowdfund / CollectionBuyCrowdfund, and use only the first X amount of contribution from the crowdfund, such that attacker’s contribution > X/2. He will pass his contract to the buy call, which will receive X and will need to add some additional funds, to purchase the NFT. If the purchase is successful, attacker will have majority rule in the created party. If the party does not do anything malicious, this is a losing move for attacker, because the funds they added on top of X to compensate for the NFT price will eventually be split between group members. However, with majority rule there are various different exploitation vectors attacker may use to steal the NFT from the party ( detailed in separate reports). Because it is accepted that single actor majority is dangerous, but without additional vulnerabilities attacker cannot take ownership of the party’s assets, I classify this as a Medium. The point is that users were not aware they could become minority under this attack flow.

Impact

Early contributor can always become majority of crowdfund leading to rugging risks.

Proof of Concept

  1. Victim A opens BuyCrowdfund and deposits 20 ETH
  2. Attacker deposits 30 ETH
  3. Victim B deposits 50 ETH
  4. Suppose NFT costs 100 ETH
  5. Attacker will call buy(), requesting 59ETH buy price. His contract will add 41 additional ETH and buy the NFT.
  6. Voting power distributed will be: 20 / 59 for Victim A, 30 / 59 for Attacker, 9 / 59 for Victim B. Attacker has majority.
  7. User can use some majority attack to take control of the NFT, netting 100 (NFT value) - 41 (external contribution) - 30 (own contribution) = 29 ETH

Recommended Mitigation Steps

Add a Crowdfund property called minimumPrice, which will be visible to all. Buy() function should not accept NFT price < minimumPrice. Users now have assurances that are not susceptible to majority rule if they deposited enough ETH below the minimumPrice.

merklejerk (PartyDAO) acknowledged and commented:

We want to avoid requiring a minimum price for now as it’s difficult to choose a value that would allow a crowdfund to respond to price drops as well as price increases. Instead we’re opting to harden defenses against majority attacks, which would minimize the desirability of this vector, and we’re introducing optional host-only and gatekeeper restrictions on buy()/bid() functions. We will keep an eye out for this behavior and reassess if it comes up.

HardlyDifficult (judge) commented:

Gifting can lead to incorrect voting power distribution. 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 Trust. 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 buy function allows the purchase price to be set below the total contributions, so a single contributor's share can exceed half of the actual purchase price.

Impact

The attacker could become the majority voter and use majority attacks to steal the NFT, though without additional vulnerabilities they cannot take ownership of the party's assets.

What the attacker needed

Attacker has a contract to add funds; attacker contributes before buy() is called; victims have contributed to the crowdfund

The fix

The project mitigated the issue by hardening defences against majority attacks and adding optional host-only and gatekeeper restrictions on buy() and bid(), rather than enforcing a minimum price.

How it was found

  1. Victim A deposits 20 ETH into the crowdfund.
  2. Attacker deposits 30 ETH.
  3. Victim B deposits 50 ETH.
  4. The NFT costs 100 ETH.
  5. Attacker calls buy() with a price of 59 ETH, and their contract adds 41 ETH to complete the purchase.
  6. Voting power is distributed proportionally to the 59 ETH price, giving the attacker a majority.

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 a crowdfund, people put in money to buy an NFT together, and voting power is based on how much each person put in compared to the NFT price. An attacker can trigger the purchase at a lower price than the total money collected, so their own share becomes more than half and they get majority control. That majority could then be used in other attacks to take the NFT.

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 Trust

View all

77 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.