Skip to content

[codex] Reject zero standard stableswap convergence threshold#23

Open
caydyan wants to merge 1 commit into
BitflowFinance:mainfrom
caydyan:codex/reject-standard-convergence-zero
Open

[codex] Reject zero standard stableswap convergence threshold#23
caydyan wants to merge 1 commit into
BitflowFinance:mainfrom
caydyan:codex/reject-standard-convergence-zero

Conversation

@caydyan

@caydyan caydyan commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • reject change-convergence-threshold u0 in the standard stableswap contract
  • keep positive threshold updates unchanged
  • add regression coverage for the rejected zero path and accepted positive path

Why

A zero convergence threshold removes the tolerance used by the iterative stable-swap solvers, which can make convergence behavior brittle or unreachable. The StackingDAO stableswap path now rejects this value; the standard stableswap path should apply the same guard.

Validation

  • git diff --check
  • clarinet check
  • clarinet console confirmed (err "err-invalid-convergence-threshold") for u0 and (ok true) for u1

Note: the local environment does not have deno, so the TypeScript Clarinet tests were added but not executed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant