chore: Define minimum slippage tolerance #2137
Labels
oncall
Issue/PR for consideration during oncall rotation
track:services-maintenance
services maintenance track (Protocol)
Background
We had an alert about frequently failing settlements on Gnosis Chain, which seems to be due to setting too little slippage tolerance.
Details
Some users on Gnosis Chain trade ridiculously small amounts (example). Those solutions are particularly prone to reversion because the way Gnosis solvers compute slippage tolerance is a relative volume % capped at some maximum value.
Now 0.1% slippage tolerance of a minuscule value is an even smaller absolute value making solutions very prone to revert if the underlying AMM has the slightest change in reserves (cf. this simulation)
Acceptance criteria
Similar to the maximum absolute-slippage, allow to define a minimum absolute slippage which is being respected in the solutions
services/crates/solvers/src/infra/config/dex/file.rs
Lines 34 to 36 in 5b7201f
The text was updated successfully, but these errors were encountered: