What is a Tick?

In financial markets, a tick refers to the smallest possible change in the price of a financial instrument. For instance, if a particular asset has a tick size of $0.01, this means that its price can only be altered in increments of $0.01 and cannot fluctuate by a smaller amount. The tick size for different securities may vary depending on various factors, such as the liquidity of the security and the minimum price movement that the market can accommodate.

Tick Representation in Dfyn V2:

Dfyn V2 allows for more precise trading by dividing the price range $[0,∞]$ into granular ticks, similar to an order book exchange:

The linked list is represented by a mapping of 24-bit integers to "Tick" structures, where each "Tick" holds pointers to the previous and next tick, as well as liquidity and other variables tracking fees and time spent within a range.

struct Tick {
        int24 nextTickToCross;
        uint160 secondsGrowthGlobal;
        uint256 currentLiquidity;
        uint256 feeGrowthGlobalA;
        uint256 feeGrowthGlobalB;
        bool zeroForOne;
        uint24 tickSpacing;
    }