gelatodigital/swap-orders-lib

Range Order Price/Tick Display

Closed this issue · 0 comments

Range Order Price Display :

Example pool USDC/WETH : https://polygonscan.com//address/0x45dda9cb7c25131df268515131f647d726f50608

Buy:

  • ZeroForOne == true (token0 => token1 RO, example USDC/WETH on polygon) :
  1. current price displayed should be how much token1 we get for 1 token0 (ex 3200 USDC/ETH).
  2. price suggestions should be the nearest above that current price displayed or inputed price (ex: 3240/3260).
  3. here once user select a price, we can get the associated tick, this one should be higher than the current tick.
  • ZeroForOne == false (token1 => token0 RO):
  1. default price displayed should be how much token0 we get form 1 token1 (ex: 0,00033153527 ETH/USDC).
  2. price suggestions should be the nearest above that current price displayed or inputed price (ex: 0,00034153527/0,00035153527).
  3. here once user select a price, we can get the associated tick, this one should be lower than the current tick.

Sell:

  • ZeroForOne == true (token0 => token1 RO, example USDC/WETH on polygon) :
  1. current price displayed should be how much token1 we get for 1 token0 (ex 3200 USDC/ETH).
  2. price suggestions should be the nearest above that current price displayed or inputed price (ex: 3240/3260).
  3. here once user select a price, we can get the associated tick, this one should be higher than the current tick.
  • ZeroForOne == false (token1 => token0 RO):
  1. default price displayed should be how much token0 we get form 1 token1 (ex: 0,00033153527 ETH/USDC).
  2. price suggestions should be the nearest above that current price displayed or inputed price (ex: 0,00034153527/0,00035153527).
  3. here once user select a price, we can get the associated tick, this one should be lower than the current tick.