Comment on page
Kamino Lend Litepaper
As published in October 2023
This litepaper introduces Kamino Lend (K-Lend), a novel peer-to-pool borrowing primitive designed as foundational infrastructure to power complex financial products with leverage and automation, and as a decentralized matchmaker between borrowers and lenders.
K-Lend underpins Kamino 2.0, which is a fully integrated dApp unifying borrowers, lenders, and liquidity providers - allowing users to express more market views than ever before, and enabling them to participate throughout all phases of the market cycle.
K-Lend features a single liquidity market, rather than a multi-pool design. Within this market, K-Lend introduces an ‘eMode’ mechanism that enables higher leverage when lending/borrowing solely within a certain asset grouping.
Multi-pool designs have shown to be inefficient in lending protocols, fragmenting liquidity and ultimately leading to lower utilizations and lower yields for lenders. In practice, the primary benefit of a multi-pool design is that each isolated pool (i.e. different asset combinations) can have custom parameters, while separating risk from the main liquidity market.
However, K-Lend’s risk engine allows for risk isolation even within a unified liquidity market, while the protocol’s eMode infrastructure enables customized asset parameters within a single market.
Elevation Mode (first introduced in Aave V3 as Efficiency Mode) allows users to borrow highly correlated or soft-pegged assets at a more capital-efficient LTV ratio. Within K-Lend’s unified liquidity market, assets can be grouped into “elevation groups (eGroups)”. Each eGroup can have customized LTV parameters and liquidation thresholds assigned to it, ultimately unlocking higher leverage possibilities, as well as tailored liquidation parameters.
Crucially, elevation groups are built into the main liquidity market. All K-Lend users can thus access the unified liquidity market, while eMode empowers them to attain greater capital efficiency and higher leverage via customized asset parameters.
For instance, if all SOL and SOL LST tokens are grouped into an eGroup with a 95% max LTV, all the tokens will adopt 95% as their new max LTV. Any supply/borrowing within this asset grouping can then be done at this LTV, allowing for increased capital efficiency and leverage between these assets.
Elevation Mode Illustration
Combined with Kamino’s automation infrastructure, eMode also enables the platform to offer more powerful looping products than exist anywhere on Solana.
The growth of Uni V3 and concentrated liquidity as DeFi’s primary liquidity model has virtually stopped leveraged LPing in its tracks. This is because LP positions from CLMMs are non-fungible, and cannot easily be used as collateral nor levered up.
Kamino’s automated liquidity infrastructure already tokenizes CLMM LP positions. These positions, called kTokens, are fungible, easily liquidatable SPL tokens. K-Lend supports these kTokens as collateral, allowing users to use leverage by borrowing against / looping their LP positions.
Interest rate (IR) curves dictate supply and borrow rates based on an asset’s utilization rate. Interest rates are intended to keep markets at an equilibrium, while ensuring lenders are able to access their liquidity should they wish to withdraw capital. A multi-point IR curve reduces shocks to the system by more gradually increasing or decreasing rates when necessary.
With theoretically up to 11 points on its IR curve, K-Lend provides a major improvement over traditional 3-point curves in other lending markets. This is beneficial to borrowers who are subject to more gradual rate increases before repaying their debt.
Poly-linear Interest Rate Curve Illustration
On K-Lend, users can opt to keep their collateral assets from being borrowed by other users, thus protecting their assets from any borrower default risks.
Such assets, referred to as “Protected Collateral”, can still be used as collateral for borrowing by the depositor, but they do not earn interest on these assets. Protected collateral can be withdrawn at any time.
Each asset on Kamino Lend is subject to a deposit cap, ensuring that the system contains a safe amount of any asset at any given time based on the asset risk score, which takes into account various risk metrics, such as the available market liquidity, the volatility of the asset, the security risk of the asset etc. These caps are continuously monitored and are subject to readjustments if deemed necessary.
Similarly, borrow caps limit the borrowing of each asset to a certain amount, based on the asset risk score. This is continuously assessed and subject to change if deemed necessary.
Kamino’s auto-deleverage mechanism lowers the deposit and/or borrow caps of a certain asset to an amount that is deemed safe considering current market conditions. Lowering the caps thus triggers an automated unwinding event.
If an auto-deleverage event is triggered on USDH deposits for example, users are notified via Kamino’s communication channels, and given a specified period to adjust any positions using USDH as collateral. Once this period elapses, the system begins partial deleveraging of loans backed by USDH, starting with loans closest to liquidation.
Deleveraged loans incur a minor liquidation penalty which escalates continuously up to a maximum, until the target collateral/borrowing amount is achieved. Users subject to deleveraging will see a proportional reduction in the target asset, along with the corresponding tokens in the position, generally resulting in a more healthy Loan-to-Value (LTV) ratio.
A unified liquidity market offers considerable benefits to borrowers and lenders, but it also presents new challenges to risk management. Risk can easily spill over from one asset to another, ultimately increasing the risk of bad debt on the protocol. K-Lend will introduce Asset Tiers to ensure that users can borrow and lend a wide range of tokens safely, without fracturing liquidity between isolated pools.
A tier-based system allows the protocol to offer permissionless borrowing and lending for any token on Solana, with Kamino’s Risk Council determining the ways an asset can be used on the protocol, grading each asset into one of three categories: Isolated Debt, Isolated Collateral, and General.
Can be borrowed, but only in isolation from other assets. These assets cannot be used as collateral, but can be supplied for lending yield.
Can only be used as collateral, and only in isolation from other assets. Isolated Debt assets cannot be borrowed against Isolated Collateral.
Can be used as collateral to borrow other assets, and can be borrowed alongside other general assets. This will typically represent the most liquid assets on the network.
Asset Tier Illustration
Borrow factors (BFs) are risk-adjusted borrow values assigned to each asset on K-Lend. This determines the borrowing capacity of a debt asset within a loan, based on its Asset Risk Score.
This is parallel to loan-to-value ratios (LTVs), which indicate borrowing limits from the collateral asset perspective.
K-Lend combines LTV and BF to express a weighted borrowing capacity based on the asset composition of a position. This allows the protocol much more flexibility in assessing the risk of each position on the platform.
For example, let’s assume you want to supply $100 of SOL as collateral and borrow either USDC or BONK:
- SOL is a widely circulating collateral asset, and its maximum LTV ratio = 80%
- USDC is deemed a less risky asset than BONK.
- USDC Borrow Factor = 1
- BONK Borrow Factor = 2
- Borrow capacity is expressed as: (Collateral Amount * Collateral LTV) / Borrow Factor
- USDC borrow capacity against SOL = ($100 * 80%) / 1 = $80
- For BONK, due to a BF of 2, you can borrow up to $40.
Similar to the above expression of risk-adjusted borrowing capacity, the liquidation point of any loan is also calculated as a weighted expression of LTV and borrow factor.
In contrast with TradFi standards, DeFi platforms often provide users with limited tooling to help them understand, model and simulate position risk. Kamino has built a Risk Simulator that allows K-Lend users to view their position risk and simulate market movements.
The simulator shows the impact on portfolio value, LTV, liquidation delta, and more.
Oracles have historically been the most common attack vector for DeFi exploits. K-Lend’s oracle risk engine combines various risk practices such as heuristic and EWMA prices, while also maintaining its own oracles alongside those from other providers.
Similar to price bands, Time Weighted Average Prices (TWAP) and Exponentially Weighted Moving Average (EWMA) prices are resistant to price manipulations because they identify the average price of an asset over time.
Since K-Lend uses TWAPs and EWMAs, the protocol is protected from flash loans/flash crashes, as dramatic short term price changes are rejected. Exploiting the protocol via price manipulation is thus expensive, as it requires the exploiter not only to manipulate a price, but to sustain it for some period of time relative to the existing TWAP/EWMA intervals.
Each stable or soft-pegged asset in K-Lend has a price range within which the smart contract expects the price to fall within. This is referred to as the price-band, and alongside TWAP/EWMA, also protects the protocol from flash crashes and flash-loan exploits.
For example, USD-pegged stables like USDC and USDH could have a 1% upper or lower band from $1. In this case, if the price is above $1.01, the price would be rejected. For SOL-pegged assets, price bands would be expressed relative to the SOL price.
K-Lend cross-references oracles from both Pyth and Switchboard, as well as its own Switchboard oracles that ingest feeds from various on-chain and off-chain sources.
For kTokens, Kamino computes prices directly on-chain. Each kToken price is calculated atomically, based on various price sources and the current state of the strategy.
K-Lend introduces a range of improvements to the liquidation process; from encouraging greater liquidator participation, to softening the burden on borrowers.
Instead of liquidations closing a borrower’s position in its entirety, K-Lend enables soft liquidations that settle, for example, 20% of a user’s debt. In this scenario, users who are only slightly over the liquidation LTV are not severely punished - whereas users who far exceed the liquidation LTV can be liquidated to a greater degree.
Liquidation penalties have been traditionally high in DeFi to make up for low speeds, high gas fees, and network/market volatility. If a liquidator catches a falling knife and cannot liquidate those assets quickly, then they lose money. As a result, liquidation penalties have typically been 5-10% or more.
On K-Lend, liquidation penalties start at 2% and are capped at 10%. If the most efficient liquidators execute liquidations as soon as possible, borrowers are subject only to a 2% penalty. The liquidation penalty increases as the loan LTV increases, until the loan is liquidated. This system is designed to reward the most efficient liquidators, while simultaneously softening the blow to borrowers.
User A’s loan reaches the liquidation LTV of 80%. The liquidator triggers the liquidation shortly after the loan is eligible. The liquidator repays 20% of the debt and receives 20.4% (0.2 * 0.02) of User A’s collateral. User A now has less collateral, less debt, and a lower LTV, and their loan position remains active.
User B’s loan reaches the liquidation threshold of 80% LTV. The liquidator doesn't act instantly and the liquidation penalty rises to 10% as the loan reaches a 90% LTV. At that point the liquidator steps in and liquidates the position. He repays 20% of the debt and receives 22% (0.2 * 0.1) of User B’s collateral.