Protocol overview
High-level overview of the Levva protocol
Last updated
High-level overview of the Levva protocol
Last updated
Levva vaults allow people to provide liquidity and earn on-chain interest passively. Levva vaults are noncustodial and immutable. Anyone can deploy a vault. Anyone can manage a Vault. Anyone can enter or exit Levva vaults at their own discretion. Levva vaults have a flexible access control system; they can be operated by asset managers, crypto-native risk experts, funds, and AI-enabled assistants.
Levva Vaults are permissionless ERC4626-compliant entities represented by blockchain smart-contracts. Each vault controls a single loan asset (for example, USDC, ETH, or WBTC). Vaults, in turn, are connected to various Levva markets (pools) and DeFi protocols. Vaults are diversified smart portfolios.
Levva pools are isolated two-sided money markets where pool tokens act as collateral and debt against one another. Levva pools track and liquidate borrower positions automatically and distribute liquidation surplus back to liquidity providers. Levva pools are enhanced with built-in oracles based on Uniswap, Curve, Pendle, Pyth, and Chainlink feeds. Pools connect to corresponding DEX-es for trading via adapters.
Levva's Vaults and Pools connect to different DeFi protocols and are able to trade on 3rd party DEX-es. These connections are represented by special-purpose smart contracts called adapters. Adapters provide interfaces to DEX swap methods and to lending and staking protocol methods stake/unstake methods. Levva's router, in turn, acts as an orchestrator and can interact with multiple adapters in a single transaction.
Oracles play a crucial role in Levva ecosystem. Oracles provide balance prices for Levva pools to control user margin positions and their risks. Oracles also track asset prices for vaults to correctly value their portfolios. This is important for correct performance measurements, calculation of various fees, and user shares in pooled liquidity. In Levva we use Euler Price Oracle The Euler Price Oracle is a sophisticated price aggregation and validation system designed for DeFi applications. It combines multiple price sources to deliver reliable asset valuations for Levva vaults and pools. It employs a modular architecture with components like the Oracle Router (which delegates pricing queries to appropriate oracles). It supports specialized oracles like TWAPs that implement time-weighted averaging to smooth out volatility and protect against manipulation attempts. Levva uses TWAP oracles inside its lending pools.
Levva controls risk at both a vault and a pool level. Vaults are all about portfolio allocations and diversification, so asset limits, protocol whitelists, and access controls are located here. Pools relate closely to trading, borrowing, and lending. Pools should control liquidity and liquidation risks. Flexible pool parameters allow us to control maximum leverage, interest rates, slippage tolerance, and balance price averaging window size parameters, among others.
This is another piece of software that monitors portfolio weights and performs automatic portfolio rebalancing when certain thresholds or allocation levels are violated. All of the allocation weights, slippage tolerance, and available assets to invest in are configured on-chain on a vault level. The allocation engine operates within these on-chain defined boundaries at all times and can't perform unauthorised actions or invest in non-whitelisted assets.
Since Levva vaults are permissionless in nature, anyone can deploy a vault and pick a risk manager, who will identify an asset universe to invest in and the weights or limits for each asset.
Levva protocol runs in-house vaults which represent certain investment strategies. Allocation weights in these vaults are identified by solving an off-chain optimisation problems with objectives to maximize portfolio Geometric Mean and Sharpe Ratio.
The risk engine is a software module that monitors the health of margin positions in Levva pools, triggers margin calls, and liquidates customer positions should this be required.
This logic is running off-chain and has permissions to perform the required operations on-chain. As it reaches maturity, the risk-engine will become an oracle and relayer network storing data on a data-availability layer with a fully on-chain liquidation market.
Our AI agent helps Levva handle autonomous interactions with its customers. Levva's agent interacts with Levva users through Levva's UI. Levva's agent displays consistent behavior when talking to users by maintaining a rich context about market data and per-customer conversation history. To provide Levva's agent with all the required information, we additionally gather and store historical asset prices, correlations, volatility levels, all user conversations (encrypted for privacy). Additionally, Levva's AI agent is fully aware of the protocol risk framework. The agent operates across a universe of well-defined risk-related scenarios, taking into account the combination of the following factors:
Token price movements
Protocol interest rate changes
Liquidity pool depth changes
Smart contract risk events
Oracle price deviation events
Levva's AI agent is capable of managing Levva's vaults semi-autonomously. To achieve this we enhance the agent with proper access controls and automatic secret rotation and encryption.
The bright future we envision is when every Levva customer has personalised AI agent which manages user-centric portfolio-vault.