Skip to content

Harden Sirius adapter transaction boundaries - #259

Draft
KevinMehrabi wants to merge 1 commit into
trunkfrom
fix/sirius-adapter-hardening
Draft

Harden Sirius adapter transaction boundaries#259
KevinMehrabi wants to merge 1 commit into
trunkfrom
fix/sirius-adapter-hardening

Conversation

@KevinMehrabi

Copy link
Copy Markdown
Contributor

Summary

  • match the immutable Sirius contract's intermediate integer-floor order in both direct swap directions
  • reject unsupported assets, malformed pool configurations, zero outputs, zero SIRS results, unsafe slippage, and inexact contract parameters
  • apply slippage to the minimum SIRS minted and keep allowance reset, approval, action, and cleanup in one atomic wallet batch
  • exclude Sirius token-to-token routing from the registry and swap UI
  • add direct adapter tests and a focused security review

Why

The previous adapter could overquote a swap by one atomic unit, did not protect the minimum liquidity-token output with user-selected slippage, and lacked direct regression coverage for the external contract boundary.

Closes #249.

Validation

  • npm run verify
  • 22 test suites and 88 tests passed
  • 26 focused Sirius and routing tests passed
  • TypeScript, ESLint, npm's configured high-severity audit threshold, and the optimized production build passed

Release gate

Keep this pull request in draft until both direct swaps, add/remove liquidity, wallet rejection, and allowance cleanup have been rehearsed with a no-broadcast simulation or controlled test wallet.

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.

Harden and directly test the Sirius adapter

1 participant