manage call as Earn, with a PENDLE_PT venue.
Before you start
- An API key. See the Quick Start.
- An Earn Account for the user on the chain you want, holding the token to spend, such as USDC. See Create an Account and Fund an Account.
1. Find a market
Each Pendle market has an underlying asset, a maturity date and an implied APY, the fixed rate a new buyer gets today:market_address (what you pass when depositing), underlying_symbol, implied_apy (a percentage) and expiry (a Unix timestamp). Filter with underlying_symbol or min_tvl_usd.
2. Deposit
Spend 100 USDC from the user’s Earn Account on the PT of a market:
The user signs
transaction and sends it. The PT sits in the Earn Account until maturity, or until the user sells.
3. Track the position
pendle_pt. Each has pt_balance, expiry, usd_value, the market’s current implied_apy, and a pnl block. The user’s own rate was fixed by the price they paid. implied_apy is today’s rate for new buyers, so show it as a market rate, not as the user’s return.
4. Withdraw
Callmanage with action: "WITHDRAW", the same market_address, and amount set to the number of PT to sell. Leave out venue.token. The payout is always USDC, sent to the Earn Account:
- Before maturity, the PT is sold at the current market price, so the user gets less than face value.
- At or after maturity, the PT is redeemed at full value.
transfer. See Withdraw Funds.
Good to know
- The rate is fixed only if held to maturity. Show the maturity date next to the rate, and tell users that an early exit is at market price.
- Markets expire. Pick markets with enough time left for your product, and give users a way to move into a new market once one matures.
- PnL is measured in the market’s yield units (
SY), not USD. Useusd_valuefor a dollar figure. See How Yield Accrues.
Endpoints
Next
Earn
Variable yield from Aave, Morpho and Euler.
Embedded Fees
Earn a fee on every deposit or withdrawal.
Gas Sponsorship
Pay gas for your users so they never need ETH.