vanna-credit-layer (three Anchor programs) and vanna-credit-backend (the Next.js app) as they run on the hosted Surfpool mainnet fork.
The core knows no price source and no external protocol. Adding a protocol or a price source means a new file in the oracle or the validator, then an admin registration. The core is not redeployed.
Start with Architecture, Configured Accounts, and Math Reference.
Repository map
Current scope
- Lending pools for USDC, USDT and SOL. Lenders receive vTokens.
- One cross-margin account per wallet. Every allowed token in it counts toward one health factor.
- Collateral includes SOL, USDC, USDT, JitoSOL, JupSOL, JupUSD, the xStocks (NVDAx, GOOGLx, AAPLx, TSLAx), and receipt tokens from Kamino, Perena and the basis vaults.
- External calls through
margin_execute: Jupiter and Titan swaps, Kamino Lend supply / redeem, Phoenix perps (via Ember USDC ⇄ phUSD), Perena USD* vaults, and Vanna’s delta-neutral basis vaults. - Liquidation that is permissionless and partial, plus an admin write-off for dust bad debt.
There is no published SDK package. Copy the PDA helpers and instruction builders from
vanna-credit-backend/lib/solana or vanna-credit-layer/scripts/src.
