Skip to content

Commit

Permalink
update fix me
Browse files Browse the repository at this point in the history
  • Loading branch information
mlguys committed Apr 26, 2024
1 parent 6f27609 commit 19e25b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/chains/osmosis/osmosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1360,9 +1360,9 @@ export class Osmosis extends CosmosBase implements Cosmosish{
tokenMinAmount1 = token1_bignumber.shiftedBy(this.getExponentByBase(token1.base)).multipliedBy(100-slippage).dividedBy(100).integerValue(BigNumber.ROUND_CEIL)
}

// FIXME: ticks are less than 1 exponent, need to check tick calculation
const lowerTick = findTickForPrice(req.lowerPrice!, pool.exponentAtPriceOne, pool.tickSpacing, true) + '0' // pool.currentTick,
const upperTick = findTickForPrice(req.upperPrice!, pool.exponentAtPriceOne, pool.tickSpacing, false) + '0'
// FIXME: The calculation of lowerTick and upperTick is not correct for the case where price is less than 1
const lowerTick = findTickForPrice(req.lowerPrice!, pool.exponentAtPriceOne, pool.tickSpacing, true) // pool.currentTick,
const upperTick = findTickForPrice(req.upperPrice!, pool.exponentAtPriceOne, pool.tickSpacing, false)

var tokenMinAmount0_final = tokenMinAmount0.toString()
var tokenMinAmount1_final = tokenMinAmount1.toString()
Expand Down

0 comments on commit 19e25b6

Please sign in to comment.