zelos-alpha / demeter

Better backtest toolkit for Uniswap v3 and Aave.
https://medium.com/zelos-research
MIT License
32 stars 7 forks source link

fix lower price higher than upper price #1

Closed Maltmark closed 1 year ago

Maltmark commented 1 year ago

When adding liquidity by ticks the lower price is the upper price and vice versa in the record action. By converting the tick pair the prices are right. This does not happen when adding liquidity by price because the code doesn't use the tick to calculate the price, it passes the input prices.