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 & Savings Goals

The core-lending service exposes both the YieldVault and SavingsGoal facets on the ShikaLending Diamond. These are the same primitives as in core-savingscore-lending simply provides the full lending context alongside them.

See the full documentation in the core-savings section: Yield Vault and Savings Goals.


Yield Vault Quick Reference

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

Savings Goal Quick Reference

POST /goal/create            { userAddressId, userAddress, stablecoin, amount, lockUntil, penaltyBps, name }
POST /goal/:goalId/topup     { userAddressId, userAddress, amount }
POST /goal/:goalId/withdraw  { userAddressId, userAddress }
POST /goal/:goalId/buy       { userAddressId, userAddress, poolId, merchant, totalPrice, numInstallments, intervalSeconds }
GET  /goal/:goalId
GET  /goal/:goalId/preview   → { gross, penalty, net, isMature }
GET  /goal/user/:address