Documentation Index
Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt
Use this file to discover all available pages before exploring further.
Looking for Contributors! This Skill needs an implementation.Contributing a Skill involves:
- Writing a reference implementation with full functionality
- Adding comprehensive tests
- Writing documentation with usage examples
See the ethers-provider Skill for an example of a complete Skill implementation.Interested? Open an issue or PR at github.com/evmts/voltaire.
Skill — Copyable reference implementation. Use as-is or customize. See Skills Philosophy.
Tokenize and trade yield with Pendle’s PT (Principal Token) and YT (Yield Token) system.
Planned Implementation
Tokenize Yield
import { Pendle } from './Pendle.js';
const pendle = Pendle({ provider, router: PENDLE_ROUTER });
// Mint PT and YT from yield-bearing asset
await pendle.mintPyFromToken({
receiver: userAddress,
yt: YT_ADDRESS,
tokenIn: STETH,
amountIn: parseEther('10'),
signer,
});
Trade PT/YT
// Buy PT (fixed yield)
await pendle.swapExactTokenForPt({
receiver: userAddress,
market: MARKET_ADDRESS,
tokenIn: WETH,
amountIn: parseEther('1'),
slippage: 0.01,
signer,
});
// Sell YT
await pendle.swapExactYtForToken({
receiver: userAddress,
market: MARKET_ADDRESS,
amountYtIn: ytBalance,
tokenOut: WETH,
slippage: 0.01,
signer,
});
Redeem at Maturity
// Redeem PT after maturity
await pendle.redeemPyToToken({
receiver: userAddress,
yt: YT_ADDRESS,
amountPy: ptBalance,
tokenOut: UNDERLYING,
signer,
});
Resources