-
Notifications
You must be signed in to change notification settings - Fork 36
Spike: Define the on-chain write path for escrow actions (create/release/dispute) #180
Copy link
Copy link
Closed
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 Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26Third CampaignCampaign: Third CampaignCampaign: Third Campaignbackenddifficulty: spikeResearch/investigation issue — scope and approach are not yet definedResearch/investigation issue — scope and approach are not yet definedpriority: highHigh priority issueHigh priority issuequestionFurther information is requestedFurther information is requestedweb3
Description
Activity
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 Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26Third CampaignCampaign: Third CampaignCampaign: Third Campaignbackenddifficulty: spikeResearch/investigation issue — scope and approach are not yet definedResearch/investigation issue — scope and approach are not yet definedpriority: highHigh priority issueHigh priority issuequestionFurther information is requestedFurther information is requestedweb3
Description
EscrowService(src/escrow/escrow.service.ts) is a purely in-memory store —create,release, andraiseDisputenever build, sign, or submit a Soroban transaction. Meanwhile the event-ingestion pipeline (src/event-ingestion/ledger-cursor.service.ts→event-processor.service.ts) already consumes on-chain Soroban events and applies them toEscrowService, so a read path from chain to API state exists, but no write path from the API back to chain exists at all.It's unclear whether the intended design is:
trustflow-sdk/ the frontend, with the backend acting as a pure event-driven read cache and the REST endpoints (POST /escrows,POST /escrows/:id/release,POST /escrows/:id/dispute) only reflecting/validating local state until the on-chain event round-trips back through ingestion.This ambiguity blocks writing a real implementation ticket, and it directly affects the SDK's
TrustFlowEscrowClient(currently mocked) and the contract's missing non-disputed release entrypoint — both flagged in sibling spike issues in their respective repos.Component
Backend
Difficulty
🟣 Spike — investigation required, scope not yet defined
Tasks
event-ingestionwould eventually observe itrelease) using the chosen approach against Soroban testnetstellar/soroban.helper.ts/stellar/stellar.service.ts, which exist but aren't wired intoEscrowServiceAcceptance Criteria
Estimated Time
2-3 days (time-boxed spike)