csLYD Architecture

csLYD (cSigma Liquid Yield Dollar) is a yield-bearing token at the core of the Edge platform, offering liquid exposure to diversified onchain DeFi strategies with near-instant redemption. It complements csUSD by focusing entirely on crypto-native yield sources, enabling users to earn yield directly through the token’s exchange rate. When users deposit supported stablecoins (currently USDC and USDT) into Edge, they receive csLYD, representing their proportional ownership of the csLYD vault’s assets. As DeFi strategies accrue yield, the value of csLYD increases.


Architecture Components

The csLYD protocol is composed of the following smart contract modules:

  1. ERC-7575 Sub-Vaults

  2. Share Token (csLYD ERC-20)

  3. Fund Manager

  4. Asset Oracle

  5. Withdraw Managers (per Sub-Vault)

  6. Router (Cross-Chain Bridge)

1. ERC-7575 Sub-Vaults

  • One sub-vault is deployed for each underlying asset type:

    • USDC Vault

    • USDT Vault

  • Sub-vaults manage deposits, withdrawals, and accounting for that specific asset

  • Yield from all sub-vaults is aggregated into the csLYD token

Benefits of ERC-7575:

  • Native support for multiple assets within a single vault system

  • Interoperable with DeFi protocols

  • Standardized accounting and share minting

How to Mint:

How to Redeem:

  • Maintain optimal reserve ratios for instant withdrawals

  • Diversify lending to reduce counterparty risk

  • Rebalance between sub-vaults if necessary


4. Asset Oracle

The Csigma Asset Oracle is a critical component of the csLYD ecosystem. It provides real-time asset pricing, valuation, and conversion logic for supported stablecoins (e.g., USDC, USDT) using trusted price feeds.

Purpose

  • Tracks and manages all supported assets and their associated Chainlink USD price feeds.

  • Calculates accurate USD values for underlying assets across csLYD sub-vaults.

  • Provides exchange rate and conversion logic between underlying assets and csLYD are tokens.

  • Enforces strict price bounds and staleness checks to protect against faulty or manipulated price data.

Key Features

  1. Supported Assets Registry

    • Each asset has:

      • Pool address where it is deployed.

      • Chainlink price feed.

      • Decimals for both token and price feed.

      • Price bounds (lowerBound, upperBound) for peg stability.

      • Validity period for price freshness.

  2. Price Retrieval

    • Fetches latest price from Chainlink oracles.

    • Normalizes to 18 decimals.

    • Optionally enforces bounds for stricter price safety.

    • Rejects stale data beyond configured validity period.

  3. Total USD Valuation

    • Aggregates the USD value of all supported assets held across sub-vault pools.

    • Used to determine the csLYD exchange rate.

  4. Exchange Rate Calculation

    • exchangeRate() = totalAssetsUSD / csLYD totalSupply

    • Ensures fair share token pricing based on actual reserves.

  5. Conversion Functions

    • convertToShares(token, assets) → Estimates how many csLYD a deposit will mint.

    • convertToAssets(token, shares) → Estimates how much of an underlying token a csLYD redemption will return.

  6. Role-Based Access Control

    • DEFAULT_ADMIN_ROLE → Full control over upgrades and role assignments.

    • ROLE_MANAGER → Can add/remove assets, update price ranges.

Cross-Module Role

The Asset Oracle is consumed by:

  • Sub vaults → To value deposits and withdrawals in USD terms.

  • Withdraw Managers → To calculate fair redemption amounts.

  • Frontend UI → To display accurate AUM and exchange rates to users.

Example Flow

  1. User Deposits USDC

    • Oracle fetches USDC/USD price from Chainlink.

    • Value normalized to 18 decimals.

    • Converted to USD amount → csLYD minted accordingly.

  2. User Redeems csLYD

    • Oracle calculates USD value of csLYD shares.

    • Converts back to underlying stablecoin amount at current oracle price.

    • Amount returned to user.

Security Measures

  • Bounds Enforcement: Rejects prices outside a configured peg range (e.g., ±1%).

  • Staleness Checks: Rejects oracle prices older than the validity period.

  • Upgradeable via UUPS: Allows protocol improvements while retaining security.


5. Withdraw Managers (per Sub-Vault)

  • One Withdraw Manager is assigned to each sub-vault (USDC, USDT)

  • Handles withdrawal requests when immediate liquidity is insufficient

  • Implements FIFO queue to ensure fairness

  • Continues to accrue yield on queued withdrawals until fulfillment

Key Functions:

6. Router (Cross-Chain Bridge)

  • Integrates with LayerZero and Stargate to support deposits and withdrawals across multiple chains.

  • Bridges both underlying stablecoins and csLYD share tokens.

  • Ensures seamless user experience regardless of origin or destination chain.

Cross-Chain Deposit Flow

  1. User deposits USDC/USDT on Source Chain

  2. Tokens bridged to target chain via Stargate

  3. Deposit executed in corresponding sub-vault

  4. csLYD minted to user wallet on target chain

Cross-Chain Withdrawal Flow

  1. User initiates withdrawal on source chain

  2. csLYD tokens burned, underlying assets released

  3. Assets bridged to user’s target chain

  4. Delivered in chosen stablecoin (USDC or USDT)

Last updated