Vaults can be purposefully bricked by leaving small amounts of rETH
A vault's maximum deposit is a percentage of its current balance, so a large holder can sell tokens in a small vault and leave dust, making the maximum fall below the minimum deposit. This soft denial of service prevents other users from depositing meaningfully and pushes them to a larger vault.
Source: https://github.com/sherlock-audit/2024-12-numa-audit-judging/issues/220
The protocol has acknowledged this issue.
Found by
OpaBatyo
Summary
Summary
Any numa holder can sell their numa in any vault, regardless where the tokens came from, allowing Numa holders to have preferential vaults and brick smaller ones by leaving dust amounts of rETH.
Description
Vaults have strict MIN and MAX deposit amounts which can be abused by leaving small amounts in it. One possible attack is a whale Numa holder to sell tokens in a smaller vault in order to cause the MAX deposit amount (10% of current lst balance) to be smaller than the MIN (1000 wei).
uint256 vaultsBalance = getVaultBalance();
uint256 MAX = (max_percent * vaultsBalance) / BASE_1000; // @audit this can be below the constant MIN
require(_inputAmount <= MAX, "must trade under max");
If a vault is left with balance of 9999 wei, MAX will always be smaller than MIN, causing a soft DoS. This attack is relevant even without bricking deposits entirely since a vault can be left with negligible amounts of liquidity and users will be allowed to MAX deposit only a fraction of that. For example:
Vault holds 1 rETH (1e18 wei) currently valued at 3700 USD.
Numa holder comes with their liquidity from another vault and burns it, leaving 0.0001 rETH (1e14 wei) or around 0.37 USD
Any further deposits to this vault can be at most a fraction of 0.37 USD, even if max_percent = 1000
Users won't be able to deposit a significant amount in this vault, effectively being pushed away from it or forced to interact with a bigger one. Large liquidity providers can collude and perform such attacks to increase their rewards and interest accrued in a preferential vault.
Root Cause
NumaVault.buyallows to only deposit, at most, a fraction of the current liquidity- There are no checks in
NumaVault.sellwhether or not the burnt Numa was minted in the same vault
Internal pre-conditions
None
External pre-conditions
none
Attack Path
- Whale user mints large amounts of Numa in a big vault
- User sells it in smaller vaults, leaving their liquidity at negligible values
- Other protocol users can't make a significant deposit in the other vault so they opt for the bigger one
- Whale user benefits from the extra liquidity/fees/rewards in the big vault
Impact
- unexpected behaviour
- protocol can be gamed
PoC
No response
Mitigation
Track numa balances internally and allow users to sell tokens only from the vault that initially minted them. Additionally, add a boolean max_percent_toggle in the vault and perform a MAX deposit check only when it's on. This way in the scenario where the vault is left with 0.37 USD worth of rETH, admins can turn the max_percent check off in order to have the vault's liquidity restored before turning it on again.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the vault calculates its maximum deposit as a percentage of current liquidity without ensuring that maximum stays above the fixed minimum, and it does not track which vault minted the tokens being sold.
Impact
A vault can be left with negligible liquidity so that further deposits are limited to a tiny fraction of its balance, effectively a soft denial of service that pushes users to a larger vault.
What the attacker needed
A large Numa holding; a small vault with low liquidity; no special permissions
The fix
The protocol should track Numa balances internally so tokens can only be sold in the vault that minted them, and add a toggle to disable the maximum-percent check so admins can restore a vault's liquidity.
How it was found
- A large holder mints a large amount of Numa in a big vault.
- The holder sells that Numa in smaller vaults, leaving their liquidity at negligible values.
- Other users cannot make a significant deposit in the smaller vaults and choose the bigger one instead.
- The large holder benefits from the extra liquidity, fees and rewards in the big vault.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A vault is a shared pool where people deposit and withdraw tokens. The code only lets you deposit a small fraction of what the pool already holds, so if someone drains the pool down to almost nothing, the allowed deposit becomes tiny too. That stops other people from using the pool, which is a denial of service.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.