Hunt prep
Before you test Vader Protocol contest
What 117 disclosed reports say about Vader Protocol contest: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing 14
Ideas drawn from this program's disclosed reports and our class lessons. None of them is a known bug: each is a place to look, and the reports linked under it are why. Check the current scope before testing anything.
-
1
Test mint and burn synth paths for missing slippage bounds
Business logic Read the lesson
Several reports show synth minting and burning exposes users to unlimited slippage, and the lessons flag mint/burn synth conversions as a place to check minimum output enforcement. Test every mintSynth and burnSynth path, including router-mediated ones, to see whether a user-supplied bound is actually read and enforced rather than left unused.
Backed byVaderReserve.reimburseImpermanentLoss improperly converts USDV t... (2022) Minting and burning synths exposes users to unlimited slippage (2022) Unused slippage params (2022)+1 more report
From the lessons: Mint and burn synths and check whether the user is exposed to unlimite...; Check whether every swap, deposit or mint path enforces a user-supplie...; Swap with an incorrect slippage value and check whether the swap can b...
-
2
Probe oracle consultation for stale or unupdated price state
Business logic Read the lesson
Reports show previousPrices is never updated on sync and TWAP averages are wrong, plus scaling errors in the USDV/VADER rate. Test the consultation and update paths for stale, mis-scaled or single-pair pricing after new pairs are added, since the same root cause recurs across the oracle code.
Backed bypreviousPrices Is Never Updated Upon Syncing Token Price (2022) Vader TWAP averages wrong (2022) Oracle returns an improperly scaled USDV/VADER price (2022)+2 more reports
From the lessons: Price feeds, pool share weights and Curve or Balancer pool oracles use...; Check whether the oracle can return a stale price or a deprecated pool...
-
3
Check reserve reimbursement and IL payout accounting
Business logic Read the lesson
Multiple reports show the reserve mis-converts USDV to VADER and pays IL protection incorrectly, including only supporting one address. Test reimburseImpermanentLoss and the IL payout flow for wrong conversion, locked funds and multi-recipient handling.
Backed byVaderReserve.reimburseImpermanentLoss improperly converts USDV t... (2022) VaderReserve does not support paying IL protection out to more t... (2022) VaderPoolV2 incorrectly calculates the amount of IL protection t... (2022)+1 more report
From the lessons: Yield distribution and reward treasury contracts.; Vault deposit, withdraw and redeem functions across yield and staking...
-
4
Test access control on pool mint, swap and vest entry points
Access control Read the lesson
Reports show BasePool.mint and swap callable by anyone, unrestricted vestFor, and missing access restrictions on lock and unlock. Test these entry points and the vesting contracts for missing caller checks and whether privileged actions can be triggered by unprivileged accounts.
Backed byBasePool.mint() Is Callable By Anyone (2022) BasePool.swap() Is Callable By Anyone (2022) Unrestricted vestFor (2022)+1 more report
From the lessons: Initialise and setup functions on newly deployed contracts.
-
5
Look for front-running on mint, burn and liquidity operations
Race condition Read the lesson
Reports repeatedly show minting synths and fungibles, addLiquidity and redeemToMember can be front-run. Test the ordering assumptions around these operations, including first-LP and pool-creation timing, to see whether a later caller can change the outcome for an earlier one.
Backed byVaderPoolV2 minting synths & fungibles can be frontrun (2022) mintSynth() and burnSynth() can be front run (2022) (dex-v1) BasePool.mint() function can be frontrun (2022)+2 more reports
From the lessons: Proposal creation and configuration functions that can be front-run.; Front-run a factory produce call and check whether the caller can be g...; Front-run an initialise function on a newly deployed contract to take...
-
6
Test governance veto and proposal lifecycle for bypasses
Business logic Read the lesson
Reports show council veto protection does not work, veto can be bypassed, and completed or cancelled proposals can still be executed. Test the proposal lifecycle, duplicate veto checks and execution guards for ways to bypass or replay governance actions.
Backed byCouncil veto protection does not work (2022) Governor’s veto protection can be exploited (2022) Governance veto can be bypassed (2022)+3 more reports
From the lessons: Two-step admin and ownership transfer functions.; Proposal creation and configuration functions that can be front-run.
-
7
Check token transfer handling for fee-on-transfer and non-standard returns
Smart contracts Read the lesson
Reports show fee-on-transfer tokens are unsupported, VADER itself contains a fee, and transfer return values are unhandled. Test every transfer and transferFrom path with tokens that take a fee or return false or no value, and check whether accounting uses the amount actually received.
Backed byTokens with fee on transfer are not supported (2022) Inconsistent balance when supplying transfer-on-fee or deflation... (2022) VADER contains a Fee-On-Transfer (2022)+1 more report
From the lessons: Call every transfer and transferFrom path with a token that returns fa...; Use a fee-on-transfer token as the asset or collateral and check wheth...; Use a token that returns false or no value from transfer and check whe...; Test the protocol with several ERC20 variants (different decimals, no...
-
8
Probe Chainlink aggregator handling for stale and unchecked data
Business logic Read the lesson
Reports show Chainlink queries lack validation, return data is unchecked, and a stale aggregator breaks the oracle irrecoverably. Test the aggregator read paths for stale rounds, missing return checks and whether the oracle can recover after a feed stalls.
Backed byLacking Validation Of Chainlink’ Oracle Queries (2022) SHOULD CHECK RETURN DATA FROM CHAINLINK AGGREGATORS (2022) Should a Chainlink aggregator become stuck in a stale state then... (2022)From the lessons: Check whether the oracle can return a stale price or a deprecated pool...; Price feeds, pool share weights and Curve or Balancer pool oracles use...
-
9
Test TWAP update loop and period configuration for lockup
Reports show an unbounded loop in TwapOracle.update can lock the oracle and the update period is inflexible. Test the update path with many registered pairs and the period configuration to see whether the oracle can be made unusable or manipulated through owner-set parameters.
Backed byUnbounded loop in TwapOracle.update can result in oracle being l... (2022) TWAP Oracle inflexible _updatePeriod (2022) Permissioned nature of TwapOracle allows owner to manipulate ora... (2022)From the lessons: Price feeds, pool share weights and Curve or Balancer pool oracles use...; Check whether the oracle can return a stale price or a deprecated pool...
-
10
Check vesting linearity, start guards and depositor reset
Business logic Read the lesson
Reports show LinearVesting does not calculate linearly, a missing hasStarted modifier allows early vesting, and a depositor's vesting period can be reset. Test the vesting contracts for wrong linear maths, missing start checks and whether another user can alter an existing vest.
Backed byLinearVesting does not calculate vested amount linearly (2022) Missing hasStarted modifier, can lead to user vesting before the... (2022) Users Can Reset Bond Depositor’s Vesting Period (2022)+1 more report
- Vests can be denied (2022)
From the lessons: Vault deposit, withdraw and redeem functions across yield and staking...; Two-step admin and ownership transfer functions.
-
11
Test pool reserve accounting when mixing synth and fungible shares
Business logic Read the lesson
Reports show a single native reserve variable for synth and non-synth reserves causes losses, and mixing LP share types harms synth holders. Test the reserve and share accounting when synth and fungible liquidity coexist, including asymmetric provision and removal.
Backed byUsing single total native reserve variable for synth and non-syn... (2022) Mixing different types of LP shares can lead to losses for Synth... (2022) Covering impermanent loss allows profiting off asymmetric liquid... (2022)+1 more report
From the lessons: Stableswap and AMM provide-liquidity, withdraw-liquidity and single-si...; Strategy allocation and deallocation functions in vaults.
-
12
Probe router swap and output calculation paths
Business logic Read the lesson
Reports show VaderRouter calculates wrong swap outputs and performs wrong swaps, with unused slippage params. Test the router's output calculation and swap execution against expected pool maths, and check whether slippage parameters are actually applied.
Backed byVaderRouter.calculateOutGivenIn calculates wrong swap (2022) VaderRouter._swap performs wrong swap (2022) Unused slippage params (2022)+1 more report
From the lessons: Compare the protocol's computed slippage bound against the true expect...; Swap with an incorrect slippage value and check whether the swap can b...; Swap, deposit, mint, withdrawal and settlement functions in AMMs, vaul...
-
13
Check initialisation and setup functions for front-running
Access control Read the lesson
Reports show init can be called by everyone and pool functions can run before initialisation, with wrong initialisation values. Test newly deployed contracts' initialise and setup functions for front-running and for whether defaults are set correctly before use.
Backed byInit function can be called by everyone (2021) Pool functions can be called before initialization in `init ()`... (2021) Incorrect initialization causes VADER emission rate of 1 second... (2021)From the lessons: Front-run an initialise function on a newly deployed contract to take...; Initialise and setup functions on newly deployed contracts.
-
14
Test gas throttle removal and pool configuration mutability
Misconfiguration Read the lesson
Reports show there is no way to remove GasThrottle after deployment and adding a duplicate foreign asset replaces the earlier oracle. Test the pool configuration and throttle management paths for missing removal functions and for state being overwritten by repeated registration.
Backed byNo way to remove GasThrottle from VaderPool after deployment (2022) No way to remove GasThrottle after deployment (2022) Adding pair of the same foreignAsset would replace oracle of ear... (2022)From the lessons: Initialise and setup functions on newly deployed contracts.; Two-step admin and ownership transfer functions.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 68 | 0 | – | – | $0 |
| Access control lesson | 21 | 0 | – | – | $0 |
| Smart contracts lesson | 8 | 0 | – | – | $0 |
| DoS lesson | 7 | 0 | – | – | $0 |
| Race condition lesson | 3 | 0 | – | – | $0 |
| Crypto lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Users can lock themselves out of being able to convert VETH, becoming stuck with the deprecated asset
The merkle proof should be decoupled from the conversion so that it sets an eligible amount in storage, and users can convert up to that amount over multiple transactions.
Disclosed
-
Council veto protection does not work
The function signatures should be hashed to calculate function selectors and those should be checked instead of the calldata.
Disclosed
-
Reserve does not properly apply prices of VADER and USDV tokens
The price should be converted from a fixed-point number back to a standard integer, using the same scaling logic as in the USDV token contract.
Disclosed
-
No way to remove GasThrottle from VaderPool after deployment
The gas throttle should be removed entirely or governance should be able to disable it, as is done in the newer pool version.
Disclosed
-
LPs of VaderPoolV2 can manipulate pool reserves to extract funds from the reserve.
Use a manipulation-resistant oracle for the relative prices of the pool’s assets (TWAP, etc.).
Disclosed
-
Using single total native reserve variable for synth and non-synth reserves of VaderPoolV2 can lead to losses for synth holders
The LP share mint and burn calculations should use only LP-provided native reserve variables, keeping total native reserves for other pool-wide uses such as swaps and rescue functions.
Disclosed
-
Oracle doesn’t calculate USDV/VADER price correctly
The algorithm for calculating asset prices should be reviewed and corrected so that all terms are converted to a common unit before averaging.
Disclosed
-
Oracle returns an improperly scaled USDV/VADER price
The oracle calculation should be revised so that the difference in decimals between the Chainlink feed and the foreign asset is properly accounted for, with tests covering simple cases.
Disclosed
-
totalLiquidityWeight Is Updated When Adding New Token Pairs Which Skews Price Data For getVaderPrice and getUSDVPrice
The line that increments totalLiquidityWeight in _addVaderPair should be removed so that newly added tokens do not affect upcoming price queries.
Disclosed
-
VaderPoolV2.mintFungible exposes users to unlimited slippage
Add a user-specified minimum amount of LP tokens to mint.
Disclosed
-
USDV.sol Mint and Burn Amounts Are Incorrect
The calculation should use both getVaderPrice and getUSDVPrice to determine the correct amounts, and unit tests should be added.
Disclosed
-
Vader TWAP averages wrong
The assignments to pastLiquidityWeights and _totalLiquidityWeight should be moved before the continue statement so that skipped pairs still contribute their previous weight.
Disclosed
-
Redemption value of synths can be manipulated to drain VaderPoolV2 of all native assets in the associated pair
The exchange rate used for minting and burning synths should be tied to a manipulation-resistant oracle.
Disclosed
-
previousPrices Is Never Updated Upon Syncing Token Price
The contract should update previousPrices for both VADER and USDV after syncing their respective prices.
Disclosed
-
Adding pair of the same foreignAsset would replace oracle of earlier entry
The oracle should be bound to the specific pair rather than to the foreign asset alone.
Disclosed