Skip to content

fix: address Soroban escrow submission and payout issues - #909

Merged
chonilius merged 2 commits into
MergeFi:mainfrom
cristianooR7:fix/issues-752-755-756-757
Nov 20, 2026
Merged

chonilius merged 2 commits into
MergeFi:mainfrom
cristianooR7:fix/issues-752-755-756-757

Conversation

@cristianooR7

Copy link
Copy Markdown

What this PR does

Fixes the Soroban submission, fee bidding, dry-run accounting, and payout ledger issues so escrow state and reported payouts reflect the actual chain outcome.

Closes

Closes #752
Closes #755
Closes #756
Closes #757

What changed

  • Retry TRY_AGAIN_LATER submissions with a bounded delay, handle DUPLICATE by polling the existing hash, and fail explicitly on ERROR.
  • Add configurable Soroban inclusion fees and bounded fee-bump resubmissions when a transaction remains unconfirmed.
  • Require explicit SOROBAN_DRY_RUN=true for synthetic results and persist dry-run escrow/payment statuses.
  • Read the contract fee basis points, record recipient payments net of fees, and add separate protocol-fee ledger rows; exclude fees from payout reporting.
  • Add a migration, regression specs, and operator documentation for the new configuration and ledger behavior.

How to test

  1. Review the added specs for send statuses, dry-run persistence, inclusion-fee escalation, and net payout plus fee accounting.
  2. Run the relevant unit and integration specs, then the lint/build checks listed below.
  3. Exercise an escrow payout against a configured Soroban contract and verify recipient payment rows plus the protocol-fee row sum to the gross escrow amount.

Not run at the author's request.

Checklist

  • npm run lint passes locally
  • npm run build passes locally
  • npm test passes locally
  • npm run test:e2e passes locally (needs Postgres ? see README "Running Tests")
  • New behaviour has a spec, and a fixed bug has a regression test
  • A new environment variable is documented in .env.example
  • A schema change ships with a migration (npm run migration:generate)

Money path

  • New money-moving routes are @Idempotent() and guarded by RolesGuard
  • The module spec (*.module.spec.ts) still covers the providers and
    repositories this change relies on
  • Behaviour is correct in dry-run mode and against a configured contract
    (see README "Dry-run mode")

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel

vercel Bot commented Nov 20, 2026

Copy link
Copy Markdown

@Rickyy1017 is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Nov 20, 2026

Copy link
Copy Markdown

@cristianooR7 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! 🚀

Learn more about application limits

@chonilius
chonilius merged commit b4497cf into MergeFi:main Nov 20, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment