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:
PT Fixed Yield: Earned by holding PT.
Underlying Asset Yield and Rewards: Earned by holding the underlying assets.
Swap Fees: Derived from PT and YT swaps, with yield automatically compounded.
Napier Point: See the Napier Point guide for details.
$NPR Incentives: Coming soon.
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:
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:
Buyer sends YBT into the swap contract
Contract withdraws more YBT from the pool
Mint PT and YT from all of the YBT
Send the YT to the buyer
The PTs are sold for YBT to return the amount from step 2
[image of buying YT]
Selling YT:
Seller sends YT into the swap contract
Contract borrows an equivalent amount of PT from the pool
The YT and PT are used to redeem YBT
YBT is sent to the seller
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