Strategy

Pendle Finance Strategies for AI Agents: Fixed Yield and YT Speculation

March 6, 2026 18 min read Purple Flea Research

How AI agents use Pendle to split yield — buying fixed-rate PT, speculating with YT, providing AMM liquidity, and building structured rate products that outperform vanilla staking.

3x
YT leverage on yield
Fixed
PT guaranteed return
8+
Strategy components

1. Pendle Architecture: SY, PT, and YT

Pendle Finance solves a fundamental DeFi problem: yield-bearing assets bundle together principal and future yield into a single token, making it impossible to take differentiated views on rate movements. Pendle's architecture separates these components cleanly, creating three distinct token types from any yield-bearing asset.

The foundation is the Standardized Yield (SY) wrapper. SY tokens provide a unified interface for interacting with yield-bearing assets regardless of their underlying protocol. Whether you hold stETH, aUSDC, or rETH, SY wraps them in a consistent way that Pendle's system can understand. An SY token's exchangeRate() function always returns the current value of one SY in terms of the underlying asset.

From SY, Pendle mints two derivative tokens at a fixed expiry date:

The invariant is: 1 SY = 1 PT + 1 YT at all times. This atomic relationship prevents arbitrage between the three token types and ensures that any mispricing between PT and YT creates an immediate profit opportunity.

Protocol Stack

Pendle contracts: PendleRouter for swaps, PendleMarket for each maturity pool, PendleYieldContractFactory for minting PT/YT pairs, and individual PendleYieldToken contracts tracking accrued yield per holder.

Market Structure

Each Pendle market is defined by three parameters: the underlying SY token, the expiry date, and a scalar that controls AMM curve steepness. Markets run from inception to expiry, after which PT holders can redeem at par and YT holders receive their final yield distribution. Agents must track expiry carefully — holding YT to expiry that has already been factored into a high implied APY is a common alpha-destruction mistake.

2. Yield Tokenization Math

The mathematics of Pendle's system is straightforward once you understand the relationship between implied APY, PT price, and time to expiry.

If a PT trades at price p and expires in t years, the implied fixed APY is:

implied_APY = (1 / p) ^ (1 / t) - 1

For example: PT-stETH at 0.94 with 180 days to expiry:

t = 180 / 365 = 0.493 years
implied_APY = (1 / 0.94) ^ (1 / 0.493) - 1
           = (1.0638) ^ (2.028) - 1
           = 1.1315 - 1
           = 13.15% APY (fixed)

The YT price is simply the complement: YT_price = SY_price - PT_price. If SY = 1.00 and PT = 0.94, then YT = 0.06. This means you're paying 6 cents to receive the yield from 1 stETH for 180 days.

YT Breakeven Analysis

YT is only profitable if realized yield exceeds the implied yield baked into the PT price. The breakeven realized APY for YT holders:

breakeven_APY = YT_price / (t * SY_price)
             = 0.06 / (0.493 * 1.00)
             = 12.17% APY

# If stETH actually yields > 12.17%, YT is profitable
# If stETH yields < 12.17%, YT loses money

Key Insight

YT is a bet on realized yield EXCEEDING implied yield. PT is a bet on realized yield being BELOW implied yield, or simply wanting guaranteed fixed return regardless of rate direction.

Leverage Multiplier

YT offers implicit leverage. If stETH yields 15% against a 12.17% breakeven:

realized_yield_per_SY = 15% * 0.493 = 7.4% over period
YT_cost = 0.06
YT_return = 0.074 - 0.06 = 0.014 per YT
leverage = realized_return / cost = 0.074 / 0.06 = 1.23x on underlying
          = but vs. just holding SY: outperformance = +2.3%

3. PT Fixed-Rate Strategy

The PT fixed-rate strategy is the most capital-efficient approach for agents with surplus stablecoins or yield-bearing assets seeking predictable returns without rate risk. An agent buys PT at a discount and holds to maturity, earning the spread as guaranteed yield.

When to Execute

PT strategies are optimal in three environments:

Exit Before Expiry

PT can be sold back through the Pendle AMM before expiry, but the realized yield depends on exit price. If implied APY has dropped (PT price risen), the agent captures capital gains in addition to the accrued time value. This creates a bond-like structure agents can trade actively:

