Version 17 - mainnet - 0xcf...dfd6ae
Readme
Versions
17
Dependencies
0
Dependents
0
Analytics
On the way
Kai Single Asset Vault (SAV) is a sophisticated vault system that accepts deposits of a single asset type and distributes funds across multiple yield-generating strategies. It provides automated rebalancing, fee management, time-locked profit distribution, and comprehensive risk management features for optimal yield optimization.
The Kai SAV Core provides a robust framework to:
The project is organized into several key modules:
kai_sav::vaultkai_sav::time_locked_balanceThe core includes several strategy implementations that integrate with external DeFi protocols:
Scallop Protocol Strategies
Strategies integrating with the Scallop Protocol, including:
kai_sav::scallop_sui_proper for SUI staking pools,kai_sav::scallop_whusdce for whUSDC.e pools,kai_sav::scallop_whusdte_proper for whUSDT.e poolskai_sav::kai_leverage_supply_pool
Strategy that deposits into supply pools whose funds are then used to power leveraged LP positions.
The vault supports multiple concurrent strategies, each with:
The system continuously monitors strategy allocations and automatically rebalances to maintain target weights:
Profits are distributed gradually over time to prevent manipulation:
Comprehensive risk controls include:
Create a vault with a specific yield token type:
let lp_treasury = coin::create_currency<YSUI>(ctx);
let admin_cap = vault::new<SUI, YSUI>(lp_treasury, ctx);
Add strategies to the vault:
let vault_access = vault::add_strategy(&admin_cap, &mut vault, ctx);
strategy::join_vault(&vault_admin_cap, &mut vault, &strategy_admin_cap, &mut strategy, ctx);
Users deposit assets and receive yield tokens:
// Deposit
let yield_tokens = vault.deposit(deposit_balance, ctx);
// Withdraw
// Example: Withdrawing from a vault with a joined kai_leverage_supply_pool strategy
// Assume `vault` has a kai_leverage_supply_pool strategy already joined.
// User initiates a withdrawal by burning yield tokens (LP tokens) for a withdraw ticket.
let mut withdraw_ticket = vault.withdraw(yield_tokens, &clock);
// The strategy must process the withdrawal ticket and withdraw the required amount from the supply pool.
strategy.withdraw(
&mut withdraw_ticket, // the withdraw ticket from the vault
&mut supply_pool, // the supply pool the strategy manages
&clock, // current clock
);
// After all strategies have processed the ticket, the user redeems the ticket to receive their withdrawn balance.
let withdrawn_balance = vault.redeem_withdraw_ticket(withdraw_ticket);
You can install this package in your Move project by calling
mvr add @kai/savSingle Asset Vault implementation for Kai Finance.
dev@kunalabs.io