Trading Systems

Napier v2 has been modularly designed to unlock the potential for a wide range of DeFi integrations.

It initially employs the neutral and efficient Curve system as its trading mechanism, facilitating transactions between PT, YT, and the associated YBT. Not only that, but we are also working to enable users to easily and freely deploy multiple trading systems.

Liquidity Pool

Liquidity on Napier V2 comprises of PT/YBT . This means that LPs earn yields from:

  1. PT Fixed Yield: Earned by holding PT.

  2. Underlying Asset Yield and Rewards: Earned by holding the underlying assets.

  3. Swap Fees: Derived from PT and YT swaps, with yield automatically compounded.

  4. Napier Point: See the Napier Point guide for details.

  5. $NPR Incentives: Coming soon.

  6. Rewards: CRV, CVX, and external incentives

Swap Router

PT and YT can always be traded through a single liquidity pool in Napier. This is made possible by implementing the Flashswap feature with Curve’s twocrypto-ng.

Napier v2 liquidity pools are set up as PT/YBT pairs (e.g., PT-scrvUSD / scrvUSD). Swapping PT is a simple process between the two assets in the pool, while YT swaps are possible through FlashSwap within the same pool.

Additionally, with the built-in automatic routing, anyone can trade PT and YT with any asset.

Flash Swap

Flash swaps are possible due to the relationship between PT and YT. As PT and YT can be minted from and redeemed to its underlying YBT, we can express the price relationship:

P(PT)+P(YT)=P(Underlying)P(PT)+P(YT)=P(Underlying)

Knowing that YT price has an inverted correlation against PT price, we use this price relationship to utilise the PT/YBT pool for YT swaps.

Buying YT:

  1. Buyer sends YBT into the swap contract

  2. Contract withdraws more YBT from the pool

  3. Mint PT and YT from all of the YBT

  4. Send the YT to the buyer

  5. The PTs are sold for YBT to return the amount from step 2

[image of buying YT]

Selling YT:

  1. Seller sends YT into the swap contract

  2. Contract borrows an equivalent amount of PT from the pool

  3. The YT and PT are used to redeem YBT

  4. YBT is sent to the seller

  5. A portion of the YBT is sold to the pool for PT to return the amount from step 2

[image of selling YT]

Automatic Routing

Napier integrates automatic routing using external project APIs, like 1inch, allowing anyone to trade PT and YT with any asset.

Future Implementations

  • More efficient trading system

  • An orderbook-like system

Last updated