Skip to content
Business logic Audit finding Intermediate

Users can bypass distributions fees by ragequitting instead of using a formal distribution

The report describes that when a user rage quits a party, they receive their full share without paying the distribution fee that would be charged during a formal distribution. An attacker could avoid the fee by rage quitting, causing the fee recipient to lose expected fees.

0x52 Follow

Originally disclosed on Code4rena

Submitted by 0x52

Distribution fees can be bypassed by ragequitting instead of distributing

Proof of Concept

https://github.com/code-423n4/2023-05-party/blob/f6f80dde81d86e397ba4f3dedb561e23d58ec884/contracts/party/PartyGovernance.sol#L510-L515

    address payable feeRecipient_ = feeRecipient;
    uint16 feeBps_ = feeBps;
    if (tokenType == ITokenDistributor.TokenType.Native) {
        return
            distributor.createNativeDistribution{ value: amount }(this, feeRecipient_, feeBps_);
    }

When a distribution is created the distribution will pay fees to the feeRecipient.

https://github.com/code-423n4/2023-05-party/blob/f6f80dde81d86e397ba4f3dedb561e23d58ec884/contracts/party/PartyGovernanceNFT.sol#L333-L345

            if (address(token) == ETH_ADDRESS) {
                // Transfer fair share of ETH to receiver.
                uint256 amount = (address(this).balance * shareOfVotingPower) / 1e18;
                if (amount != 0) {
                    payable(receiver).transferEth(amount);
                }
            } else {
                // Transfer fair share of tokens to receiver.
                uint256 amount = (token.balanceOf(address(this)) * shareOfVotingPower) / 1e18;
                if (amount != 0) {
                    token.compatTransfer(receiver, amount);
                }
            }

On the other hand, when a user rage quits, they are given the full amount without any fees being taken. If we assume that the party is winding down, then users can bypass this fee by rage quitting instead of using a formal distribution. This creates value leakage and the fee recipient is not being paid the fees they would otherwise be due.

Recommended Mitigation Steps

Charge distribution fees when rage quitting

0xble (Party) confirmed and commented:

Fair to bring up, although based on how parties will be configured when created through our frontend, rage quitting and distributions will be mutually exclusive.


The original report as published on Code4rena, by 0x52. 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 rage quit function does not deduct the distribution fee that is applied during normal distributions.

Impact

The fee recipient loses fees they would otherwise receive, and users can avoid the fee by rage quitting instead of using a formal distribution.

What the attacker needed

Party is winding down; user has voting power

The fix

Charge distribution fees when rage quitting.

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 party (a group investment), when profits are distributed, a small fee is taken and given to a fee recipient. The report found that if a user instead chooses to 'rage quit' (exit and take their share), no fee is taken, so they get more money and the fee recipient gets nothing. This means the fee can be avoided.

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 0x52

View all

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