Yields
Pendle Events
Track yield trading activities and strategies in Pendle markets
The ethereum.yields.pendle_events
table captures all yield trading activities from Pendle’s Router V4 contract, providing detailed information about different yield management strategies and their execution.
Strategy Types
Events are mapped to specific strategies based on the type of operation:
-
Yield Position Strategies
long_yield
: Buying YT or selling PTshort_yield
: Selling YT or buying PT
-
Token Management
mint_pt_yt
: Minting principal and yield tokensredeem_pt_yt
: Redeeming principal and yield tokensmint_sy
: Minting standardized yield tokensredeem_sy
: Redeeming standardized yield tokens
-
Liquidity Operations
add_liquidity
: Adding tokens to marketsremove_liquidity
: Removing tokens from markets
Strategy Mapping Logic
The strategy field is determined by the following rules:
Event Type | Condition | Strategy |
---|---|---|
Swap YT | YT amount > 0 | long_yield |
Swap YT | YT amount < 0 | short_yield |
Swap PT | PT amount > 0 | short_yield |
Swap PT | PT amount < 0 | long_yield |
Mint/Redeem | MintPyFromToken/Sy | mint_pt_yt |
Mint/Redeem | RedeemPyToToken/Sy | redeem_pt_yt |
Mint/Redeem | MintSyFromToken | mint_sy |
Mint/Redeem | RedeemSyToToken | redeem_sy |
Liquidity | AddLiquidity | add_liquidity |
Liquidity | RemoveLiquidity/Exit | remove_liquidity |
Usage Example
This query fetches the strategies that have been used in a market.
This query finds the largest yield trading positions in the last 30 days.
Table Columns
Column Name | Description |
---|---|
strategy | Type of yield strategy (long_yield, short_yield, mint_pt_yt, etc.) |
event_name | Name of the Pendle Router V4 event |
receiver | Address receiving tokens from the event |
market | Pendle market (liquidity pool) address |
market_name | Human-readable market name |
lp_amount | Amount of liquidity pool tokens |
sy | Standardized yield token address |
sy_name | Name of standardized yield token |
sy_amount | Amount of standardized yield tokens |
pt | Principal token address |
pt_name | Name of principal token |
pt_amount | Amount of principal tokens |
yt | Yield token address |
yt_name | Name of yield token |
yt_amount | Amount of yield tokens |
token | Address of token being swapped |
token_name | Name of token being swapped |
token_symbol | Symbol of token being swapped |
token_amount | Amount of tokens being swapped |
token_amount_usd | USD value of swapped tokens |
usd_amount | Total USD value of event |
caller | Address initiating the transaction |
transaction_hash | Transaction hash |
transaction_index | Index of transaction in block |
block_timestamp | Block timestamp |
block_number | Block number |
block_hash | Block hash |
from_address | Transaction sender address |
to_address | Transaction recipient contract |
log_index | Event log index |
topic0 | First event log topic |
extra_fields | Additional event fields |
unique_id | Unique event identifier |