Partner Points Integration

This guide explains how to calculate a position’s exposure for points programs in Napier markets.

If you’re a curator: you can share this guide directly with asset issuers.

Follow the steps below to integrate Napier tokens with your point system.

1

Step 1: Preparation

Before the integration

  • Access the Curator Dashboard.

  • If your account is not verified, complete verification under Verify Your Account.

  • If you haven’t created a market yet, follow the steps in Create Market.

Start the integration

Measure each user’s underlying token exposure to run points, airdrops, or rewards.

Tokens:

  • PT (principal): holds the underlying; no points by itself.

  • YT (yield): points come from your share of the underlying held in PT.

  • LP (AMM liquidity): there are two possible cases - points can be earned either from the entire LP or only from the portion of the LP excluding PT.

Note: Whether points are earned from the entire LP or only from the portion excluding PT depends on the program operator’s policy. Make sure to confirm this before proceeding.

Go to the point integration example (Github) and install the dependency

git clone <https://github.com/napierfi/point-integration-example>
cd point-integration-example
pnpm install
2

Step 2: Configuration

Edit src/configuration.ts:

export const configuration = {
  chainId: 1,
  markets: ['0x8eb9f9e97d6a63aab7572ad0d96fa3f09255cce9'],
  blockNumber: 22160745,
};
  • Use PT addresses (not LP or YT).

  • Find your market’s PT on app.napier.finance.

  • Double-check chainId and the snapshot blockNumber.

3

Step 3: Execution

Run the Script

pnpm start

This creates:

  • user_balances_yt.csv — exposure from YT

  • user_balances_lp.csv — exposure from LP (non-PT portion of LP)

Each CSV row:

address,balances
0x1234...abcd, 3524219 // LP (non-PT portion of LP)
0xabcd...5678, 1980132 // YT 

= user address and their total underlying exposure at the snapshot block.

4

Step 4: Verification

Verify a user's calculated exposure manually:

  • YT exposure: underlying.balanceOf(PT) × yt.balanceOf(user) ÷ yt.totalSupply()

  • LP exposure: underlying.balanceOf(pool) × lp.balanceOf(user) ÷ lp.totalSupply()

Quick Etherscan check

  1. Read the underlying holding of PT contract.

  2. Apply the formula.

After maturity: YT stops accruing yield → stop points tracking for that market.

5

Step 5: Notify Users

Go back to the Partner Points Program, display the points program in the UI, and notify users.

Last updated

Was this helpful?