pt_trade_logic.py
def calculate_pt_pnl(entry_price, exit_price, days_held, face_value=1.0):
    """Calculate PT trade P&L"""
    # Capital gain/loss
    capital_pnl = exit_price - entry_price

    # Annualized yield captured
    holding_period = days_held / 365
    annualized_return = (exit_price / entry_price) ** (1 / holding_period) - 1

    # Compare to time-weighted implied yield at entry
    entry_implied = (face_value / entry_price) ** (1 / (days_held / 365)) - 1

    return {
        "capital_pnl": capital_pnl,
        "annualized_return": annualized_return,
        "entry_implied_apy": entry_implied,
        "trade_result": "profit" if capital_pnl > 0 else "loss"
    }

PT Rollover Strategy

Agents can maximize fixed-rate exposure by rolling PT positions: as one maturity approaches, sell and buy the next maturity. This maintains continuous fixed-rate exposure without reinvestment risk between periods. The optimal roll time is when the new maturity's implied APY exceeds the accrued annualized return of holding the current PT to expiry.

4. YT Leveraged Yield Speculation

YT tokens are one of DeFi's most interesting speculative instruments. They function like call options on yield rates — limited downside (the YT price), unlimited upside if yield spikes dramatically. Agents with strong rate forecasting capabilities can generate outsized returns with relatively small capital outlay.

YT Position Sizing

Because YT expires worthless if realized yield falls below breakeven, position sizing is critical. A standard approach:

yt_position_sizing.py
def size_yt_position(portfolio_value, conviction_score, max_yt_allocation=0.15):
    """
    Size YT position based on conviction score (0-1)
    conviction_score: 1.0 = very high confidence rates will rise
    """
    # Base allocation: never more than 15% of portfolio in YT
    base_alloc = portfolio_value * max_yt_allocation

    # Scale by conviction (0-1 maps to 0-100% of max allocation)
    position_size = base_alloc * conviction_score

    # Apply Kelly criterion approximation
    # Expected value: conviction * upside - (1-conviction) * downside
    upside_multiple = 3.0   # if yield spikes 3x above breakeven
    downside = 1.0          # total loss of YT premium

    kelly_fraction = (conviction_score * upside_multiple - (1 - conviction_score)) / upside_multiple
    kelly_size = portfolio_value * max(kelly_fraction, 0) * 0.5  # half-Kelly for safety

    return min(position_size, kelly_size)

Catalysts for YT Entry

Agents should monitor specific on-chain signals that precede yield spikes:

Risk Warning

YT tokens have a binary-like payout structure. Position sizing must reflect that the entire YT premium can be lost if realized yield falls below the implied APY at purchase. Never allocate more than 5-15% of a portfolio to speculative YT positions.

5. AMM Liquidity Provision

Pendle uses a custom AMM optimized for yield tokens, which behaves differently from standard constant-product AMMs. Understanding its mechanics is essential for agents providing liquidity without unwanted IL exposure.

Pendle's AMM Design

The Pendle AMM trades PT against SY (not PT against the underlying directly). The curve has two key parameters:

Unlike Uniswap, where IL is purely a function of price ratio change, Pendle's IL depends on both price movement AND time decay. Even if the PT price relative to SY stays constant, YT accrues value over time (yield distributions), which means the LP position value changes.

LP Return Components

lp_return_calc.py
def estimate_lp_returns(
    pool_tvl: float,
    daily_volume: float,
    fee_rate: float = 0.002,
    pendle_rewards_apr: float = 0.05,
    holding_period_days: int = 90
):
    """Estimate Pendle LP returns over holding period"""

    # Trading fee income
    daily_fees_per_tvl = (daily_volume / pool_tvl) * fee_rate
    fee_apr = daily_fees_per_tvl * 365

    # PENDLE token rewards (varies by pool)
    total_apr = fee_apr + pendle_rewards_apr

    # Approximate return over holding period
    period_return = total_apr * (holding_period_days / 365)

    # PT component also earns fixed yield while in LP
    # Approximate: half the position is in PT earning implied APY
    implied_pt_apr = 0.12  # example
    pt_component_return = 0.5 * implied_pt_apr * (holding_period_days / 365)

    total_period_return = period_return + pt_component_return

    return {
        "fee_apr": fee_apr,
        "total_base_apr": total_apr,
        "pt_component_return": pt_component_return,
        "estimated_period_return": total_period_return
    }

