Point Integration
This guide explains how to track user positions in Napier markets and calculate their underlying token exposure to support points systems, airdrops, or reward campaigns
Token Mechanism
Napier users can interact with the protocol via:
PT (Principal Token)
Represents the principal portion of a yield position
Does not earn any points
Holds the underlying token
YT (Yield Token)
Represents the floating yield portion
Users earn points based on their proportional share of the underlying tokens stored in PT
LP Token
Represents liquidity in the Napier AMM (includes PT + YT)
LP holders earn points based on their share of the underlying tokens stored in the LP contract
Script Mechanism
You can track user balances and compute their total underlying exposure using our open-source integration script.
The script:
Fetches balances for YT and LP holders of the configured market at certain block number
Calculates each user's underlying token exposure
For YT → it’s based on underlying stored in the PT contract
For LP → It’s based on underlying stored in the pool
Aggregates and exports the result to a CSV file
How to Use the Script
1. Clone & install dependencies
2. Configure src/configuration.ts
src/configuration.ts
Available config are:
chainId
of your marketmarkets
is the pt addresses of the market you want to snapshotblockNumber
the block number of the snapshot period
3. Run the Script
4. Examine the output
Output of the script is generated as csv with the filename below
Output Format
The script generates two CSV (one for LP and one for YT) formatted like this:
Each row represents a user address and their total underlying exposure (from YT or LP).
How to Verify Results
You can verify a user's calculated exposure manually:
YT Verification
Formula
LP Verification
Formula
Post Maturity
Once a market matures:
YT no longer accrues yield
Points tracking should stop
Last updated