Repository navigation
Slippage-protected swaps, swap test suite, and contract ABI docs - #1344
Merged
martinzhames merged 4 commits intoOct 23, 2026
Merged
Conversation
…dity_rout Closes dupdab#1223
|
@charityagbenu12-cmd Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
# Conflicts: # .github/workflows/ci.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slippage-protected swaps, swap test suite, and contract ABI docs
What was solved
#1223 — [P1] slippage_protection: add integration with liquidity_router contract
Wire the standalone slippage_protection contract into liquidity_router so every USDC→fiat swap is gated by a slippage check, add integration tests for breach rejection and in-bounds success, and support per-merchant max slippage sourced from merchant_registry metadata.
Addressed:
#1224 — [P1] Add Soroban contract ABI documentation (JSON schemas)
Add machine-readable Soroban contract ABI documentation: generate one JSON ABI file per contract under docs/abi/, link them from the README, and add a CI step that regenerates/verifies the ABIs are up to date.
Addressed:
#1232 — [P1] liquidity_router: add slippage-protected swap test with real token mocks
Add a slippage-protected swap test suite to the liquidity_router contract using real token mocks (USDC and fiat token), covering successful swaps within tolerance, reverts when price moves beyond tolerance, and fee deduction before swap, plus documentation of the expected liquidity source.
Addressed:
Changes
dabdub_contracts/contracts/liquidity_router/src/test.rs(modify)dabdub_contracts/contracts/liquidity_router/src/lib.rs(modify)dabdub_contracts/contracts/liquidity_router/Cargo.toml(modify)README.md(modify)docs/abi/README.md(create).github/workflows/ci.yml(modify)Approach
Issues
Closes #1223
Closes #1224
Closes #1232