Trading Fee

Introduction

Pilgrim Protocol charges the user a trading fee on:

  • trading rounds on a PilgrimPair pool

  • on a buyout event of the metaNFT or NFT

  • on delisting, i.e. reclaiming ownership of the locked NFT

This section describes how trading fees are quantitatively calculated on Pilgrim, and detailed fee distribution logic.

TL;DR:

Pilgrim Protocol charges two types of fees on every round trade: a base fee and a round fee.

  • The base fee is taken in the form of base tokens, and is used to buy back PIL for distribution to xPIL stakers. Additional PIL rewards are given to round traders as well.

  • The round fee is taken in the form of rounds, and is sent to the metaNFT owner. This is given in addition to fee subsidizations from the Protocol Treasury, denominated in PIL tokens.

An NFT fee is also charged when NFTs or metaNFTs are traded. This is used to buy back PIL for distribution to xPIL stakers.

Pilgrim is a decentralized protocol; no centralized party takes fees accumulated from the protocol directly.

Fee Calculation Methodology

Definition

  1. Base Fee Ratio: fbase=abase/b,b=1000,abase[0,b],abaseZ+f_\text{base} = a_\text{base} / b, b = 1000, a_\text{base} \in [0, b], a_\text{base} \in \mathbb{Z}^{+}

  2. Round Fee Ratio: fround=around/b,b=1000,around[0,b],aroundZ+f_\text{round} = a_\text{round} / b, b = 1000, a_\text{round} \in [0, b], a_\text{round} \in \mathbb{Z}^{+}

  3. NFT Fee Ratio: fNFT=aNFT/b,b=1000,aNFT[0,b],aNFTZ+f_\text{NFT} = a_\text{NFT} / b, b = 1000, a_\text{NFT} \in [0, b], a_\text{NFT} \in \mathbb{Z}^{+}

  4. Base Fee Function: feebase(n)=ceil(n/b)abasefee_\text{base}(n) = ceil(n / b) * a_\text{base}: A function which calculates how much base tokens are charged as fees.

  5. Round Fee Function: feeround(n)=ceil(m/b)aroundKfee_\text{round(n)} = ceil(m / b) * a_\text{round} * K: A function which calculates how much base tokens are charged as fees. Note that the result is also a multiple of KK.

  6. NFT Fee Function: feeNFT(n)=ceil(n/b)aNFTfee_\text{NFT(n)} = ceil(n / b) * a_\text{NFT} : A function which calculates how much base tokens are charged as fees when metaNFTs or NFTs are traded.

Buying Rounds: Exchanging Base Tokens to Rounds

When a user pays nn base tokens, they receive mKfeeround(m)m \cdot K - fee_\text{round}(m) rounds.

  1. The protocol receives nn base tokens -- e.g. PIL, WETH, USDC, etc.

  2. feebase(n)fee_\text{base}(n) base tokens are taken from provided base tokens. The resulting number of base tokens is nfeebase(n)n - fee_\text{base}(n).

  3. Apply Pilgrim AMM logic: mKm \cdot K rounds are minted.

  4. feeround(m)fee_\text{round}(m) rounds are removed from initially minted rounds. The resulting number of rounds returned is mKfeeround(m)m \cdot K - fee_\text{round}(m)

Selling Rounds: Exchanging Rounds to Base Tokens

When a user pays nKn \cdot K rounds, they receive mfeeround(m)m - fee_\text{round}(m) base tokens.

  1. The protocol receives nKn \cdot K rounds.

  2. feeround(m)fee_\text{round}(m) rounds are taken from provided rounds. The resulting number of rounds is nKfeeround(n)n \cdot K - fee_\text{round}(n).

  3. Apply Pilgrim AMM logic: mm base tokens are withdrawn from the protocol.

  4. feebase(m)fee_\text{base}(m) base tokens are removed from withdrawn liquidity. The resulting number of base tokens returned is mfeebase(m)m - fee_\text{base}(m).

Trading NFTs, metaNFTs, or delisting NFTs

When a user pays nn base tokens, metaNFT holders and round holders receive nfeeNFT(n)n - fee_\text{NFT}(n) base tokens in total.

  1. The protocol receives nn base tokens.

  2. feeNFT(n)fee_\text{NFT}(n) base tokens are taken from provided base tokens. The resulting number of base tokens is nfeeNFT(n)n - fee_\text{NFT}(n).

Last updated