Skip to content

Add exact depot swap quotes with pending yield and output fees - #98

Merged
joshglogau merged 9 commits into
masterfrom
feature/depot-swap-quotes
Oct 15, 2026
Merged

joshglogau merged 9 commits into
masterfrom
feature/depot-swap-quotes

Conversation

@joshglogau

@joshglogau joshglogau commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Add contracts.sysio.swap.quoteSwap, a pure exact-input depot estimate over generated pool and LIQ rows. It accrues pending holder yield before pricing and returns exact gross output, output-denominated fees, net output and minimum output.

  • Preserve contract integer rounding, token precision and overflow checks; reject missing yield snapshots and unsafe numeric inputs.
  • Keep RPC, signing, action construction and execution readiness with consumers. No new dependency, generated ABI, operator facade or package bump.
  • Document the source revision, exact pool/holder/yield-index lookups, verified absent rows and snapshot coherence limits in the SDK README, alongside a working quick start and contract examples.

Validation: workspace build, lint and 969 tests / 84 suites pass, including 22 quote cases. README TypeScript examples also pass strict type checking. Published producer dependencies were used without sibling artifact links. Lockfile validation and platform flow tests remain waived; live swap parity is not claimed.

Consumer: Wire-Network/wire-hub-webapp#191 uses indicative quotes with execution disabled. #108 separately updates outpost artifacts. Publish this helper through the normal SDK release after review; execution consumers must refresh coherent state, validate authority/Andon and enforce positive minimum output on chain.

@joshglogau
joshglogau changed the base branch from feature/syndication-underwriting to master October 8, 2026 18:37
@joshglogau
joshglogau marked this pull request as ready for review October 8, 2026 18:37
@joshglogau
joshglogau requested a review from valthon October 8, 2026 18:39
Removed details about artifact library consumption and depot trade estimation from the SDK core section.
Removed outdated sections on account decoder, swap quotes, API documentation, and tests. Consolidated installation and documentation information.

@valthon valthon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking correctness findings. The 22 quote tests passed locally against this head, and hosted CI passed. Arithmetic matches the inspected depot source; live swap parity and the full local CI gate were not rerun. One nonblocking documentation finding is attached inline.

Comment thread CLAUDE.md Resolved
@joshglogau
joshglogau merged commit 2a1678c into master Oct 15, 2026
1 check passed
@joshglogau
joshglogau deleted the feature/depot-swap-quotes branch October 15, 2026 15:35
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.

3 participants