Hunt prep
Before you test ZeroLend One
What 26 disclosed reports say about ZeroLend One: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 21 | 0 | – | – | $0 |
| DoS lesson | 3 | 0 | – | – | $0 |
| Race condition lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Function `executeMintToTreasury` will incorrectly reduce the `supplyShares`, therefore prevent the last users from withdrawing
The function should not reduce totalSupply.supplyShares; instead it should reduce totalSupply.underlyingBalance by the amount minted.
Disclosed
-
Interest rate is updated before updating the debt when repaying debt
The fix is to update the debt balances and total debt shares before calling updateInterestRates, so the interest rate is calculated with the correct post-repayment debt.
Disclosed
-
`GenericLogic.sol` contract assumes all price feeds has the same decimals but is a wrong assumption that leads to an incorrect health factor math
The contract should normalise price feed decimals using AggregatorV3Interface::decimals, or enforce that all feeds have the same decimals.
Disclosed
-
After a User withdraws The interest Rate is not updated accordingly leading to the next user using an inflated index during next deposit before the rate is normalized again
The interest rate should be updated before transferring funds to the treasury, by calling updateInterestRates with the amount being transferred out.
Disclosed
-
Liquidation fails to update the interest Rate when liquidation funds are sent to the treasury thus the next user uses an inflated index
The interest rate should be updated on the collateral reserve before transferring the liquidation protocol fee to the treasury.
Disclosed
-
Inconsistent Application of Reserve Factor Changes Leads to Protocol Insolvency Risk
The fix should store the last reserve factor used per pool and use that cached value for treasury accrual, updating it after each state update.
Disclosed
-
Curated Vault allocators cannot `reallocate()` a pool to zero due to attempting to withdraw 0 tokens from the underlying pool
The safety check that sets toWithdraw to 0 should be removed, so that the full supplyAssets is withdrawn when allocation.assets is 0.
Disclosed
-
The repayment process in the NFTPositionManager can sometimes be reverted
The check should be removed or adjusted to allow a 1 wei mismatch to prevent unnecessary reversion of repayments.
Disclosed
-
A Reserve Borrow Rate can be significantly decreased after liquidation
The code should be fixed to update nextDebtShares with totalSupplies.debtShares instead of the burnt amount.
Disclosed
-
Liquidation can be DOSed due to lack of liquidity on collateral asset reserve
Each asset reserve should be modified to not allow borrowing or withdrawing for certain collateral deposits, segregating collateral from lendable liquidity.
Disclosed
-
Malicious actors can execute sandwich attacks during market addition with existing funds
The report suggests gradually unlocking assets over a period of time when adding a market with existing funds.
Disclosed
-
CuratedVaults are prone to inflation attacks due to not utilising virtual shares
The vault should use non-zero virtual shares and assets, as in Morpho, to prevent inflation attacks.
Disclosed
-
Using the same heartbeat for multiple price feeds, causing DOS
The heartbeat should be passed as a per-oracle parameter and compared against the feed's updatedAt value.
Disclosed
-
An attacker can hijack the `CuratedVault`'s matured yield
The totalAssets function should update the pool's liquidityIndex before reading the balance, for example by calling forceUpdateReserve on each pool in the withdraw queue.
Disclosed
-
Position Risk Management Functionality Missing in Position Manager and dos in certain conditions
The missing collateral-toggle functionality should be implemented in the PositionManager so users can manage the risk on their positions.
Disclosed