Skip to content

Code4rena

Mellow Protocol contest

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

disclosed reports
11
most reported class
Business logic
bug classes found
3
first disclosure
2022
Find Mellow Protocol contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Mellow Protocol contest chose to make public.

Business logic

AaveVault does not update TVL on deposit/withdraw

The AaveVault contract caches its total value locked (TVL) and does not update it when depositing or withdrawing. An attacker can deposit tokens, get LP tokens based on the old TVL, then trigger a TVL update that includes accrued interest, and withdraw to receive a larger share, profiting from the interest.

Mellow Protocol contest

High
Race condition

UniV3Vault.sol#collectEarnings() can be front run

The vault's total value locked (TVL) calculation excludes unharvested trading fees, so an attacker can deposit just before fees are collected, take a large share of the pool, and then withdraw to capture a portion of those pending fees. This allows the attacker to steal half of the pending yields in about one block.

Mellow Protocol contest

High
Business logic

Withdraw from AaveVault will receive less than actual share

The AaveVault caches its total value locked (tvl) and only updates it at the end of each push and pull. When a user withdraws from LpIssuer, the token amounts are calculated using this stale cached tvl, so the user receives less than their actual share of accrued interest or donations.

Mellow Protocol contest

Medium
Business logic

User deposits don’t have min. return checks

The deposit function in LPIssuer computes balanced amounts based on current vault token TVLs, but a strategist can frontrun by rebalancing the vault, changing the TVLs and causing the user's deposit to be rebalanced differently, resulting in fewer LP tokens minted than expected. An attacker (or the strategist) could exploit this to make users receive an unpredictable and potentially much lower share of the pool.

Mellow Protocol contest

Medium
Business logic

Admin can break _numberOfValidTokens

The admin can repeatedly call removeFromTokenWhitelist on an already-removed token, decrementing the valid token counter each time until it reaches zero. This makes the token whitelist report an incorrect number of valid tokens.

Mellow Protocol contest

Medium
Business logic

Bad redirects can make it impossible to deposit & withdraw

The GatewayVault contract allows a misconfigured redirects array to zero out all deposit amounts, preventing users from depositing or withdrawing. An attacker or misconfiguration could cause a denial of service by setting redirects that clear all vault balances.

Mellow Protocol contest

Medium
Business logic

Users can avoid paying vault fees

The vault's fee-charging logic skips minting LP fees when the time since the last fee charge is below a configured delay. An attacker could deposit a tiny amount to trigger a fee charge, then deposit a large amount, earn interest, and withdraw before the delay elapses, paying no fees on the large position.

Mellow Protocol contest

Medium
Business logic

YearnVault.sol#pull() will most certainly fail

The YearnVault.pull() function calculates the amount of yTokens to withdraw using integer division, which can truncate the result. This causes the actual tokens received to be slightly less than the requested amount, leading to a revert when the contract tries to transfer the full requested amount to the user.

Mellow Protocol contest

High
Smart contracts

UniswapV3’s path issue for swapExactOutput

The `_reverseBytes` function reverses the entire encoded path byte-by-byte, which corrupts token addresses and breaks multi-hop swaps in `swapExactOutput`. As a result, the function cannot be used for multi-hop swaps.

Mellow Protocol contest

Medium