When to LP vs. Hold PT Directly

LP is superior to holding PT when:

Direct PT holding is superior when:

6. Implied APY Arbitrage

One of the most systematic strategies for agents is monitoring the spread between Pendle's implied APY and the actual on-chain yield of the underlying protocol. When the spread exceeds a threshold, a pure arbitrage exists.

The Arbitrage Mechanics

Consider stETH with a current 4% staking APY. If Pendle is implying 8% APY for the 90-day PT maturity, there's a 4% spread. An agent can capture this by:

  1. Minting PT+YT by depositing stETH into Pendle
  2. Selling YT immediately at the high implied APY (capturing premium)
  3. Holding PT to maturity for the fixed return
  4. Net result: PT fixed return + YT sale proceeds - stETH opportunity cost
implied_apy_arb.py
import asyncio
from web3 import AsyncWeb3

class PendleArbMonitor:
    def __init__(self, w3: AsyncWeb3, markets: list):
        self.w3 = w3
        self.markets = markets  # list of Pendle market contracts

    async def get_implied_apy(self, market_addr: str) -> float:
        """Fetch current implied APY from Pendle market"""
        market = self.w3.eth.contract(address=market_addr, abi=PENDLE_MARKET_ABI)
        state = await market.functions.readState(ROUTER_ADDR).call()
        # impliedRate is stored as a fixed-point integer
        implied_rate = state[3]  # index depends on ABI
        return implied_rate / 1e18  # normalize

    async def get_underlying_apy(self, sy_addr: str) -> float:
        """Get current on-chain yield of underlying asset"""
        sy = self.w3.eth.contract(address=sy_addr, abi=SY_ABI)
        exchange_rate_now = await sy.functions.exchangeRate().call()
        # Compare to 24h ago exchange rate to compute daily yield
        # ... (simplified — requires historical snapshot)
        return 0.04  # placeholder: 4% APY

    async def check_arb(self, market_addr: str, sy_addr: str, threshold=0.02):
        implied = await self.get_implied_apy(market_addr)
        actual = await self.get_underlying_apy(sy_addr)
        spread = implied - actual
        if spread > threshold:
            print(f"ARB OPPORTUNITY: implied={implied:.2%} actual={actual:.2%} spread={spread:.2%}")
            return True, spread
        return False, spread

    async def run(self):
        while True:
            for market_addr, sy_addr in self.markets:
                is_arb, spread = await self.check_arb(market_addr, sy_addr)
                if is_arb:
                    await self.execute_arb(market_addr, spread)
            await asyncio.sleep(60)  # check every minute

Cross-Expiry Rate Spread

Another arbitrage involves the same underlying asset across different expiry dates. If 3-month PT implies 12% APY but 6-month PT implies 8% APY, the term structure is inverted — an agent can buy 6-month PT (cheap) and sell 3-month PT short (expensive), neutralizing duration risk while capturing the 4% spread as it converges.

7. Portfolio Construction

Sophisticated agents build Pendle portfolios that combine multiple instruments to achieve target risk/return profiles. The key is understanding correlation between components.

InstrumentYield SourceRate RiskCapital ReqBest For
PT (hold to expiry)Fixed discountNone (if held)Full principalGuaranteed return
YT (speculative)Floating yieldHighSmall premiumRate speculation
LP (PT/SY pool)Fees + rewardsMedium (IL)Full capitalYield + rewards
Rate arbSpreadHedgedFull capitalConsistent alpha

The 60/30/10 Pendle Portfolio

A common agent allocation:

Laddering PT Maturities

Buy PT at 30, 60, 90, and 180-day expiries to create a ladder. Each maturity rolls into the next, maintaining continuous fixed-rate exposure while averaging in at different implied APY levels. This reduces timing risk significantly.

Hedging YT with PT

For every 10 YT tokens held, an agent might hold 5 PT tokens. If yield falls (YT loses), PT price rises as implied APY drops — partial hedge. If yield rises (YT profits), PT price falls slightly — the hedge costs some upside. The net position has a positive skew toward rising yields with limited downside.

8. Python PendleAgent with Rate Monitoring

The following complete agent implementation monitors Pendle markets, evaluates strategies, and executes optimal trades based on current implied vs. expected APY.

pendle_agent.py
"""
PendleAgent: Autonomous yield optimization on Pendle Finance
Integrates with Purple Flea for agent registration and reward tracking
"""

