Hunt prep
Before you test Virtuals Protocol
What 32 disclosed reports say about Virtuals Protocol: 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 | 16 | 0 | – | – | $0 |
| Access control lesson | 6 | 0 | – | – | $0 |
| Smart contracts lesson | 4 | 0 | – | – | $0 |
| DoS lesson | 3 | 0 | – | – | $0 |
| Race condition 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.
-
Lack of access control in AgentNftV2::addValidator() enables unauthorized validator injection and causes reward accounting inconsistencies
The report recommends restricting addValidator to a dedicated admin role so only authorised callers can add validators.
Disclosed
-
Missing prevAgentId update in promptMulti() function may cause token loss by transferring to address(0)
The code should be fixed by initialising prevAgentId to a value no valid agentId can match and updating prevAgentId whenever agentTba is refreshed.
Disclosed
-
amountOutMin passed in as 0 in AgentToken::_swapTax leads to loss of funds due to slippage
The swap should calculate a minimum output amount, for example using the router's expected output with a slippage tolerance, instead of passing zero.
Disclosed
-
Slippage protection in AgentTax::dcaSell and BondingTax::swapForAsset is calculated at execution time, effectively retrieving the very same price that the trade will be executing at, ultimately providing no protection
The minimum acceptable price should be passed in as an argument or stored in the contract, rather than derived from a quote taken at execution time.
Disclosed
-
Genesis.sol:onGenesisSuccess() users may lose their unclaimed agentTokens if a second launch occurs before they’ve claimed their rewards from the first
The code should add the new amount to the existing claimable balance instead of replacing it.
Disclosed
-
Elo calculation error
The call should pass the player's rating first and the opponent's second, i.e. swap the two arguments.
Disclosed
-
Precision loss in priceALast and priceBLast
The contract should scale the numerator by a large factor (e.g., 10^18) before division to preserve precision.
Disclosed
-
Founder has to double-stake during migration with the initial LP locked in the old veToken
The AgentMigrator should include a mechanism to unlock LP tokens from the old veToken during migration, or AgentVeToken should add a privileged function allowing the founder to withdraw locked tokens in case of migration.
Disclosed
-
BondingTax has invalid slippage implementation
Slippage should be based on a trusted on-chain oracle price rather than the current spot price.
Disclosed
-
Imprecise calculations in launchFor() lead to less liquidity be added to the pair via the router
The calculation should be reordered to multiply before dividing, or a high-precision fixed-point maths library should be used.
Disclosed
-
Incorrect mathematical logic
The calculation should handle positive and negative rating differences directly and compute the exponential accurately, for example with a high-precision maths library, instead of the multi-step square-root decomposition.
Disclosed
-
Using AgentFactory::setAssetToken will lead to loss of funds
The report recommends storing the asset token address inside each Application struct and using that stored address in withdraw, executeApplication and _createNewAgentToken.
Disclosed
-
battleElo is at risk of underflow revert, which may DOS voting
The battleElo function should check for and handle the underflow case, returning a minimal rating value when triggered.
Disclosed
-
Delegation not revoked on withdrawal allows reward and voting power inflation post-maturity
The withdraw function should automatically clear a user's delegation when their token balance drops to zero.
Disclosed
-
Lack of maturity check for non-founder users allowing immediate withdrawals
The maturity check should be applied to all users who stake tokens, not just the founder.
Disclosed