PoolTogether - Mitigation Review

A protocol for no-loss prize savings.

  • Start date21 Aug 2023
  • End date29 Aug 2023
  • Total awards$27,150 USDC
  • Duration8 days

PoolTogether - Mitigation Review details

Important note

Each warden must submit a mitigation review for every High and Medium finding from the parent audit that is listed as in-scope for the mitigation review. Incomplete mitigation reviews will not be eligible for awards.

Findings being mitigated

Mitigations of all High and Medium issues will be considered in-scope and listed here.

Overview of changes

  • Twab Controller now checks query timestamps for safety. When requesting a twab, timestamps:
    1. are required to be finalized; i.e. cannot occur during an overwrite period
    2. are aligned to period boundaries.
  • Tier adjustment algorithm
    1. The canary tier has been simplified, so that the prize size is adjusted instead of the number of prizes. Now the unified claim count across normal + canary tiers is used to determine the next number of tiers.
  • Vault exchange rate
    1. The Vault now assumes shares are 1:1 with underlying assets, unless the vault is undercollateralized. No exchange rate is stored.

Mitigations to be reviewed

Branch

(all PRs have been merged into main)

Individual PRs

URLMitigation ofPurpose
VAULT-PR-13H-01The issue turned out not to be the case; the exchange rate is always <= 1 (yield is liquidated). However, comments were added to clarify the behaviour
VAULT-PR-9H-02Added SafeCast
VAULT-PR-6H-03Fixed conversion and naming of field
VAULT-PR-7H-04Removed recipient param
VAULT-PR-19H-05Removed recipient param
TWAB-PR-7H-06Added check for zero address
VAULT-PR-13H-07Fixed check for partial collateralization
PRIZE-PR-18H-08Fixed reserve accounting
VAULT-PR-37H-09Fixed undercollateralized redemption while providing an exit
VAULT-PR-21M-02Added hook gas limits and error handling
TWAB-PR-5M-03Ensure search timestamps are on or at period end timestamps
VAULT-PR-11M-04Fixed 4626 compliance
TWAB-PR-6M-05Reject transfers to the sponsorship address
PRIZE-PR-31M-06Record deployer and permission draw manager
PRIZE-COMMIT-ba56ea8bM-07Upgrade PRBMath to v4 and Solidity to 0.8.19
VAULT-PR-25M-08Used CREATE2 for VaultFactory
CLAIMER-PR-7M-09Made max fee a function of the tier's prize size, not the smallest prize size
PRIZE-PR-16M-10Improved handling of prize size overflow
VAULT-PR-15M-11Removed mintWithPermit
PRIZE-PR-24M-12Recomputed Tier odds, reduced number of tiers, made grand prize period draws configurable
TWAB-PR-5M-13Aligned twab queries on period boundaries
PRIZE-PR-17M-14Superseceded by the simplification of tier expansion logic
PRIZE-PR-17M-15Improved tier shrinking, retention, and expansion logic
PRIZE-PR-17M-16Simplified tier expansion logic
VAULT-PR-27M-18Redeemed underlying liquidity using shares, not assets directly. This socializes losses, if any.
PRIZE-PR-22M-19Added SafeCast
VAULT-PR-17M-20Vault shares are now 1:1 with underlying asset, and the exchange logic has been simplified
PRIZE-PR-10M-21Draw query ends on closed draw
VAULT-PR-18M-22Improved vault share / asset calculation
VAULT-PR-11M-23Fixed compliance with 4626
CLAIMER-PR-8 VAULT-PR-22 PRIZE-PR-23M-24Added minVrgdaFee and allowed silent failure of claims
VAULT-PR-20M-25Fixed permit implementations
VAULT-PR-9M-26Added SafeCast
PRIZE-PR-17M-27Unified standard and canary tier

Out of Scope

IssueReason
M-01Acknowledged issue but it will not be fixed.
M-17Permissionless nature of vaults means that anyone can create custom vaults.