Skip to content

Code4rena

yAxis contest

Every publicly disclosed report for yAxis contest and what kind of bugs they were.

disclosed reports
27
most reported class
Business logic
bug classes found
4
first disclosure
2021
Find yAxis contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what yAxis contest chose to make public.

Business logic

CDP.sol update overwrites user’s credit on every positive increment

The update function in CDP.sol overwrites the totalCredit with the incremental credit instead of adding to it, so any previously accumulated credit is lost. An attacker could not directly exploit this, but users' credit is permanently lost each time update is called.

yAxis contest

High
Business logic

Prevent Minting During Emergency Exit

The emergency exit mechanism does not prevent minting against debt, so during a critical incident users could still mint new tokens backed by debt, potentially locking up funds or allowing an attacker to cause more damage.

yAxis contest

Medium
Business logic

YaxisVaultAdapter.sol#withdraw() will most certainly fail

The withdraw function in YaxisVaultAdapter.sol converts the requested token amount to vault shares, but due to precision loss the actual tokens received are less than the requested amount, causing the subsequent safeTransfer to revert from insufficient balance. The report states this will fail 99.99% of the time unless the price per share equals 1e18.

yAxis contest

High
Business logic

earn results in decreasing share price

The vault and controller contracts valued a vault's holdings differently: the vault summed the balances of all tokens it held, while the controller counted only the strategy's want token. Because of this mismatch, each call to earn() reduced the share price, so depositors lost roughly 2% of their value instead of earning yield.

yAxis contest

High
Business logic

An attacker can steal funds from multi-token vaults

The vault's balance calculation adds up token amounts without accounting for their different prices, so an attacker can deposit a low-value token and withdraw a mix of higher-value tokens, stealing funds from other users.

yAxis contest

High
Business logic

Vault: Swaps at parity with swap fee = withdrawal fee

The vault treats all assets as equal in price, allowing users to deposit and withdraw in the same transaction to swap funds at parity, paying only the 0.1% withdrawal fee as a swap fee. This could be exploited for arbitrage, especially with off-peg stablecoins.

yAxis contest

Medium
Smart contracts

ERC20 return values not checked

The contract called ERC20 transfer functions without checking their boolean return value, so a token that signals failure by returning false instead of reverting would be treated as a successful transfer. This could corrupt the protocol's accounting of recovered tokens.

yAxis contest

Medium
Business logic

Controller.inCaseStrategyGetStuck does not update balance

The `Controller.inCaseStrategyGetStuck` function withdraws from a strategy but fails to update the stored balance for that strategy. This causes the controller to believe the strategy holds more funds than it actually does, leading to over-withdrawal attempts in `Controller.withdraw`.

yAxis contest

Medium
Business logic

YAxisVotePower.balanceOf can be manipulated

The YAxisVotePower.balanceOf function calculates voting power using the current reserves of a Uniswap pool, which can be temporarily manipulated. An attacker could increase their voting power to pass a governance proposal.

yAxis contest

Medium
Access control

manager.allowedVaults check missing for add/remove strategy

The addStrategy and removeStrategy functions in the Controller contract lack the manager.allowedVaults check that is present in reorderStrategies. This allows a strategist to add or remove strategies on vaults that are not authorised, potentially causing harm.

yAxis contest

Medium
Smart contracts

Harvest can be frontrun

The harvest function in a smart contract swaps tokens and adds liquidity without checking slippage, allowing an attacker to frontrun and cause the contract to receive fewer tokens than expected, reducing profits.

yAxis contest

Medium
Business logic

wrong YAXIS estimates

The Harvester.getEstimates function used a WETH input amount to compute a YAXIS to WETH trade, producing incorrect estimates. These wrong estimates could cause harvest transactions to revert or allow large slippage, enabling sandwich attacks.

yAxis contest

Medium
Business logic

No safety check in addToken

The addToken function in Manager.sol lacks a check to prevent adding the same token twice to a vault or adding a token to multiple vaults. This could cause tokens to be counted twice or break value calculations for a vault.

yAxis contest

High
Access control

token -> vault mapping can be overwritten

The addToken function allows overwriting an existing token-to-vault mapping, which disassociates the token from its previous vault without removing it from that vault's token list. This can cause tokens to become stuck and break access control checks like the onlyVault modifier.

yAxis contest

Medium
Smart contracts

# Controller is vulnerable to sandwich attack

The controller contract calls Curve (crv) swaps without specifying a minimum return amount, leaving trades open to sandwich attacks. An attacker could front-run and back-run the swap to profit from the price impact, potentially draining user funds.

yAxis contest

Medium
Business logic

Vault.withdraw mixes normalized and standard amounts

The Vault contract mixes normalized (18-decimal) and standard token amounts when calculating withdrawals, so a user withdrawing a small amount of shares could receive an inflated amount of a token with fewer than 18 decimals, such as USDC. This could let an attacker steal tokens by exploiting the decimal mismatch.

yAxis contest

High
Business logic

Vault.withdraw sometimes burns too many shares

When a vault withdrawal could not be fully satisfied from the controller, the code reduced the payout amount but still burned the original share count, so the withdrawer received fewer tokens than their shares were worth. An attacker or ordinary user triggering such a withdrawal would lose value relative to their fair share.

yAxis contest

Medium
Audit finding

Vault.balance() mixes normalized and standard amounts

The Vault.balance function adds a normalised balance (scaled to 18 decimals) to a non-normalised balance from the controller, causing the total to be under-reported. This leads to incorrect share calculations when depositing or redeeming tokens.

yAxis contest

High
Business logic

Controller does not raise an error when there’s insufficient liquidity

The vault's controller failed to revert when it could not obtain enough liquidity to satisfy a withdrawal, so a user's shares were burned while they received nothing. An MEV searcher could sandwich a pending withdrawal to drain the available liquidity, causing the victim to lose their shares and pushing up the share price.

yAxis contest

High
Business logic

Controller.setCap sets wrong vault balance

The Controller.setCap function reduced the recorded vault balance by the whole strategy balance rather than only the excess amount withdrawn. This made the vault balance understated, so depositors received too many shares and could later redeem them for more than they put in, draining tokens from the vault.

yAxis contest

High
Business logic

removeToken would break the vault/protocol.

The Manager contract's removeToken function lacks safety checks, so removing a token while a vault holds it locks those tokens and corrupts the vault's accounting. An attacker or careless admin could call it to make user balances unwithdrawable and crash the share price.

yAxis contest

High
Access control

Halting the protocol should be onlyGovernance and not onlyStrategist

The setHalted() function in the Manager contract was protected by onlyStrategist instead of onlyGovernance, allowing a strategist to halt the entire protocol. A malicious strategist could use the 7-day window to permanently shut down the protocol if they disagreed with a governance decision to replace them.

yAxis contest

Medium
Business logic

VaultHelper deposits don’t work with fee-on transfer tokens

The VaultHelper contract's deposit functions transfer tokens from the user to itself, but if the token charges a fee on transfer, the contract receives less than the requested amount. A subsequent vault deposit then tries to transfer more tokens than the contract holds, causing the transaction to revert and potentially bricking the protocol.

yAxis contest

Medium