Skip to content

Latest commit

 

History

History
124 lines (88 loc) · 3.17 KB

File metadata and controls

124 lines (88 loc) · 3.17 KB

LiYield Architecture

Definition

LiYield is a prototype that combines two layers:

  • an ETF-style vault that mints liYIELD
  • a Yield Swap market that uses liYIELD as collateral to trade realized yield over a term

Product Model

1. ETF Layer

The ETF layer wraps a basket of yield sources behind a single vault entrypoint:

  1. Users deposit underlying assets into LiYieldVault
  2. The vault mints liYIELD
  3. The keeper selects target pools according to strategy rules
  4. Treasury capital is deployed off-chain
  5. The server records snapshots, ETF price points, and composition

The default strategy in this repo is a weekly top-3 APY model:

  • rank pools by trailing 7-day yield
  • select the top 3
  • weight them equally
  • exit pools that fall out of the top set on rebalance

2. Yield Swap Layer

The Yield Swap layer is about future strategy yield, not ETF spot price.

  • liYIELD is the collateral asset
  • traders open fixed-vs-floating yield positions
  • longs receive floating realized yield and pay fixed
  • shorts receive fixed and pay floating realized yield

This gives liYIELD a second use case beyond passive exposure:

  • directional views on future yield
  • hedging future yield compression
  • relative-value yield trading

System Roles

User

  • deposits into the vault
  • holds liYIELD
  • uses liYIELD as collateral in the swap market

Vault

  • holds underlying assets
  • mints and burns liYIELD
  • tracks idle and deployed accounting

Keeper

  • reads ETF strategy configuration
  • generates allocation and rebalance plans
  • executes or simulates deployment flows
  • reconciles external execution results back into accounting

Oracle / Market Oracle / Term Manager

  • produce valuation reports
  • publish settlement or target/position values
  • update mark rates and collateral price
  • manage term lifecycle and related on-chain configuration

Server

  • exposes APIs for the web app and operators
  • persists snapshots, price history, keeper runs, oracle reports, and managed terms
  • runs background schedulers

Main Data Flows

ETF Flow

User deposit
  -> LiYieldVault
  -> mint liYIELD
  -> keeper selects targets
  -> treasury deployed to Earn targets
  -> server refreshes snapshots and ETF price
  -> web reads composition and price history

Yield Swap Flow

liYIELD collateral
  -> YieldSwapMarket
  -> mark rate updates during the term
  -> realized yield published at maturity
  -> SettlementIndex provides settlement input
  -> positions settle against LP / reserve / insurance

What The Repo Already Covers

  • vault share token and core accounting
  • top-3-yield strategy skeleton
  • ETF snapshots and price history
  • keeper, oracle, market oracle, and term schedulers
  • minimal Yield Swap contracts
  • term-based market state, valuation, and settlement flow

What Is Still Missing For Production

  • stronger quoting and risk services
  • fuller liquidation monitoring and controls
  • multi-source oracle security, quorum, and dispute flows
  • more robust database and job orchestration infrastructure
  • full user transaction flows in the web app

Related Docs