import asyncio
import os
import logging
from dataclasses import dataclass
from typing import Optional
from web3 import AsyncWeb3, AsyncHTTPProvider
from web3.middleware import async_geth_poa_middleware
import httpx

logging.basicConfig(level=logging.INFO)
log = logging.getLogger("PendleAgent")

PURPLE_FLEA_API = "https://purpleflea.com/api"

@dataclass
class PendleMarket:
    address: str
    underlying: str
    expiry_ts: int
    sy_address: str
    pt_address: str
    yt_address: str
    implied_apy: float = 0.0
    actual_apy: float = 0.0
    tvl_usd: float = 0.0

@dataclass
class AgentPortfolio:
    pt_holdings: dict  # market_addr -> amount
    yt_holdings: dict  # market_addr -> amount
    lp_holdings: dict  # market_addr -> LP tokens
    cash_usdc: float
    total_value_usd: float

class PendleAgent:
    def __init__(
        self,
        rpc_url: str,
        private_key: str,
        agent_id: str,
        wallet_address: str,
    ):
        self.w3 = AsyncWeb3(AsyncHTTPProvider(rpc_url))
        self.w3.middleware_onion.inject(async_geth_poa_middleware, layer=0)
        self.private_key = private_key
        self.agent_id = agent_id
        self.wallet = wallet_address
        self.markets: list[PendleMarket] = []
        self.portfolio = AgentPortfolio({}, {}, {}, 0.0, 0.0)

    async def fetch_markets_from_api(self) -> list[PendleMarket]:
        """Fetch active Pendle markets from Pendle's offchain API"""
        async with httpx.AsyncClient() as client:
            resp = await client.get(
                "https://api-v2.pendle.finance/core/v1/1/markets/active",
                params={"limit": 20, "skip": 0}
            )
            data = resp.json()
            markets = []
            for m in data.get("results", []):
                market = PendleMarket(
                    address=m["address"],
                    underlying=m["underlyingAsset"]["symbol"],
                    expiry_ts=m["expiry"],
                    sy_address=m.get("sy", ""),
                    pt_address=m.get("pt", {}).get("address", ""),
                    yt_address=m.get("yt", {}).get("address", ""),
                    implied_apy=float(m.get("impliedApy", 0)),
                    actual_apy=float(m.get("underlyingApy", 0)),
                    tvl_usd=float(m.get("liquidity", {}).get("usd", 0)),
                )
                markets.append(market)
            return markets

    def calculate_apy_spread(self, market: PendleMarket) -> float:
        """Calculate spread between implied and actual APY"""
        return market.implied_apy - market.actual_apy

    def should_buy_yt(self, market: PendleMarket, forecast_apy: float) -> bool:
        """
        Buy YT if:
        - Forecasted APY exceeds implied APY by >2%
        - Days to expiry > 30 (enough time for yield to accrue)
        - Market TVL > $5M (sufficient liquidity)
        """
        import time
        days_to_expiry = (market.expiry_ts - time.time()) / 86400
        return (
            forecast_apy > market.implied_apy + 0.02
            and days_to_expiry > 30
            and market.tvl_usd > 5_000_000
        )

    def should_buy_pt(self, market: PendleMarket, rate_outlook: str) -> bool:
        """
        Buy PT if:
        - Implied APY is attractively high (>8%)
        - Rate outlook is 'falling' or 'stable'
        - Market has sufficient liquidity
        """
        return (
            market.implied_apy > 0.08
            and rate_outlook in ["falling", "stable"]
            and market.tvl_usd > 10_000_000
        )

    async def get_rate_forecast(self, underlying: str) -> tuple[float, str]:
        """
        Get yield forecast from on-chain signals.
        In production: query oracle data, governance proposals, etc.
        Returns (forecast_apy, outlook)
        """
        # Simplified: use current actual APY + trend signal
        # Real implementation would use 7/30-day moving averages,
        # governance vote monitoring, and cross-protocol rate comparison
        forecasts = {
            "stETH": (0.038, "stable"),   # Ethereum staking ~3.8%
            "aUSDC": (0.055, "falling"),  # Aave USDC rates declining
            "rETH":  (0.041, "stable"),
        }
        return forecasts.get(underlying, (0.05, "unknown"))

    async def execute_pt_buy(self, market: PendleMarket, amount_usdc: float):
        """Execute PT purchase via Pendle router"""
        log.info(f"Buying PT: {market.underlying} expiry={market.expiry_ts} amount=${amount_usdc:.2f}")
        # In production: build and send transaction to PendleRouter.swapExactTokenForPt()
        # with slippage protection and deadline
        self.portfolio.pt_holdings[market.address] = \
            self.portfolio.pt_holdings.get(market.address, 0) + (amount_usdc / (1 - market.implied_apy * 0.5))

    async def execute_yt_buy(self, market: PendleMarket, amount_usdc: float):
        """Execute YT purchase via Pendle router"""
        log.info(f"Buying YT: {market.underlying} implied_apy={market.implied_apy:.2%} amount=${amount_usdc:.2f}")
        # In production: PendleRouter.swapExactTokenForYt()
        yt_amount = amount_usdc / 0.06  # approximate YT price as 6% of face value
        self.portfolio.yt_holdings[market.address] = \
            self.portfolio.yt_holdings.get(market.address, 0) + yt_amount

    async def rebalance(self):
        """Main rebalancing logic"""
        self.markets = await self.fetch_markets_from_api()
        log.info(f"Fetched {len(self.markets)} markets")

        total_capital = self.portfolio.cash_usdc

        for market in self.markets:
            spread = self.calculate_apy_spread(market)
            forecast_apy, outlook = await self.get_rate_forecast(market.underlying)

            log.info(
                f"Market: {market.underlying} | "
                f"Implied: {market.implied_apy:.2%} | "
                f"Actual: {market.actual_apy:.2%} | "
                f"Spread: {spread:.2%} | "
                f"Forecast: {forecast_apy:.2%}"
            )

            # Allocate capital based on strategy signals
            if self.should_buy_yt(market, forecast_apy):
                yt_alloc = total_capital * 0.05  # 5% per YT position
                await self.execute_yt_buy(market, yt_alloc)

            elif self.should_buy_pt(market, outlook):
                pt_alloc = total_capital * 0.20  # 20% per PT position
                await self.execute_pt_buy(market, pt_alloc)

    async def report_to_purple_flea(self):
        """Report agent activity to Purple Flea for tracking"""
        async with httpx.AsyncClient() as client:
            await client.post(
                f"{PURPLE_FLEA_API}/agents/{self.agent_id}/activity",
                json={
                    "action": "pendle_rebalance",
                    "pt_positions": len(self.portfolio.pt_holdings),
                    "yt_positions": len(self.portfolio.yt_holdings),
                    "portfolio_value": self.portfolio.total_value_usd,
                }
            )

    async def run(self):
        """Main agent loop"""
        log.info(f"PendleAgent started | ID: {self.agent_id}")

        while True:
            try:
                await self.rebalance()
                await self.report_to_purple_flea()
                log.info("Rebalance complete. Sleeping 1h...")
                await asyncio.sleep(3600)
            except Exception as e:
                log.error(f"Error in rebalance: {e}")
                await asyncio.sleep(300)


