Smart Contracts

New to Pearl V2:

  • Pool Deployer: Gives a very simple and easy way to deploy new pools with a single high-level function call.

  • Factory.sol: Low level api to deploy new pools with configurable options.

  • NonfungibleTokenPositionDescriptor.sol: Manages ****detail for URI (Unique Resource Identifier) which represents all the information attached to an NFT.

  • NonfungiblePositionManager.sol

    1. Adding, removing, and modifying liquidity positions in any V2 pool.

    2. Representing those liquidity positions as NFTs

  • SwapRouter: Serves as an on-chain interface point for swaps. Pass a token or series of tokens, to swap between, and it will handle the low-level swap calls and funds transfer to make it all happen.

  • Quoter.sol: Get token quotes from the pool

Pool Deployment Action:

Position Management


Contracts Global State

  • The reason for a signed integer int instead of an uint is that negative power represents prices less than 1 but greater than 0.

  • 24 bits can cover the range between 1.0001 ^ (2²³ — 1) and 1.0001 ^ -(2)²³. Even Google cannot calculate such numbers, so allow me to offer smaller values to have a rough idea of the whole price range:

    1.0001 ^ (2¹⁸) = 242,214,459,604.341

    1.0001 ^ -(2¹⁷) = 0.000002031888943

Last updated