Skip to content

feat: multi-sig escrow release + Stellar HTLC bridge + relayer (#564, #565) - #650

Merged
Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
dimka90:feat/564-565-multisig-escrow-htlc-bridge
Jul 28, 2026
Merged

feat: multi-sig escrow release + Stellar HTLC bridge + relayer (#564, #565)#650
Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
dimka90:feat/564-565-multisig-escrow-htlc-bridge

Conversation

@dimka90

@dimka90 dimka90 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements cross-chain HTLC bridge and multi-sig escrow release features.

#564 - Multi-signature escrow release with configurable threshold policies

The escrow release mechanism was single-signature, posing trust issues for high-value transactions. Now supports configurable M-of-N threshold policies per project.

Changes:

  • backend/src/services/escrow.ts: Added MultisigEscrowPolicy, MultisigReleaseRequest types. New methods: createReleaseRequest(), approveReleaseRequest(), rejectReleaseRequest(), executeReadyReleases(). Event emission via EventEmitter for all signature submissions.
  • backend/src/routes/escrow.ts: New endpoints for /release-request, /release-request/approve, /release-request/reject, /execute-ready-releases.

#565 - Cross-chain bridge with HTLC atomic swap for Stellar-EVM transfers

The EVM BridgeHTLC.sol already existed. This adds the Stellar Soroban HTLC contract and a relayer service for coordinating swaps.

Changes:

  • contracts/src/lib.rs: Added HtlcLock, HtlcStatus, BridgeConfigData types. New contract functions: init_bridge_config, update_bridge_config, create_htlc_lock, claim_htlc (SHA-256 verification), refund_htlc, get_htlc_lock, get_bridge_config. 4 contract tests.
  • backend/src/services/bridge-relayer.ts: BridgeRelayerService - monitors cross-chain swaps through their lifecycle (initiated -> locked -> redeemed/expired).
  • backend/src/routes/relayer.ts: REST API for swap management, secret reveal, config, and analytics.

Closes #564
Closes #565

Smartdevs17#564: Multi-sig escrow release with configurable threshold policies
- Added MultisigEscrowPolicy type with configurable threshold per project
- Implemented createReleaseRequest, approveReleaseRequest, rejectReleaseRequest
- Time-locked release with challenge periods (challengeEndsAt)
- Event emission for all signature submissions via EventEmitter
- Blocking threshold: rejects block when count >= (signers - threshold + 1)
- executeReadyReleases() sweeps all eligible requests
- 9 unit tests covering full lifecycle

Smartdevs17#565: Cross-chain HTLC bridge for Stellar-EVM transfers
- Added HtlcLock, HtlcStatus, BridgeConfigData types to Soroban contract
- Implemented create_htlc_lock, claim_htlc (SHA-256 secret verification),
  refund_htlc on Stellar side
- Bridge config with fee_bps, fee_collector, pause controls
- BridgeRelayerService: monitors cross-chain swaps, manages lifecycle
  (initiated -> locked -> redeemed/expired), emits events
- Relayer REST API: POST/GET /swaps, POST /reveal, /config, /analytics
- 8 unit tests for relayer service

Closes Smartdevs17#564
Closes Smartdevs17#565
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@dimka90 is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@dimka90 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

@Smartdevs17
Smartdevs17 merged commit 81f0119 into Smartdevs17:main Jul 28, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants