Pendle Documentation

website·Indexed 38 days ago

https://docs.pendle.finance/

Documentation for Pendle, a yield-trading protocol. It covers Pendle V2's yield tokenization (splitting assets into Principal Tokens (PT) and Yield Tokens (YT)), the Boros interest rate swap DEX, and the StandardizedYield (SY) adapter layer. Includes technical guides for the Pendle API, Hosted SDK, router contract integration, limit order systems, and the use of PT and LP tokens as collateral in money markets.

Tokens
65.6K
Snippets
265
Records
464
Agent score
71%

What's inside Pendle

  1. Overview of Pendle Spark Linear Discount Oracle

    The PendleSparkLinearDiscountOracle is a deterministic feed that provides a discount factor for a given Principal Token (PT). This factor increases linearly over time and converges to 1.0 at maturity. It is designed for money markets to price PTs conservatively without relying on volatile AMM market data. The oracle is Chainlink-compatible, returning a multiplier in 18 decimals via latestRoundData.
  2. Overview of Pendle Router and Versioning

    The PendleRouter is an aggregator contract used to interact with SYs, PTs, YTs, and markets. Using the Router is recommended over direct pool interaction to benefit from reduced fee rates (lnFeeRateRoot).

    Because the Router uses the EIP-2535 Diamond Standard, block explorers (like Etherscan) cannot display all available functions. Developers must use the combined ABI from IPAllActionV3.sol to interact with the full range of functions.

    Router Versions:

    • RouterV4 (Recommended): 0x888888888889758F76e7103c6CbF23ABbF58F946. This is an upgradable proxy and the current standard for all integrations.
    • RouterV3: 0x00000000005BBB0EF59571E58418F9a4357b68A0. Supports limit orders but lacks V4 optimizations.
    • RouterV2: 0x0000000001e4ef00d069e71d6ba041b0a16f7ea0. May have approval issues with newer markets and is not supported on some networks (e.g., Mantle).
    • RouterV1: 0x41FAD93F225b5C1C95f2445A5d7fcB85bA46713f.
  3. Overview of Pendle Limit Orders

    Pendle's Limit Order system allows users to place orders at specific implied APY rates. Makers create orders off-chain (gasless) or on-chain, and Takers fill these orders on-chain via the Limit Order smart contract. The system is integrated into the Pendle Hosted SDK to improve execution prices by combining limit order liquidity with AMM liquidity.
  4. Overview of Boros Fee Types and Rates

    The Boros protocol implements several fee types depending on the action performed. Taker and OTC fees are discountable, while settlement, entrance, and liquidation fees are not.
    Fee TypeWhen ChargedRate SourceDiscountable
    Taker feeOrder fills against bookMarketConfig.takerFeeYes (takerDisc)
    OTC feeAMM swaps / OTC tradesMarketConfig.otcFeeYes (otcDisc)
    Settlement feeEach funding periodFIndex.feeIndexNo
    Market entrance feeFirst action per marketCashFeeData.marketEntranceFeeNo
    Liquidation feeAccount liquidatedLiqSettings.feeRateNo
  5. Overview of Boros Agent Trading

    An agent is an EVM address authorized to execute trading operations (placing orders, canceling orders, etc.) on behalf of a root account. This delegated signing mechanism allows for automated trading and high-frequency operations without requiring the root account to sign every transaction.

    Key Security Constraints:

    • Agents can only perform authorized trading operations.
    • Agents cannot withdraw funds; only the root account can initiate withdrawals.
    • Root accounts can revoke agent access at any time.
  6. Overview of Pendle Yield Tokenization (SY, PT, YT)

    Pendle splits yield-bearing assets into two components with a fixed expiry:

    • Standardized Yield (SY): A wrapper for yield-bearing assets where underlying yield and rewards accrue.
    • PT (Principal Token): Represents the principal of the underlying asset. It is redeemable for the principal at or after maturity.
    • YT (Yield Token): Represents the entitlement to all yield, rewards, and points of the asset until expiry.
  7. Overview of Boros Interest Rate Trading

    Boros is a yield-trading platform on margin that allows users to trade funding rates (e.g., from centralized exchanges like Binance or Hyperliquid) and other yield categories. It represents floating-yield streams as Yield Units (YU), where each YU represents the yield of one unit of the collateral asset in the underlying yield-bearing asset.
  8. Overview of StandardizedYield (SY) adapter

    StandardizedYield (SY) is Pendle's adapter layer for heterogeneous yield-bearing tokens (e.g., Aave aTokens, Lido wstETH, GMX GLP). It provides a uniform interface for depositing, redeeming, querying exchange rates, and claiming rewards. SY serves as the foundational token for other Pendle primitives: PT and YT are minted by splitting SY, PendleMarket trades PT against SY, and PYLpOracle prices assets in SY or asset terms.
  9. Understand Pendle V2 AMM yield-range liquidity

    Pendle's V2 AMM concentrates liquidity within a pre-configured yield range (Implied APY range) rather than a price range. This design increases capital efficiency and reduces slippage for trades within expected yield boundaries. The AMM uses 'dynamic curve tightening,' where the PT price range narrows as the asset approaches maturity to reflect decreasing uncertainty of future yield and minimize impermanent loss.
  10. Use RouterStatic for off-chain computations

    RouterStatic is an ERC2535 multi-facet proxy contract designed specifically for off-chain computations. It should NOT be used for fund-sensitive or on-chain transactions. To interact with it, use the ABI from contracts/interfaces/IPRouterStatic.sol.
  11. Integrate with the Boros Router contract

    The Router contract is the primary entry point for Boros. It is modularly organized into:

    • AuthModule: Agent authentication.
    • AMMModule: Liquidity and swaps.
    • TradeModule: Core trading, order placement, and cash transfers.
    • ConditionalModule: Conditional orders.
    • DepositModule: Deposit box operations.
    • MiscModule: Simulations and batch operations.

    Note: It is highly recommended to use the REST API or SDK instead of direct contract calls to avoid errors with calldata encoding and ABI changes.