Ticks
Overview of how Ticks work on Duality
Ticks are the fundamental unit of accounting within the dex. Each tick is an integer between 352437 and -352437. All tradeable liquidity, in the form of either `PoolReserves` or `LimitOrderTranche`s is stored at a specific tick. The price of liquidity being stored at tick is determined by the function:
p(i)=1.0001i
Some examples:
Price of tick 0: p(0)=1.00010=1
Price of tick 4000 : p(4000)=1.00014000β1.4917β
Price of tick β4000 : βp(β4000)=1.0001β4000β0.6703
More specifically price refers to the rate at which Token1 can be converted to Token0. Logically, the converse rate for converting Token0 to Token1 can be expressed as:
price0To1(i)=1/1.0001i
Last updated