Hunt prep
Before you test Tokemak
What 35 disclosed reports say about Tokemak: 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
Not written yet for this program. The numbers below are up to date.
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 | 22 | 0 | – | – | $0 |
| DoS lesson | 5 | 0 | – | – | $0 |
| Race condition lesson | 2 | 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.
-
Destination Vault rewards are not added to idleIncrease when info.totalAssetsPulled > info.totalAssetsToPull
The code should use += instead of = when updating idleIncrease in that branch, so rewards are added rather than overwritten.
Disclosed
-
Inflated price due to unnecessary precision scaling
The fix is to remove the 1e18 scaling when calculating the average price.
Disclosed
-
Gain From LMPVault Can Be Stolen
The report recommends implementing access control on updateDebtReporting, using private transactions to prevent front-running, imposing deposit/withdrawal fees, preventing same-block entry and exit, and adding snapshotting to weight gains by deposit duration.
Disclosed
-
Malicious users could lock in the NAV/Share of the DV to cause the loss of fees
The protocol should implement decay logic around the high-water mark so that if no rise is seen after a set period (e.g., 90 days), the mark starts to lower, and/or restrict access to the updateDebtReporting function.
Disclosed
-
Vault cannot be added back into the vault registry
Clear the _vaultsByType state when removing the vault from the registry.
Disclosed
-
Price returned by Oracle is not verified
The affected function should be updated to revert when the returned value is zero, in addition to the existing timestamp and freshness checks.
Disclosed
-
Incorrect amount given as input to `_handleRebalanceIn` when `flashRebalance` is called
The code should be fixed to pass the difference between the after and before balances to _handleRebalanceIn.
Disclosed
-
`LMPVault._withdraw()` can revert due to an arithmetic underflow
The loop should break when `Math.max(info.debtDecrease, info.totalAssetsPulled) >= info.totalAssetsToPull`.
Disclosed
-
Lost rewards when the supply is `0`, which always happens if the rewards are queued before anyone has `StakeTracker` tokens
The contract should reject queuing new rewards when the total supply is zero, for example by reverting if totalSupply() equals zero.
Disclosed
-
Incorrect number of shares minted as fee
The fee share calculation should use a formula that accounts for the dilution effect, such as the one used by Lido, so that the minted shares are worth exactly the fee.
Disclosed
-
Losses are not distributed equally
The withdrawal logic should burn shares proportionately across all destination vaults so that losses are shared equally regardless of withdrawal timing.
Disclosed
-
Maverick oracle can be manipulated
The oracle should use a manipulation-resistant calculation instead of relying on pool reserves.
Disclosed
-
Aura/Convex rewards are stuck after DOS
The adapter should not rely on a before/after balance difference; it should measure the contract's token balance after claiming instead.
Disclosed
-
Unable to withdraw extra rewards
The code should be modified to only stake TOKE rewards if they meet the minimum stake amount, and otherwise handle them differently (e.g., transfer directly or skip staking) to allow extra rewards to be claimed.
Disclosed
-
Incorrect pricing for CurveV2 LP Token
The `getPriceInEth` function should be updated so that the asset price used is the price of the second coin quoted in the first coin, matching the Curve pool's internal price oracle.
Disclosed