balancer-v2-monorepo icon indicating copy to clipboard operation
balancer-v2-monorepo copied to clipboard

WeightedPool simulator

Open EndymionJkb opened this issue 2 years ago • 0 comments

Written to investigate the behavior of extreme swap fees, the infrastructure created for the fee simulation could be reused for other purposes. (In any case I didn't want to lose it.)

This was written before the Python simulation tools being developed by Integrations, but having a "native" TS way to do this right in the repo might be useful as well. You can create a WeightedPool with arbitrary tokens and weights, and "seed" it with a given set of prices and desired total dollar amount of liquidity, so that the starting balances will be realistic.

This could be used to write new benchmark tests.

EndymionJkb avatar Jun 17 '22 20:06 EndymionJkb