nibiru icon indicating copy to clipboard operation
nibiru copied to clipboard

test(vpool): On pool init, the `SqrtDepth` should be equivalent to the base reserves because the base and reserves start out equal.

Open Unique-Divine opened this issue 3 years ago • 3 comments

Unique-Divine avatar Apr 07 '23 05:04 Unique-Divine

Should we require the base = quote at init by design?

matthiasmatt avatar Apr 14 '23 09:04 matthiasmatt

maybe initialize pool with just phi instead of reserves

matthiasmatt avatar Apr 14 '23 09:04 matthiasmatt

Personally, I'd prefer to pass in both baseReserve, sqrtDepth and pegMult as with the Drift convention as to not confuse ourselves. And we can just edit the initialize helper function:

	market := types.NewMarket(types.ArgsNewMarket{
		Pair:          pair,
		BaseReserves:  baseAssetReserve,
		QuoteReserves: quoteAssetReserve,
		Config:        &config,
		Bias:          bias,
		PegMultiplier: pegMultiplier,
	})

Unique-Divine avatar Apr 14 '23 15:04 Unique-Divine