Levva Protocol has 2 public audit reports from Quantstamp; the latest is Quantstamp, 25 Apr 2024; no critical findings reported.
Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.
Newest first
| Report | Security firm | Date | Scope | Critical findings | Findings | Source |
|---|---|---|---|---|---|---|
| Levva Updates and Oracle Feature | Security firm: Quantstamp | Date: | Scope: Files listed | None open | Findings: 1 high · 3 medium · 2 low 5 fixed | certificate.quantstamp.com ↗ |
| Levva Protocol | Security firm: Quantstamp | Date: | Scope: Repository at commit d82fefd | None open | Findings: 5 high · 3 medium · 7 low 12 fixed · 3 acknowledged | certificate.quantstamp.com ↗ |
34 findings in 2 reports: 17 fixed, 1 mitigated, 3 acknowledged (the team chose not to change the code), none open, 13 informational.
| Severity | Acknowledged | Fixed | Mitigated |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 6 | 0 |
| Medium | 0 | 6 | 0 |
| Low | 3 | 5 | 1 |
In the current design of the Marginly pool, the `reinit()` function only checks whether the position at the top of the heap (i.e., the riskiest position) is unhealthy. Even though other positions in the heap are unhealthy, they will not get liquidated since the `reinit()` function is executed only once per block. As a result, the `reinit()` function can liquidate at most one unhealthy position in each block, even if multiple positions within the heap are unhealthy. Although liquidators can directly trigger the liquidation of any unhealthy position in the system by utilizing `receivePosition()`, this design presents potential challenges in scenarios where liquidators are absent and price changes rapidly. If the unhealthy position fails to be liquidated timely, the system may incur bad debt.
Report ↗Smart contracts often have `owner` variables to designate the person with special privileges to modify the smart contract. If a malicious user compromises or controls the contract owner, sensitive functionality can be exploited. The following are all instances of functionality restricted to the contract owner or a privileged role: * Only the `owner` address of the `MarginlyFactory` contract can: * call `MarginlyFactory.createPool()`, deploying new pools with specified `MarginlyParams` and linked with a specific Uniswap pool. * call `MarginlyFactory.changeSwapRouter()`, replacing the existing swap router. A replacement with a malicious swap router could drain all input tokens from the protocol users' requested swaps. * call `MarginlyFactory.setOwner()`, transferring the contract ownership to any address, including the zero address. * Only the factory `owner` can * call `MarginlyPool.setParameters()` at all times, which can potentially severely misconfigure the pool. Updated values include the maximum leverage, the TWAP configuration, the basic interest rate, the fee ("close debt fee") and swap fee, the slippage thresholds, the minimum size of a position, and the discussed `quoteLimit`. * call `MarginlyPool.shutdown()`, shutting down the pool and setting it to the proper emergency mode when either long's or short's collateral is exceeded by its respective debt. * call `MarginlyPool.sweepETH()`, receiving all the protocol's ETH. It should be noted that the internal base asset is not expected to be ETH but WETH, so it does not enable the withdrawal of core protocol pool assets. * Only the `owner` role of the `MarginlyRouter` contract can: * call `RouterStorage.addDexAdapters()`, enabling the addition and overwriting of swap adapters, i.e., intermediary contracts that settle the swap requests. A compromised adapter could forward to-be-swapped funds to arbitrary addresses. * Only the `owner` role of the specific adapters in use can: * call `AdapterStorage.addPools()`, where new pools can be added or existing pools overridden for a certain DEX adapter. A malicious address added as a pool could forward to-be-swapped funds to arbitrary addresses. Furthermore, the Marginly team is expected to take over slippage-exceeding liquidations in turbulent market conditions. If this would not happen, the pool could become insolvent.
Report ↗Marginly pools rely on Uniswap V3 pools as TWAP oracles to perform calculations related to position health, system leverage, pool balance limits, etc. As a result, the resistance of TWAP oracles to manipulation is critical to the system, as manipulated prices can have significant consequences for both the system and its users. This issue highlights the potential risks associated with utilizing Uniswap V3 TWAP oracles: 1. Uniswap V3 pools with low liquidity are more susceptible to manipulation, as attackers require less capital to influence prices. Since protocol admins can create Marginly pools using Uniswap V3 pools of different fee tiers, they should be cautious when selecting fee tiers associated with pools with less liquidity. 2. The design of concentrated liquidity of Uniswap V3 pools can make TWAP manipulations more cost-efficient as liquidity concentrated within specific price ranges may reduce the costs caused by price slippage. 3. The presence of multi-block MEV introduces risks of TWAP manipulation. As block producers, attackers can leverage control over consecutive blocks, thereby increasing the ease of price manipulation and avoiding the risk of being arbitrated by external actors. 4. An insufficient TWAP period may make the calculated prices more susceptible to manipulation.
Report ↗The reports name a repository or files. Open a report to see its scope.
Trustblock holds 2 public audit reports for Levva Protocol, dated 11 Oct 2023 to 25 Apr 2024. The latest is by Quantstamp (“Levva Updates and Oracle Feature”).
Quantstamp wrote the 2 reports Trustblock holds for Levva Protocol.
3 findings are still open or acknowledged in the firms’ reports: 3 low (all acknowledged). No critical finding is reported. Statuses are the security firms’ own.
Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.
Tell us