Skip to content

Commit

Permalink
fix: validateSlippage
Browse files Browse the repository at this point in the history
  • Loading branch information
epicwavesrider committed Aug 15, 2022
1 parent dfbbcea commit ed26158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ride/lp_stable.ride
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ func estimatePutOperation(
let slippageRealX18 = fraction(abs(currentPriceX18 - userPriceX18), scale18, currentPriceX18)
let slippageX18 = slippageTolerance.toX18(scale8)

strict validateSlippage = (currentPriceX18 != zeroBigInt && slippageRealX18 > slippageX18) == true ||
strict validateSlippage = (currentPriceX18 != zeroBigInt && slippageRealX18 > slippageX18) == false ||
throwErr("Price slippage " + slippageRealX18.toString() + " > " + slippageX18.toString())

let lpEmissionX18 = lpEmission.toX18(scale8)
Expand Down

0 comments on commit ed26158

Please sign in to comment.