Skip to content

Code4rena

PoolTogether

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

disclosed reports
104
most reported class
Business logic
bug classes found
6
first disclosure
2021
Find PoolTogether on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what PoolTogether chose to make public.

Business logic

Funds locked due to missing transfer check

The PrizeVault contract ignores the boolean return value of ERC-20 transfer, so a token that returns false on insufficient balance does not revert. Combined with an ERC-4626 yield vault that returns fewer assets than requested on redeem, a user's withdrawal burns all shares but transfers no assets, locking the funds permanently.

PoolTogether

Medium
Business logic

_maxYieldVaultWithdraw() uses yieldVault.convertToAssets()

The function _maxYieldVaultWithdraw() used yieldVault.convertToAssets(), which per EIP-4626 is only approximate and may return too much. This could cause maxWithdraw(), maxRedeem(), and liquidatableBalanceOf() to return inflated values, violating EIP-4626 for the first two.

PoolTogether

Medium
Business logic

Permit doesn’t work with DAI

The depositWithPermit function in PrizeVault.sol calls the permit function with parameters that do not match DAI's permit signature, which includes a nonce and a boolean allowed flag. As a result, permit-based deposits with DAI or sDAI will revert, preventing users from using the signed-message deposit feature.

PoolTogether

Medium
Business logic

PrizeVault.maxDeposit() doesn’t take into account produced fees

The vault's maxDeposit() function did not subtract accrued yield fees from the TWAB supply limit, so a user could deposit up to the full limit and leave no room to mint fee shares. The yield fee recipient then could not claim earned fees because the share mint would overflow.

PoolTogether

Medium
Business logic

Lack of Slippage Protection in withdraw / redeem Functions of the Vault

The withdraw and redeem functions of the PrizeVault lack slippage protection, so if the underlying yield vault suffers a loss while a user's transaction is pending, the user receives fewer assets than expected. An attacker could exploit this by causing a loss or front-running to make the user accept a worse exchange rate.

PoolTogether

Medium
Business logic

Any fee claim lesser than the total yieldFeeBalance as unit of shares is lost and locked in the PrizeVault contract

The claimYieldFeeShares function subtracts the entire cached yieldFeeBalance from the stored balance instead of only the claimed amount, so any partial claim wipes out the remaining unclaimed fees. An attacker (or the fee recipient themselves) could claim a tiny amount and cause the rest of the accrued fees to be permanently locked in the contract.

PoolTogether

High
Business logic

Resetting delegation will result in user funds being lost forever

A user who had delegated their vault balance to another address could reset delegation by passing the zero address, which the code treated as a valid delegate and moved their balance to it. This left the user unable to delegate back or withdraw, so their funds were lost forever.

PoolTogether

High
Smart contracts

Unintended or malicious use of prize winners’ hooks

The vault's setHooks function lets a user attach arbitrary hook contracts that are called during prize claims, and these hooks can make external calls and change state. An attacker could use a malicious hook to perform unauthorised side transactions, reentrant calls, or denial-of-service on claiming.

PoolTogether

Medium
Business logic

Balance invariant between the individual and total twabs can be broken

The TwabController._transferBalance function mishandles transfers to the SPONSORSHIP_ADDRESS, causing the total balance for a vault to decrease even though it should not. This breaks the invariant between individual and total twabs, skewing the odds in favour of winning and draining the reserve faster than intended.

PoolTogether

Medium
Business logic

Inconsistent behavior for canary claims in the claimer

The claimer contract calculates fees per claim using only the standard prize pool claim count, ignoring canary claims. This inconsistency could lead to incorrect fee calculations for canary claims.

PoolTogether

Medium
Business logic

Users can manipulate the observation creation

The contract only creates a new observation when the current period differs from the newest observation's period, so frequent small deposits within the same period overwrite the existing observation instead of adding a new one. An attacker could therefore manipulate their recorded average balance for a draw that ends within that period.

PoolTogether

Medium
Business logic

An attacker can front-run deployVault to deploy at the same address

The vault factory used CREATE1, so a vault's address depended only on the factory's nonce. An attacker could front-run a deployment or exploit a chain reorg to place a malicious vault at the same address, causing users' deposits to go to the attacker's vault.

PoolTogether

Medium
Business logic

The _currentExchangeRate of the Vault contract can’t increase and will always be lower than or equal to _assetUnit

The vault's exchange rate calculation caps withdrawable assets at the recorded supply-to-assets value, so the rate can never rise above the asset unit and cannot recover after a temporary under-collateralisation. This prevents further deposits when the vault is under-collateralised, though the team later stated the cap is intentional to stop users claiming accrued yield.

PoolTogether

High
Business logic

Improper handling of cases when withdrawable assets = 0

The vault's exchange rate function returns a 1:1 rate when the yield vault has zero withdrawable assets, incorrectly marking the vault as collateralised. This could let users deposit or liquidate under false assumptions, though no direct loss of funds is shown.

PoolTogether

Medium
Business logic

High Prizes might not be claimed

The claimer fee was capped by the minimum prize size rather than the actual prize size, so when gas costs exceeded that minimum, solvers had no incentive to claim large prizes. As a result, high prizes could go unclaimed, causing a loss of reputation for the protocol.

PoolTogether

Medium
Business logic

The tier odds in TieredLiquidityDistributor are incorrect

The tier odds constants in the TieredLiquidityDistributor contract were incorrect: the highest standard prize tier did not have odds of 1 as intended, only the canary tier did. This meant prizes were not distributed according to the protocol's design.

PoolTogether

Medium
Business logic

Delegated amounts can be forcefully removed from anyone in the TwabController

The sponsor function in the Vault contract allowed anyone to force another user's delegation to the sponsor address by depositing zero tokens, removing their delegated power. An attacker could do this for every user, making the total delegated supply zero, and then hold all delegated power to manipulate the lottery.

PoolTogether

High
Business logic

Increasing reserves breaks PrizePool accounting

The PrizePool contract's accounting does not update when someone calls increaseReserve, so the accounted balance remains lower than the actual token balance. This allows any vault to call contributePrizeTokens and effectively steal the reserve contribution, double-counting the tokens.

PoolTogether

High
Access control

drawManager can be set to a malicious address

The PrizePool contract's setDrawManager function lacks access control, allowing anyone to set the drawManager address if it is not already set. An attacker could front-run the legitimate assignment to set a malicious drawManager, gaining control over functions like withdrawReserve and closeDraw.

PoolTogether

Medium