Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Yield Vault

Who it's for: Anyone holding cGHS who wants their idle money to grow — from a small business owner keeping working capital to an individual saving between group cycles. Why it matters: Instead of sitting idle, deposited cGHS is put to work funding loans and generating real yield, with no lock-up and no minimum balance.

The Yield Vault is a savings vault within the ShikaLending Diamond. Users deposit cGHS and receive shares that appreciate as the lending pool earns interest.

POST /yield/deposit

Deposit cGHS and receive vault shares.

Request
{
  "userAddressId": "wallet-uuid",
  "userAddress": "0xabc...",
  "stablecoin": "0x3126627A607E730E3eCF9BbfFD67fa18Deaab846",
  "assets": "100000000"
}

Transaction batch: [approve(lendingDiamond, assets), deposit(stablecoin, assets)]

Response
{ "id": "d1-uuid", "status": "pending" }

On confirmation the workflow decodes Deposited(depositor, stablecoin, assets, shares) and records the shares received.


POST /yield/withdraw

Burn shares and receive cGHS back.

Request
{
  "userAddressId": "wallet-uuid",
  "userAddress": "0xabc...",
  "stablecoin": "0x3126627A607E730E3eCF9BbfFD67fa18Deaab846",
  "shares": "99800000"
}

No token approval needed — the vault burns the caller's shares directly.


Read Endpoints

GET  /yield/balance/:address?stablecoin=0x...
     → { shares, assets }
 
GET  /yield/preview/deposit?stablecoin=0x...&assets=100000000
     → { shares }
 
GET  /yield/preview/withdraw?stablecoin=0x...&shares=99800000
     → { assets }
 
GET  /yield/exchange-rate?stablecoin=0x...
     → { rate, precision }
 
GET  /yield/total?stablecoin=0x...
     → { totalAssets, totalShares }

How Yield Accrues

Vault assets are deployed to the LendingPool as liquidity. Interest earned by borrowers flows back to vault depositors via the share exchange rate increasing over time:

At deposit:   1 share = 1.000000 cGHS
After 1 year: 1 share = 1.085000 cGHS (example, ~8.5% APY)