Skip to content

Code4rena

Virtuals Protocol

Every publicly disclosed report for Virtuals Protocol and what kind of bugs they were.

disclosed reports
32
most reported class
Business logic
bug classes found
5
first disclosure
2025
Find Virtuals Protocol on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Virtuals Protocol chose to make public.

Access control

Lack of access control in AgentNftV2::addValidator() enables unauthorized validator injection and causes reward accounting inconsistencies

The addValidator function on the AgentNftV2 contract had no access control, so anyone could add a validator to a predicted upcoming virtual ID. Because mint later adds the founder as a validator again, the duplicate entry inflated the shared validator pool rewards, which could be withdrawn and leave the contract short of funds for legitimate reward claims.

Virtuals Protocol

High
Business logic

amountOutMin passed in as 0 in AgentToken::_swapTax leads to loss of funds due to slippage

The AgentToken contract's tax swap function calls the Uniswap router with a minimum output amount of zero, so the swap will accept any amount of tokens in return. An attacker could manipulate the pool price before the swap to make the contract receive far fewer tokens than expected, causing a loss for the project tax recipient.

Virtuals Protocol

Medium
Business logic

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 slippage protection in BondingTax::swapForAsset and AgentTax::dcaSell is computed from the price fetched at execution time, so the minimum output is derived from the very price the trade will execute at. An attacker could move the pool price just before the call, and the swap would still pass the check, letting the protocol or agent creators lose part of their fees.

Virtuals Protocol

Medium
Business logic

Elo calculation error

The battleElo function passes the two player ratings to the Elo rating-change helper in the wrong order, so the change and its direction are computed for the opponent rather than the player. This produces incorrect rating updates for every battle processed.

Virtuals Protocol

Medium
Audit finding

Precision loss in priceALast and priceBLast

The price calculation functions priceALast and priceBLast use integer division on pool reserves, causing truncation of fractional parts. An attacker could exploit this precision loss to obtain incorrect prices, potentially leading to financial loss or manipulation.

Virtuals Protocol

Medium
Business logic

Founder has to double-stake during migration with the initial LP locked in the old veToken

The migration function creates new token and veToken contracts but does not unlock the founder's original LP tokens from the old veToken, which remain locked for 10 years. Founders must therefore provide additional virtual tokens to migrate, leaving their original capital stuck in the obsolete contract.

Virtuals Protocol

Medium
Business logic

BondingTax has invalid slippage implementation

The slippage check in BondingTax's swapForAsset function is ineffective because the minimum output is calculated from the current spot price, which is itself dynamic. An attacker could cause the treasury to receive less than the intended minimum amount, or normal trading could lead to losses.

Virtuals Protocol

Medium
Smart contracts

Incorrect mathematical logic

The ELO rating calculation in the contract miscomputes the expected score because it offsets the rating difference by 800 before taking a sixteenth root, so the exponent no longer matches the standard formula. This makes all rating changes wrong and could let an attacker obtain abnormally large rating gains.

Virtuals Protocol

Medium
Business logic

Using AgentFactory::setAssetToken will lead to loss of funds

The contract stores a single global asset token address, but applications record only amounts, not which token they were funded with. If an admin changes the asset token, withdrawals and application execution can fail or use the wrong token, potentially locking or misdirecting funds.

Virtuals Protocol

Medium
DoS

battleElo is at risk of underflow revert, which may DOS voting

The battleElo function in EloCalculator.sol can underflow when a validator casts a vote with certain battle results, causing a revert. This blocks validators from submitting votes with those specific results, potentially disrupting governance for low-maturity services.

Virtuals Protocol

Medium
Business logic

VirtualGenesisDAO.sol:earlyExecute() proposals can be executed two times

The earlyExecute function runs a proposal's actions through an internal helper that does not mark the proposal as executed, so the public execute function can later run the same proposal a second time. An attacker could therefore cause an approved proposal's actions to be carried out twice.

Virtuals Protocol

Medium
Business logic

No slippage protection during adding liquidity to uniswap

The contract calls Uniswap's addLiquidity with zero minimum amounts for both tokens, so the transaction reverts if the pool price moves even slightly before execution. An attacker could manipulate the pool price just before the transaction to cause it to fail, denying the liquidity addition.

Virtuals Protocol

Medium
Access control

Functions in FERC20 can’t be invoked

Two owner-only functions in the FERC20 token contract cannot be called because the owner is the Bonding contract, which does not expose them. As a result, the maximum transaction limit cannot be updated and addresses cannot be excluded from that limit.

Virtuals Protocol

Medium
Audit finding

Division in Bonding.sol._openTradingOnUniswap() results in an incorrect lpSupply , higher vaultSupply , and dust AgentTokens getting locked in FPair

A rounding error in the Bonding contract's graduation logic causes the liquidity pool supply to be truncated, making the vault supply too large and leaving dust agent tokens permanently locked in the FPair contract. An attacker cannot directly profit, but the protocol loses a small amount of tokens and the accounting becomes inconsistent.

Virtuals Protocol

Medium
Business logic

Missing slippage protection on buy and sell

The buy and sell functions in the FRouter contract do not check the minimum amount of tokens a user receives, so trades can execute at a much worse price than expected. An attacker could front-run a transaction to manipulate reserves and cause the user to receive significantly fewer tokens.

Virtuals Protocol

Medium
Access control

Anybody can control a user’s delegate by calling AgentVeToken.stake() with 1 wei

The stake function in AgentVeToken allows any caller to set the delegatee for an arbitrary receiver by staking a minimal amount (1 wei) of LP tokens. An attacker can thus become the delegate for multiple high-balance users, potentially gaining majority voting power in the AgentDAO and submitting malicious proposals.

Virtuals Protocol

High