fix slippage

This commit is contained in:
thloyi
2026-04-20 12:31:30 +08:00
parent 1dd843c393
commit fe94888b14
6 changed files with 116 additions and 36 deletions

View File

@@ -68,7 +68,7 @@ Interpretation:
- Positive: execution is better than the user limit
- Zero: execution lands exactly on the user limit
- `10000`: user limit is effectively unbounded on the constrained side (for example `min_out = 0`)
- Negative: this usually indicates an incorrect parser-side mapping or inconsistent source data
- Negative raw headroom is clamped to `0` because successful-swap storage uses a non-negative bounded metric
This definition makes `SlippageBps` a bounded "remaining headroom to the user's limit" metric for successful swaps: