To compute the individual liquidity positions that correspond to a desired payoff, we embed a solver into the dex_utils crate. Even though the crate imports ndarray, the solver itself is self-contained and does not depend on a specific BLAS/LAPACK backend. It uses data structures and helper methods provided by ndarray so that the high-level code is easier to read. However, this is rather inconvenient since that means we cannot use the crate in a wasm context.
Instead of using ndarray data structures, the crate should drop use of ndarray and either use const generics or Vec<T>s.
To compute the individual liquidity positions that correspond to a desired payoff, we embed a solver into the
dex_utils
crate. Even though the crate importsndarray
, the solver itself is self-contained and does not depend on a specific BLAS/LAPACK backend. It uses data structures and helper methods provided byndarray
so that the high-level code is easier to read. However, this is rather inconvenient since that means we cannot use the crate in a wasm context.Instead of using
ndarray
data structures, the crate should drop use ofndarray
and either use const generics orVec<T>
s.