chart-based route finding
This commit is contained in:
@@ -93,7 +93,7 @@ export function applyLine(tranche, intercept, slope, isMinimum = null) {
|
||||
const os = useOrderStore()
|
||||
const route = os.route
|
||||
const inverted = routeInverted(route)
|
||||
const scale = 10 ** (os.tokenA.decimals - os.tokenB.decimals)
|
||||
const scale = 10 ** (os.tokenA.d - os.tokenB.d)
|
||||
let m = inverted ? -scale / slope : slope / scale
|
||||
let b = inverted ? scale / intercept : intercept / scale
|
||||
const cur = b + timestamp() * m
|
||||
|
||||
Reference in New Issue
Block a user