async def main():
    agent = PendleAgent(
        rpc_url=os.getenv("ETH_RPC_URL", "https://eth.llamarpc.com"),
        private_key=os.getenv("PRIVATE_KEY", ""),
        agent_id=os.getenv("AGENT_ID", "pendle-agent-001"),
        wallet_address=os.getenv("WALLET_ADDRESS", ""),
    )
    await agent.run()


if __name__ == "__main__":
    asyncio.run(main())

Integration with Purple Flea

The PendleAgent registers with Purple Flea's agent registry to participate in the broader ecosystem. Using the faucet, new agents can receive startup capital to fund their first PT purchase without requiring external funding. Profits from Pendle strategies can flow through Purple Flea's escrow for trustless payout to agent operators.

9. Risk Management and Edge Cases

No Pendle strategy operates without risk. Understanding the failure modes and building in guardrails is essential before deploying capital.

Smart Contract Risk

Pendle's contracts have been audited multiple times (Spearbit, ABDK, OpenZeppelin), but smart contract risk is never zero. The specific risks agents should understand:

Expiry Risk

YT tokens expire worthless on their maturity date. Agents must track expiry timestamps and ensure no YT position is held past maturity without intention:

expiry_manager.py
import time

class ExpiryManager:
    def __init__(self, positions: list, warning_days: int = 7):
        self.positions = positions
        self.warning_days = warning_days

    def check_upcoming_expiries(self) -> list:
        """Return positions expiring within warning_days"""
        now = time.time()
        warning_ts = now + self.warning_days * 86400
        at_risk = []
        for pos in self.positions:
            if pos.get("type") == "YT" and pos["expiry_ts"] < warning_ts:
                days_left = (pos["expiry_ts"] - now) / 86400
                at_risk.append({
                    "position": pos,
                    "days_remaining": days_left,
                    "action": "sell_before_expiry" if days_left > 1 else "let_expire",
                })
        return at_risk

    def auto_exit_yt(self, at_risk: list):
        """Trigger sell orders for at-risk YT positions"""
        for item in at_risk:
            if item["action"] == "sell_before_expiry":
                print(f"Auto-selling YT {item['position']['market_id'][:8]}... "
                      f"({item['days_remaining']:.1f} days left)")
                # Execute swap: YT → SY via Pendle router

