Skip to content

Sherlock

PoolTogether: The Prize Layer for DeFi

Every publicly disclosed report for PoolTogether: The Prize Layer for DeFi and what kind of bugs they were.

disclosed reports
22
most reported class
Business logic
bug classes found
3
first disclosure
2024
Find PoolTogether: The Prize Layer for DeFi on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what PoolTogether: The Prize Layer for DeFi chose to make public.

Business logic

`drawTimeoutAt()` causes the prize pool to shutdown one draw earlier

The drawTimeoutAt() function returns a shutdown timestamp one draw period too early, causing the prize pool to shut down before the intended number of missed draws. An attacker could not directly exploit this, but it breaks core functionality by preventing prize awards and causing loss of yield for depositors.

PoolTogether: The Prize Layer for DeFi

Medium
Business logic

Unfair Manipulation of Winning Chances Due to Stolen Yield on `Blast`

The prize pool holds WETH on Blast, which automatically generates yield that anyone can contribute to their own vault via contributePrizeTokens, inflating their vault's portion and unfairly increasing their winning chances while decreasing others'. This undermines the fairness of prize distribution.

PoolTogether: The Prize Layer for DeFi

High
Audit finding

Estimated prize draws in TieredLiquidityDistributor are off due to rounding down when calculating the sum, leading to incorrect prizes

The protocol's estimated prize count per draw is calculated by summing per-tier prize counts that are each rounded down, causing the total to be lower than the true expected value. This can cause the protocol to advance to a higher tier one claim earlier than intended, reducing rewards for the next draw.

PoolTogether: The Prize Layer for DeFi

Medium
DoS

Gas Manipulation by Malicious Winners in claimPrizes Function

A malicious winner could cause the claimPrizes function to revert by returning a huge data chunk, consuming gas and preventing legitimate claims. This allowed the attacker to replay the transaction and claim prizes without computing winners.

PoolTogether: The Prize Layer for DeFi

Medium
Business logic

Draws can be retried even if a random number is available or the current draw has finished

The RngWitnet contract's isRequestFailed function incorrectly reports a request as failed even when a later successful request provides a valid random number, allowing draw bots to call startDraw again after a draw has finished or when randomness is already available, causing loss of funds to other bots.

PoolTogether: The Prize Layer for DeFi

Medium
DoS

`TpdaLiquidationPair.swapExactAmountOut()` can be DOSed by a vault's mint limit

The liquidation function's available balance is capped by the vault's mint limit, so an attacker can deposit enough to reach that limit and cause all liquidation swaps to revert. This prevents bots from liquidating, allowing the attacker to later buy the liquidatable balance at a lower price.

PoolTogether: The Prize Layer for DeFi

Medium
Business logic

The claimer's fee will be stolen by the winner

A winner can set an afterClaimPrize hook that re-enters the claimer contract to claim prizes for other winners, stealing the reward fees that the original caller would have earned. The original caller only receives the fee for the first winner, while the attacker collects fees for the rest without paying gas.

PoolTogether: The Prize Layer for DeFi

Medium
Business logic

Price formula in `TpdaLiquidationPair._computePrice()` does not account for a jump in liquidatable balance

The price formula in TpdaLiquidationPair._computePrice() decreases linearly over time and does not account for sudden increases in the vault's liquidatable balance, so the price can be much lower than the actual value. An attacker could exploit this by liquidating the vault's balance at an artificially low price, causing a loss of funds for the vault and its users.

PoolTogether: The Prize Layer for DeFi

Medium
DoS

Potential ETH Loss Due to transfer Usage in Requestor Contract on `zkSync`

The Requestor contract uses `transfer` to send ETH, which may fail on zkSync due to the fixed 2300 gas stipend being insufficient, potentially making users' ETH irretrievable. An attacker could not directly exploit this, but users may lose funds.

PoolTogether: The Prize Layer for DeFi

Medium
Misconfiguration

`PUSH0` opcode Is Not Supported on Linea yet

The smart contracts were compiled with Solidity 0.8.24, which can include the PUSH0 opcode, but the Linea network does not support that opcode. Deploying the contracts on Linea could therefore fail or behave unexpectedly.

PoolTogether: The Prize Layer for DeFi

Medium
Business logic

Users can setup hooks to control the expannsion of tiers

A user can set a prize hook that reverts when a canary tier prize is claimed, preventing the protocol from expanding the number of prize tiers. This gives the user control over the prize distribution, which they should not have.

PoolTogether: The Prize Layer for DeFi

Medium
Business logic

Vault portion calculation in `PrizePool::getVaultPortion()` is incorrect as `_startDrawIdInclusive` has been erased

The vault portion calculation in PrizePool::getVaultPortion() is incorrect because it uses a start draw ID that has been overwritten in the total accumulator but not in the vault and donation accumulators. This can give users higher than expected chances of winning prizes or cause claims to revert due to underflow.

PoolTogether: The Prize Layer for DeFi

High
DoS

`maxRedeem` doesn't comply with ERC-4626

The maxRedeem function in a PrizeVault contract could revert due to a division by zero when total assets are zero, violating the ERC-4626 requirement that maxRedeem must not revert. An attacker could not directly exploit this, but it represents a compliance failure that could disrupt integrations.

PoolTogether: The Prize Layer for DeFi

Medium
DoS

DoSed liquidations as `PrizeVault::liquidatableBalanceOf()` does not take into account the `mintLimit` when the token out is the asset

The PrizeVault's liquidatableBalanceOf function overestimates the maximum liquidatable amount when the token out is the vault's asset, because it does not account for the yield fee that is minted and the mint limit. This causes liquidations to revert when the minted fee would exceed the mint limit, potentially denying liquidation and causing losses.

PoolTogether: The Prize Layer for DeFi

Medium
Business logic

User's might be able to claim their prizes even after shutdown

The claimPrize function lacks a shutdown check, so winners can claim prizes after a shutdown if the draw is not finalised. This allows them to also withdraw their share of the shutdown balance, effectively taking funds from other users.

PoolTogether: The Prize Layer for DeFi

Medium
Business logic

`maxDeposit` doesn't comply with ERC-4626

The maxDeposit function of a PrizeVault contract does not comply with ERC-4626 because it can return an amount that, when deposited, causes a revert due to a lossy deposit. An attacker could use this to cause a denial of service by making deposits revert when the yield buffer is depleted or absent.

PoolTogether: The Prize Layer for DeFi

Medium
Business logic

`Claimers` can receive less `feePerClaim` than they should if some prizes are already claimed or if reverts because of a reverting hook

The claimer contract calculates the fee per claim using the VRGDA algorithm based on the number of prizes in the claim array, but if some prizes are already claimed or revert, the actual number of successful claims is lower, so the fee per claim is undervalued. This means claimers receive less fee than they should according to the algorithm.

PoolTogether: The Prize Layer for DeFi

Medium
DoS

Witnet is not available on some networks listed

The protocol relies on Witnet for randomness, but Witnet is not deployed on several target blockchains, so prize draws cannot start or complete on those chains. Vaults can still be deployed and accrue yield, but the prize pool will be unable to award prizes and will only refund users upon shutdown.

PoolTogether: The Prize Layer for DeFi

Medium
Business logic

`DrawManager.canStartDraw` does not consider retried RNG requests when determining if a new draw auction can be started

The canStartDraw function checks draw expiry using the draw close time, while startDraw uses the last RNG request's closedAt time, so after a retried RNG request the two disagree. Off-chain actors relying on canStartDraw may wrongly believe a new draw auction cannot be started, potentially preventing the current draw from being awarded.

PoolTogether: The Prize Layer for DeFi

Medium