Collection.xyz Documentation
Collection.xyz
  • What is Collection.xyz?
  • Collection Concepts
    • Liquidity Pool
      • Advanced Pool
      • Basic Pool
    • Bonding Curve and Delta
    • Fee
    • Buy / Sell
    • APR
    • The Collection Whitepaper
    • Collection 1.00: Patch Notes
  • User Guides
    • Create a Trade Pool
    • Create a Buy Pool
    • Create a Sell Pool
    • Buy & Sell NFTs instantly
    • LP Strategy Guide
  • Technical Reference
    • NFT AMM
      • What Is A CollectionPool?
      • Differences Between Individual And Communal Liquidity Pool Model
      • How do I determine if a pool has sufficient liquidity to fulfil an order?
    • Fee Structure
      • Overview of the Fee Structure in NFT AMMs
      • Calculation and Collection of Fees
    • Royalties
      • How are royalties implemented?
      • Relation between Royalties and Fees in the AMMs
      • All Possible Royalty Scenarios
    • Airdrop Compatibility
      • Can Collection.xyz handle airdrops?
    • Pool Types
      • Definition of Pool Types In NFT AMMs
      • Comparison of Different Pool Types
    • Bonding Curves
      • Parameters of the bonding curves
      • Type of bonding curves
        • Linear Curve
        • Exponential Curve
        • Sigmoid Curve
      • How are the parameters used in each of the bonding curves?
      • Customizable spread curves
    • Github Repos & Addresses
    • Audit Reports
    • Technical User Flows
      • Technical Architecture
      • Create Pool
      • Swapping and Trading: User Buying NFT
      • Swapping and Trading: User Selling NFT
      • Bonding Curves and Pricing
Powered by GitBook
LogoLogo

Collection.xyz

  • Main Website
  • NFT DEX Testnet

Connect with us

  • Discord
  • Twitter
  • Blog

© 2023 Collection. All rights reserved

On this page
  1. Technical Reference
  2. Bonding Curves

How are the parameters used in each of the bonding curves?

Linear
Exponential
Sigmoid

Delta (uint128)

  • The additive amount that the next price will increase/decrease by

  • No constraints

  • The multiplicative amount that the next price will increase or decrease by

  • 1e18 represents 100%. If it increases by 20%, we need to put 1.2e18 as delta

  • Constrained to be ≥ 1e18

  • Represents the speed which P_min and P_max are attained. Low = slow, high = fast

  • delta must be k * 2**10 as a uint128. The value of k is normalized because most useful curves have k between 0 and 8, with small changes to k (e.g. 1/128) producing significant changes to the curve

SpotPrice (uint128)

Ex-fees and royalties,

Bid | Ask ~= spotPrice | spotPrice + delta

Ex-fees and royalties,

Bid | Ask ~= spotPrice | (spotPrice * delta/ 1e18)

Not used

Props (bytes)

Not used

Not used

Represents an encoding of upper and lower bounds P_max and P_min

abi.encode(uint256(P_min), uint256(P_max - P_min))

State (bytes)

Not used

Not used

Represents where we are from the curve initialization point to calculate the right gradient

abi.encode(int128(n - n0))

PreviousSigmoid CurveNextCustomizable spread curves

Last updated 2 years ago