In the EP consumer we were setting minBuyAmount = quote.worstCaseQuoteInfo.makerAssetAmount, which would allow for very high slippage because the quote simulator (who populates this value) finds the actual worst case, irregardless of slippage limits.
:heavy_check_mark: SWRV/WETH pairs that slip >1% now revert as incomplete fills in simbot.
Testing instructions
Types of changes
Checklist:
[ ] Prefix PR title with [WIP] if necessary.
[ ] Add tests to cover changes as needed.
[ ] Update documentation as needed.
[ ] Add new entries to the relevant CHANGELOG.jsons.
Coverage remained the same at 78.711% when pulling c782d9d41ff2839e2c929459be90d3549b9c1de8 on fix/asset-swapper/respect-max-slippage-in-ep-consumer into 6f78832a13ecb4a23abf4eaf62b60f01cfce1970 on fix/balancer-sampling.
Description
In the EP consumer we were setting
minBuyAmount = quote.worstCaseQuoteInfo.makerAssetAmount
, which would allow for very high slippage because the quote simulator (who populates this value) finds the actual worst case, irregardless of slippage limits.:heavy_check_mark: SWRV/WETH pairs that slip >1% now revert as incomplete fills in simbot.
Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.