Skip to content

Code4rena

AI Arena

Every publicly disclosed report for AI Arena and what kind of bugs they were.

disclosed reports
17
most reported class
Business logic
bug classes found
5
first disclosure
2024
Find AI Arena on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what AI Arena chose to make public.

Business logic

Fighter created by mintFromMergingPool can have arbitrary weight and element

The claimRewards function in MergingPool passes user-supplied customAttributes directly to mintFromMergingPool without validating weight or element, allowing a winner to create a fighter with arbitrary values such as zero or the maximum uint256. This could let a fighter have an extreme weight that prevents knockback or an element outside the allowed set, affecting battle outcomes.

AI Arena

Medium
Smart contracts

Can mint NFT with the desired attributes by reverting transaction

The NFT's random attributes are generated in the same transaction that mints it, so a user with a contract wallet can revert the transaction if the attributes are not desired and retry until they get the ones they want. This lets an attacker mint an NFT with specific attributes instead of random ones.

AI Arena

Medium
Access control

Minter / Staker / Spender roles can never be revoked

The smart contract's role management is broken because the owner is never granted the default admin role, so minter, staker and spender roles can never be revoked. An attacker who gains one of these roles cannot be removed by the owner.

AI Arena

Medium
Business logic

NFTs can be transferred even if StakeAtRisk remains, so the user’s win cannot be recorded on the chain due to underflow, and can recover past losses that can’t be recovered (steal protocol’s token)

A Fighter NFT can be unstaked and transferred while it still has tokens at risk, so the new owner's win cannot be recorded because the reclaim function underflows. This also lets a user recover past losses that should be unrecoverable, effectively stealing protocol tokens.

AI Arena

Medium
Access control

Burner role cannot be revoked

The admin function that grants permission to burn game items only sets the permission to true and cannot set it back to false. If an admin accidentally grants this permission to the wrong address, that address can burn any user's tokens and the permission cannot be revoked.

AI Arena

Medium
Crypto

Almost all rarity rank combinations cannot be, and are not uniformly, generated

The code derives six rarity ranks from a single DNA value by dividing by fixed divisors and taking modulo 100, which makes only a tiny fraction of all possible rank combinations reachable and biases the distribution. An attacker could predict or exploit the non-uniform rarity of generated fighters, undermining the game's fairness and economy.

AI Arena

Medium
Smart contracts

Erroneous probability calculation in physical attributes can lead to significant issues

The attribute generation code used an inclusive comparison when walking cumulative probabilities, so the boundary value was counted in the wrong bucket. This skewed the odds of each trait by one percent, making rare traits more common or even impossible to obtain, which affects fighter valuations.

AI Arena

Medium
Business logic

Malicious user can stake an amount which causes zero curStakeAtRisk on a loss but equal rewardPoints to a fair user on a win

The staking factor calculation rounds up to one when the square root of the staked amount is zero, and the stake-at-risk calculation rounds down, so a player staking a tiny amount (1 wei) gets the same reward points as a player staking just under 4 NRN on a win, but loses nothing on a loss. An attacker could stake a minimal amount to avoid any penalty while still earning full reward points.

AI Arena

High
Business logic

A locked fighter can be transferred; leads to game server unable to commit transactions, and unstoppable fighters

The FighterFarm contract only restricted transfers in two of the three ERC721 transfer functions, leaving the safeTransferFrom variant with a data parameter unchecked. An attacker could use that function to transfer a locked fighter, making it unstoppable or turning it into a poison pill that prevents the game server from committing battle results.

AI Arena

High