Repository navigation
Implement cross-chain bridge payment relay for invoices #343
Copy link
Copy link
Open
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignCampaign: Official CampaignOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26complexity: highComplex feature requiring deep knowledge - 200 ptsComplex feature requiring deep knowledge - 200 ptsfeatureNew contract feature or operationNew contract feature or operationgrantfoxIssue for GrantFox programIssue for GrantFox program
Description
Overview
Add support for accepting invoice payments relayed from other chains (e.g. Ethereum, Solana) via a trusted bridge contract. The StellarSplit contract must verify a signed relay proof before crediting the payment, so no funds can be injected without a valid cross-chain attestation.
Requirements
- Define a
bridge_payentry point that accepts a relay proof struct (BridgeProof) containing: source chain ID, source tx hash, sender address bytes, amount, and a bridge authority signature - Verify the signature against a stored
bridge_authorityadmin key before crediting - Emit a
BridgePaymentReceivedevent with full proof metadata - Integrate with the existing payment flow — trigger auto-release if the invoice becomes fully funded
- Reject replayed proofs (store consumed tx hashes)
- Write unit tests covering: valid relay, invalid signature, replayed proof, wrong invoice, wrong amount
Acceptance Criteria
-
bridge_payentry point implemented and callable - Signature verification passes for valid proofs and rejects tampered ones
- Replay protection: second call with same tx hash panics with
AlreadyConsumed - Auto-release triggers correctly when bridge payment fully funds an invoice
- All existing tests continue to pass
- New tests cover all acceptance criteria above
-
cargo test --workspacepasses with zero failures -
cargo clippy --all-targets -- -D warningsproduces zero warnings
Definition of Done
All CI checks must pass before the PR is reviewed. PRs with failing tests or clippy warnings will not be merged.
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignCampaign: Official CampaignOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26complexity: highComplex feature requiring deep knowledge - 200 ptsComplex feature requiring deep knowledge - 200 ptsfeatureNew contract feature or operationNew contract feature or operationgrantfoxIssue for GrantFox programIssue for GrantFox program
Activity
nurudeenheroic commentedon Jul 16, 2026
Hi! I'd love to work on this. I'm confident I can deliver a clean solution.
Achievers-sketch commentedon Jul 16, 2026
Experienced building Soroban smart contracts, secure cross-chain payment relays, signature verification, replay protection, event handling, and comprehensive Rust test suites.
guptakumarranjeet150 commentedon Sep 13, 2026
Hi everyone,
I would love to take this on. My planned approach:
Implement cross-chain bridge payment relay for invoiceswith explicitrequire_authchecks, clean storage layouts, and robust Soroban contract logic.Happy to pick this up today—please assign to me!
ranjeet150 commentedon Sep 14, 2026
Hi maintainers,
I would like to resolve this issue. Here is my proposed execution plan:
Implement cross-chain bridge payment relay for invoiceswith explicitrequire_authchecks, clean storage layouts, and robust Soroban contract logic.Looking forward to contributing—please feel free to assign!
shobhamerabacha-star commentedon Sep 14, 2026
Hello! I'd like to work on this issue.
I would like to resolve this issue. Here is my proposed execution plan:
Implement cross-chain bridge payment relay for invoiceswith explicitrequire_authchecks, clean storage layouts, and robust Soroban contract logic.Happy to pick this up today—please assign to me!
huangji6693-max commentedon Oct 26, 2026
Hi maintainers! I have implemented the cross-chain bridge payment relay for invoices (
bridge_pay,BridgeProof,set_bridge_authority,BridgePaymentReceived) and submitted PR: #1061Summary:
bridge_pay(env, payer, invoice_id, amount, proof: BridgeProof)verifies the Ed25519 signature against the storedbridge_authoritykey (set_bridge_authority), enforces replay protection onsource_tx_hash(AlreadyConsumed), emitsBridgePaymentReceived, and auto-releases when fully funded.cargo test -p split issue_343_tests&cargo test -p split storage_snapshot).