Skip to content

Code4rena

FactoryDAO contest

Every publicly disclosed report for FactoryDAO contest and what kind of bugs they were.

disclosed reports
24
most reported class
Business logic
bug classes found
5
first disclosure
2022
Find FactoryDAO contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what FactoryDAO contest chose to make public.

Business logic

MerkleVesting withdrawal does not verify that tokens were transferred successfully

The MerkleVesting contract's withdraw function does not check the return value of the ERC20 transfer, so if the transfer fails, the user's state is updated but tokens are not sent, and they cannot withdraw again. An attacker could exploit a temporarily failing token to cause permanent loss of user funds.

FactoryDAO contest

High
DoS

Malicious token reward could disable withdrawals

The withdraw function in PermissionlessBasicPoolFactory requires each reward token transfer to succeed before returning the deposit. If a reward token is malicious or pausable and reverts on transfer, users' deposits become stuck in the contract.

FactoryDAO contest

Medium
Smart contracts

safeTransferFrom is recommended instead of transfer (1)

The contract used the plain ERC20 transfer function rather than a safe wrapper, so tokens that do not return a boolean on transfer (such as USDT) could cause funds to become stuck in the contract with no way to retrieve them. The submitter recommends using safeTransferFrom from SafeERC20 instead.

FactoryDAO contest

Medium
Crypto

Merkle leaves are the same length as the parents that are hashed

The Merkle tree implementation hashes leaves and parent nodes to the same 64-byte length, allowing a hash collision between a leaf and an internal node. An attacker could craft a fraudulent proof to claim airdrop tokens for an invalid address, disrupting the airdrop.

FactoryDAO contest

Medium
DoS

DoS: Blacklisted user may prevent withdrawExcessRewards()

A blacklisted user cannot withdraw their funds because the token transfer fails, and the contract requires all deposits to be withdrawn before the owner can call withdrawExcessRewards. This locks the owner's excess rewards and potentially other users' funds.

FactoryDAO contest

High
Business logic

Pool owners can prevent the payment of taxes

A pool owner can add a reward token that always reverts when transferred to the global beneficiary, causing the tax withdrawal function to fail. This prevents taxes from being paid without affecting other pool functionality.

FactoryDAO contest

Medium
Business logic

amount requires to be updated to contract balance increase (1)

The contract assumes that ERC20 transferFrom or transfer moves exactly the requested amount, but some tokens (e.g. fee-on-transfer) deliver less. An attacker could exploit this to cause accounting mismatches, potentially leading to value leakage or re-entrancy.

FactoryDAO contest

Medium
Smart contracts

ERC20 tokens with different decimals than 18 leads to loss of funds

The contract calculates rewards using a hardcoded 18-decimal value for all ERC20 tokens, so pools using tokens with different decimals (such as USDC with 6 decimals) produce incorrect rewards and cause loss of funds.

FactoryDAO contest

Medium
DoS

Owner of a pool may prevent any taxes being withdrawn

The owner of a pool can set a malicious reward token that reverts when the global beneficiary tries to withdraw taxes, causing the entire withdrawTaxes transaction to fail and permanently locking the taxed tokens in the contract.

FactoryDAO contest

Medium
Business logic

wrong out of range check

The bounds check on a Merkle tree index allowed index zero even though trees are numbered from one. An attacker could only reach the following code with index zero, which the developer says reverts unless a keccak pre-image of zero bytes is known.

FactoryDAO contest

Medium
Smart contracts

A transfer that is not validated its result.

The withdraw() function does not check whether the token transfer succeeded, so a failed transfer could go unnoticed. An attacker could exploit this by using a token that returns false on transfer, potentially causing the contract to misbehave.

FactoryDAO contest

Medium
Business logic

MerkleDropFactory.depositTokens() does not require the tree to exist

The depositTokens function does not check that the provided treeIndex exists, so it can operate on a non-existent tree with a zero token address. If the contract later uses safeTransferFrom, an attacker could deposit tokens into a non-existent tree, increasing its tokenBalance.

FactoryDAO contest

Medium
Business logic

SpeedBumpPriceGate: Excess ether did not return to the user

The passThruGate function in the SpeedBumpPriceGate contract did not return excess ether sent by users when purchasing an NFT. An attacker could exploit this by sending more ether than the current price, causing the user to lose the excess funds.

FactoryDAO contest

High
Business logic

Verification should be leafed based and not address based

The Merkle vesting and drop contracts track claims by claimant address rather than by Merkle leaf, so when a tree contains several leaves for the same address only one claim is ever possible. The report frames this as an unclear intended behaviour rather than a direct theft, and the team confirmed it and resolved it by clarifying the documentation.

FactoryDAO contest

Medium
Business logic

getRewards() in PermissionlessBasicPoolFactory calculate wrong reward amount for receiptId==0

The getRewards function in PermissionlessBasicPoolFactory fails to reject receiptId 0 because the check receipt.id == receiptId passes for the default zero-value receipt. An attacker can call getRewards with receiptId 0 and receive zero rewards instead of a revert, potentially fooling functions that rely on the revert to detect uninitialised receipts.

FactoryDAO contest

Medium
Business logic

Pool owners can prevent withdrawals of specific receipts

A pool owner can prevent a specific receipt holder from withdrawing by configuring a reward token that reverts for that address, causing the entire withdrawal transaction to fail. The attacker can monitor receipt creation and target the owner's address.

FactoryDAO contest

Medium
Smart contracts

Merkle-tree-related contracts vulnerable to cross-chain-replay attacks

Merkle-tree distribution contracts encode leaves without any chain identifier, so after a blockchain fork the same withdrawal proof is valid on both chains. An attacker could watch a withdrawal on one chain and replay the identical call on the other, sending tokens to an address that may be unusable there.

FactoryDAO contest

Medium