balancer / balancer-v3-monorepo

GNU General Public License v3.0
37 stars 10 forks source link

Guardrails (Step 1a: minimum trade amount - allow 0) #751

Closed EndymionJkb closed 2 months ago

EndymionJkb commented 2 months ago

Description

Variant of minimum Guardrails built on #748 , which allows 0-value swaps. This removes the special case we'd otherwise need for donations. It also allows 100% fees (but not near 100% fees that would result in small trades. So I'm not sure this is really better. It allows exactly 100%, but there is a "gap" of disallowed values that you'd have to calculate (see the corresponding test: FixedPoint.ONE - MIN_TRADE_AMOUNT.divDown(defaultAmount)).

Type of change

Checklist:

Issue Resolution