Spectra Skill
Yield trading on Spectra Finance - split yield-bearing tokens into PT (Principal) and YT (Yield).
/spectra, "yield trading", "principal token", "pt stxrp"
Quick Command
node skills/spectra/scripts/spectra.js <command> [options]
Subcommands
| Command |
Description |
status |
Pool stats, APY, TVL |
balance [address] |
Check PT/YT/LP balances |
pools |
List all Spectra pools on Flare |
deposit <amount> <pool> |
Deposit IBT → get PT + YT |
swap <from> <to> <amount> |
Swap PT ↔ IBT in pool |
lp add <amount> <pool> |
Add liquidity |
lp remove <amount> <pool> |
Remove liquidity |
Pools on Flare
stXRP Pool (Maturity: Mar 05, 2026)
| Token |
Address |
| Pool (LP) |
0xa65a736bcf1f4af7a8f353027218f2d54b3048eb |
| PT |
0x097Dd93Bf92bf9018fF194195dDfCFB2c359335e |
| YT |
0x46f0C7b81128e031604eCb3e8A7E28dd3F8A50C9 |
| IBT (stXRP) |
0x4C18Ff3C89632c3Dd62E796c0aFA5c07c4c1B2b3 |
| Underlying |
FXRP |
sFLR Pool (Maturity: May 17, 2026)
| Token |
Address |
| Pool (LP) |
0x5d31ef52e2571294c91f01a3d12bf664d2951666 |
| PT |
0x14613BFc52F98af194F4e0b1D23fE538B54628f3 |
| IBT (sw-sFLR) |
0xB9003d5bEd06afD570139d21c64817298DD47eC1 |
| Underlying |
WFLR |
Yield Trading Concepts
- PT (Principal Token): Redeemable 1:1 for underlying at maturity. Trades at discount = fixed yield.
- YT (Yield Token): Receives all yield until maturity. High leverage on yield.
- IBT (Interest Bearing Token): The yield-bearing asset (stXRP, sFLR).
- Pool: Curve-style AMM for PT ↔ IBT swaps.
Key Interfaces
PT Token (ERC-4626 style)
function depositIBT(uint256 ibts, address ptReceiver, address ytReceiver) returns (uint256)
function redeemForIBT(uint256 shares, address receiver, address owner) returns (uint256)
function previewDepositIBT(uint256 ibts) view returns (uint256)
Pool (Curve-style)
function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy) returns (uint256)
function add_liquidity(uint256[2] amounts, uint256 min_mint) returns (uint256)
function remove_liquidity_one_coin(uint256 amount, int128 i, uint256 min) returns (uint256)
function get_dy(int128 i, int128 j, uint256 dx) view returns (uint256)
// coins: [0] = stXRP (IBT), [1] = PT
Usage Examples
# Check pool stats
/spectra status
# Check your balances
/spectra balance
# Deposit 10 stXRP → get PT + YT
/spectra deposit 10 stxrp
# Swap 5 PT for stXRP
/spectra swap pt stxrp 5
# Add 10 stXRP to LP
/spectra lp add 10 stxrp
Routing Guide
Don't use when...
- Staking FLR for sFLR (use
/sflr)
- Managing LP positions (use
/lp)
- Simple token swaps (use
/swap)
Use when...
- Trading yield on Spectra Finance (PT/YT tokens)
- Splitting yield-bearing tokens into principal and yield
- Checking Spectra pool APY and TVL
Edge Cases
- stXRP pool maturity: Mar 05, 2026 — PT redeemable 1:1 after
- sFLR pool maturity: May 17, 2026
- PT trades at discount before maturity (discount = fixed yield)
- YT value decays to 0 at maturity — time-sensitive
Success Criteria
- Status shows pool APY, TVL, and maturity countdown
- Deposit returns PT + YT token amounts
- Swap executes in Curve-style AMM with expected slippage
1---2name: spectra3description: Spectra Finance yield trading. Split yield-bearing tokens (sFLR, stXRP) into PT (principal) and YT (yield). Triggers on "/spectra", "spectra finance", "yield trading", "principal token", "pt token".4---56# Spectra Skill78Yield trading on Spectra Finance - split yield-bearing tokens into PT (Principal) and YT (Yield).9- `/spectra`, "yield trading", "principal token", "pt stxrp"1011## Quick Command1213```bash14node skills/spectra/scripts/spectra.js <command> [options]15```1617## Subcommands1819| Command | Description |20|---------|-------------|21| `status` | Pool stats, APY, TVL |22| `balance [address]` | Check PT/YT/LP balances |23| `pools` | List all Spectra pools on Flare |24| `deposit <amount> <pool>` | Deposit IBT → get PT + YT |25| `swap <from> <to> <amount>` | Swap PT ↔ IBT in pool |26| `lp add <amount> <pool>` | Add liquidity |27| `lp remove <amount> <pool>` | Remove liquidity |2829## Pools on Flare3031### stXRP Pool (Maturity: Mar 05, 2026)32| Token | Address |33|-------|---------|34| Pool (LP) | `0xa65a736bcf1f4af7a8f353027218f2d54b3048eb` |35| PT | `0x097Dd93Bf92bf9018fF194195dDfCFB2c359335e` |36| YT | `0x46f0C7b81128e031604eCb3e8A7E28dd3F8A50C9` |37| IBT (stXRP) | `0x4C18Ff3C89632c3Dd62E796c0aFA5c07c4c1B2b3` |38| Underlying | FXRP |3940### sFLR Pool (Maturity: May 17, 2026)41| Token | Address |42|-------|---------|43| Pool (LP) | `0x5d31ef52e2571294c91f01a3d12bf664d2951666` |44| PT | `0x14613BFc52F98af194F4e0b1D23fE538B54628f3` |45| IBT (sw-sFLR) | `0xB9003d5bEd06afD570139d21c64817298DD47eC1` |46| Underlying | WFLR |4748## Yield Trading Concepts4950- **PT (Principal Token)**: Redeemable 1:1 for underlying at maturity. Trades at discount = fixed yield.51- **YT (Yield Token)**: Receives all yield until maturity. High leverage on yield.52- **IBT (Interest Bearing Token)**: The yield-bearing asset (stXRP, sFLR).53- **Pool**: Curve-style AMM for PT ↔ IBT swaps.5455## Key Interfaces5657### PT Token (ERC-4626 style)58```solidity59function depositIBT(uint256 ibts, address ptReceiver, address ytReceiver) returns (uint256)60function redeemForIBT(uint256 shares, address receiver, address owner) returns (uint256)61function previewDepositIBT(uint256 ibts) view returns (uint256)62```6364### Pool (Curve-style)65```solidity66function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy) returns (uint256)67function add_liquidity(uint256[2] amounts, uint256 min_mint) returns (uint256)68function remove_liquidity_one_coin(uint256 amount, int128 i, uint256 min) returns (uint256)69function get_dy(int128 i, int128 j, uint256 dx) view returns (uint256)70// coins: [0] = stXRP (IBT), [1] = PT71```7273## Usage Examples7475```bash76# Check pool stats77/spectra status7879# Check your balances80/spectra balance8182# Deposit 10 stXRP → get PT + YT83/spectra deposit 10 stxrp8485# Swap 5 PT for stXRP86/spectra swap pt stxrp 58788# Add 10 stXRP to LP89/spectra lp add 10 stxrp90```919293---9495## Routing Guide9697### Don't use when...98- Staking FLR for sFLR (use `/sflr`)99- Managing LP positions (use `/lp`)100- Simple token swaps (use `/swap`)101102### Use when...103- Trading yield on Spectra Finance (PT/YT tokens)104- Splitting yield-bearing tokens into principal and yield105- Checking Spectra pool APY and TVL106107### Edge Cases108- stXRP pool maturity: Mar 05, 2026 — PT redeemable 1:1 after109- sFLR pool maturity: May 17, 2026110- PT trades at discount before maturity (discount = fixed yield)111- YT value decays to 0 at maturity — time-sensitive112113### Success Criteria114- Status shows pool APY, TVL, and maturity countdown115- Deposit returns PT + YT token amounts116- Swap executes in Curve-style AMM with expected slippage