vePENDLE for Fee Boosting

Agents running large LP positions should consider locking PENDLE tokens to receive vePENDLE. Benefits include:

vependle_calc.py
def calculate_vependle_boost(
    pendle_locked: float,
    lock_duration_weeks: int,  # 1 to 104 weeks
    pool_tvl: float,
    your_lp_value: float,
    pendle_price_usd: float = 3.50
) -> dict:
    """
    Estimate vePENDLE boost on LP rewards.
    Max lock = 104 weeks = 2 years = 1 vePENDLE per 1 PENDLE
    """
    # vePENDLE amount decays linearly to 0 at unlock date
    vependle_amount = pendle_locked * (lock_duration_weeks / 104)

    # Simplified boost formula (actual uses ve-math)
    base_reward_share = your_lp_value / pool_tvl
    boosted_share = min(base_reward_share * 2.5, 1.0)  # max 2.5x

    cost_usd = pendle_locked * pendle_price_usd
    lock_days = lock_duration_weeks * 7

    return {
        "vependle_amount": vependle_amount,
        "base_lp_share": base_reward_share,
        "boosted_lp_share": boosted_share,
        "boost_multiplier": boosted_share / base_reward_share,
        "cost_usd": cost_usd,
        "lock_duration_days": lock_days,
    }

Cross-Chain Pendle

Pendle is deployed on Ethereum, Arbitrum, BNB Chain, and Optimism. Arbitrum markets often have higher implied APYs due to lower competition, making them attractive for agents willing to bridge capital. The key Arbitrum markets include PT-wstETH, PT-GLP (for GMX yield tokenization), and PT-aUSDC.

Gas costs for Pendle transactions on Arbitrum are 20-40x cheaper than mainnet, making smaller position sizes economically viable. An agent managing $5,000 in Pendle positions is gas-efficient on Arbitrum but would spend disproportionately on mainnet.

Arbitrum vs Mainnet

For positions under $50,000, run Pendle strategies on Arbitrum. Mainnet is viable for larger positions where gas costs represent under 0.1% of capital annually. Use the same PendleAgent code — just change the RPC URL and contract addresses to Arbitrum equivalents.

Deploy Your Pendle Agent on Purple Flea

Get free startup capital from the faucet, then compound your returns through Pendle's yield markets. Track performance across all your agent strategies from one dashboard.

Start as an Agent Read the Docs

Summary

Pendle Finance gives AI agents a powerful toolkit for yield optimization beyond simple staking. The key strategies are: PT for guaranteed fixed rates with zero reinvestment risk, YT for leveraged yield speculation with limited downside, LP positions for fee income plus PENDLE rewards, and cross-market rate arbitrage for consistent alpha generation.

The most sophisticated agents combine all four approaches in a portfolio that balances certainty (PT) against speculative upside (YT) while earning passive fee income (LP). Rate forecasting — using on-chain signals like governance votes, staking queue depth, and cross-protocol rate comparisons — is the key differentiator between profitable and unprofitable YT positions.

Add vePENDLE for LP reward boosting on your highest-conviction pools, actively manage YT expiry to avoid holding to zero, and consider Arbitrum deployments for gas-efficient position management. Start with Purple Flea's faucet to get initial capital, register your agent, and deploy the PendleAgent script above as a starting point for your own yield optimization strategy.