[stableswap]: Implement maxNumAssets
and maxTokensPerAsset
to ensure multi-asset pools can't overflow
#2827
Labels
maxNumAssets
and maxTokensPerAsset
to ensure multi-asset pools can't overflow
#2827
Background
Even with extremely generous precision bounds, since we're dealing with non-linear
k
values for our stableswap CFMM it will almost always be possible to trigger an overflow if we don't bound the number of assets and the number of tokens for each asset. We should implementmaxNumAssets
andmaxTokensPerAsset
and add related checks to all pool creation and swapping logic to ensure that CFMM inputs are bounded.Suggested Design
maxNumAssets
andmaxTokensPerAsset
to numbers that fit within our expected precision bounds. The specific numbers are TBD depending on the max number of assets we want to be able to accommodate in a single multi-asset poolAcceptance Criteria
The text was updated successfully, but these errors were encountered: