Buy fixed yield (PT), go long variable yield (YT) and provide liquidity on Pendle protocol using the Compass SDK. No Solidity needed.
Install Dependencies
Set Environment Variables
Import Libraries & Environment Variables
Instantiate Required Clients
Query Active Markets
markets
function to query a list of active market on Arbitrum.Select a Market
markets[0]
. Consider things like implied yield,
maturity date and the underlying token when deciding which Pendle market to
transact with.Destructure Variables
position
function. We will use this function a number of times throughout the tutorial to keep track of our position balances in the market.
Check User Position
position
function.Check and Set Allowance
Buy PT
Check User Position
position
function.Check and Set Allowance
Sell PT
Check User Position
position
function.Check and Set Allowance
Buy YT
Redeem Claimable Yield
Check User Position
position
function.Check and Set Allowance
Sell YT
Check User Position
position
function.Check and Set Allowance
Add Liquidity
removeLiquidity
function, test with different Pendle markets, or explore
Compass
Bundler
to bundle transactions.