Skip to main content
Set up the Exponent Core SDK and walk through its complete lifecycle, from stripping yield assets into PT and YT, to collecting yield, and merging back.

Installation

Setup

1

Initialize a Yield Position

Before stripping, create a YieldTokenPosition account for your wallet. This is a one-time setup per vault.
YT is just an SPL token — the protocol can’t track yield for tokens sitting in your wallet. The YieldTokenPosition account escrows your YT and records the SY exchange rate at entry, which is needed to compute earned yield. ixStripFromBase automatically deposits YT into this position, so it must exist before stripping.
2

Strip Base Tokens into PT and YT

Use ixStripFromBase to convert a base asset directly into PT and YT. This wraps the base into SY, strips it into PT and YT, and deposits the YT into your yield position in a single atomic instruction.
If you already hold SY tokens, use vault.ixStrip() instead. It skips the base-to-SY wrapping step, but does not auto-deposit YT. In that case, call ytPosition.ixDepositYt() separately.
3

Stage Yield

Before collecting, stage yield. This computes earned interest and emissions based on the current SY exchange rate.
4

Collect Interest

After staging, collect earned interest, which is paid in SY tokens.
5

Withdraw YT

Before merging, withdraw YT from the yield position back to your wallet. The merge instruction burns YT directly from your token account.
6

Merge PT and YT Back to Base

When you’re ready to exit, merge PT and YT back into the base asset.

Reading State

Query vault and position state without sending transactions:

Next Steps

Vault Instructions

TypeScript SDK instruction functions for Exponent Core

YtPosition Instructions

TypeScript SDK instructions for managing yield positions

Read Functions

Read functions available for querying Core market state without submitting transactions.