factor_swap_pendle
Swap tokens to or from Pendle Principal Tokens (PT) and Yield Tokens (YT) via a Factor vault; use 'all' to swap an entire vault balance.
Instructions
Swap between tokens and Pendle Principal Tokens (PT) or Yield Tokens (YT) via a Factor vault. Directions: tokenToPT, tokenToYT, ptToToken, ytToToken. For tokenToPT and tokenToYT, "all" swaps entire vault balance.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"vaultAddress": "<vaultAddress>",
"marketAddress": "<marketAddress>",
"direction": "<direction>",
"tokenAddress": "<tokenAddress>",
"amount": "<amount>"
},
"name": "factor_swap_pendle"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount in base units (wei), or "all" for tokenToPT/tokenToYT to swap entire balance | |
| password | No | Wallet password if encrypted | |
| direction | Yes | Swap direction: tokenToPT, tokenToYT, ptToToken, ytToToken | |
| approxParams | No | Optional approximation parameters from Pendle API for better execution | |
| tokenAddress | Yes | The token address (input token for tokenToPT/tokenToYT, output token for ptToToken/ytToToken) | |
| vaultAddress | Yes | The vault contract address | |
| marketAddress | Yes | The Pendle market address |