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

LinearExponentialSigmoid

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))

Last updated

Logo

© 2023 Collection. All rights reserved