Skip to main content

High Level Architecture

High Level Architecture

Functions of Contracts

PendleRouter

PendleRouter is a contract that aggregates callers' actions with various different SYs, PTs, YTs, and Markets. It does not have any special permissions or whitelists on any contracts it interacts with. Therefore, any third-party protocols can freely embed the router's logic into their code for better gas efficiency.

You can read more about the PendleRouter here.

Standardized Yield (SY)

SY is a wrapped version of the interest-bearing token (ibToken) that can also be staked into other protocols to earn even more interest. In the Pendle system, SY is used instead of the ibToken for all operations, including trading on PendleMarket or minting Principal Token & Yield Token.

The following are true:

SYibToken (1 SY = 1 ib Token)Asset (ibToken appreciates against)
SY GLPGLPNIL, GLP doesn't appreciate
SY wstETHwstETHstETH
SY ETHxETHxETH locked in ETHx contract*
SY aUSDCNot 1-1 to aUSDC since it's rebasingaUSDC
SY rETH-WETH_BalancerLP AurarETH-WETH LP of Balancer staked into the corresponding Aura's gaugeLiquidity of rETH-WETH pool

For *: ETH locked in ETHx is different from normal ETH due to withdrawal from ETHx has delay. Under normal circumstances it's also normal for ETHx to trade at a market price lower than the amount of ETH it can be withdrawn to.

Principal Token (PT)

PT is a token that represents the right to redeem for the principal amount at maturity, and is tradable on PendleMarket. While PT represents a claim to a fixed amount of assets, SY wraps an ibToken that increases in value, meaning that 1 PT != 1 SY is usually true (except in exceptional cases). Instead, 1 PT = 1 Asset, where "Asset" refers to what SY's ibToken is denominated in.

The following are true:

PTAsset (1 PT = 1 Asset)
PT GLPGLP
PT wstETHstETH
PT ETHxETH locked in ETHx contract
PT aUSDCaUSDC

At redemption, 1 PT = X SY, where X satisfies the condition that X SY = 1 Asset. For example, assuming 1 wstETH = 1.2 stETH on 1/1/2024, 1 PT-wstETH-01JAN2024 will be redeemable to 0.8928 wstETH at maturity.

Yield Token (YT)

YT is a token that represents the rights to redeem the interest generated by the SY until it reaches maturity. It's important to note that the value of YT is zero once it reaches maturity. The yield can be redeemed at any time and it can be traded on PendleMarket using special methods. ibToken generates yield in two forms, which Pendle denotes as:

  • Interest (compounding yield): The yield is denominated in the same unit as the asset of ibToken. For example, as time goes on, wstETH becomes worth more in terms of stETH, and SY-aUSDC becomes worth more in terms of USDC.
  • Rewards (yield that does not compound): The yield is given out in a different unit than the ibToken. For example, GLP generates ETH.

The following are true:

YTInterestRewards
YT GLP-ETH
YT wstETHstETH-
YT ETHxETH locked in ETHx contract-
YT aUSDCaUSDC-
YT rETH-WETH_BalancerLP Auraliquidity of rETH-WETH poolAURA, BAL

PT and YT are minted and redeemed using the YT contract. To mint PT and YT, SY is utilized. 1 SY = X PT + X YT is created where 1 SY = X Asset. Prior to maturity, both PT and YT must be provided to redeem the underlying SY. After maturity, only PT is required for redemption.

PendleMarket

PendleMarket (or simply Market) is a contract that enables users to trade between PT and its corresponding SY, while still allowing liquidity provision as usual. Swap fees are directly compounded into the LP. Each Market also has its own built-in geometric-mean oracle, similar to UniswapV3.

Currently, there is no market to trade YT, but it is always tradable by the following algorithms:

  • SY ➝ YT = flashswap SY, mint PT & YT, payback PT, send YT to users.
  • YT ➝ SY = flashswap PT, use PT & YT, redeem SY, pay back, send excess to users.

PendleGauge

PendleGauge is a contract that distributes PENDLE and other rewards generated by SY to Market LP holders. Each Gauge is directly embedded into the corresponding Market, so there is no need to stake LP to receive these rewards. It's important to note that rewards can be redeemed at any time.

The rewards are not distributed based on the amount of LP holdings, but rather on the activeBalance. The activeBalance is calculated as follows:

activeBalance = min(userLpBalance, userBoostedBalance);
userBoostedBalance = 0.4 * userLpBalance + 0.6 * totalLpSupply * userVePendleBalance/ totalVePendleSupply;

VotingController

The VotingController is a contract that allows users to utilize their vePENDLE to vote for markets. This voting process determines the amount of PENDLE each market will receive in the following epoch. Each epoch lasts for one week, beginning at 0:00 UTC on Thursday and ending at the same time on the following Thursday. During the epoch, users can change their vote as desired, but the vote will only become finalized when the epoch ends.

GaugeController

The GaugeController is a contract that receives the voting results from the VotingController and distributes PENDLE to the Gauges accordingly. The PENDLE for the epoch is not distributed all at once, but instead is released every second throughout the epoch.

vePENDLE

The vePENDLE contract allows users to lock their PENDLE in order to receive vePENDLE. Each user's position is represented by a pair of values: (amount, expiry). After the expiry, the user can withdraw their amount of PENDLE from the contract. The balance of a user's vePENDLE will decay weekly until it becomes zero at expiry.