Description
Two related gaps in the live, deployed contract (contracts/trustflow/src/lib.rs):
-
No happy-path fund release. The only code path that ever transfers escrowed tokens out of the contract is resolve_dispute (~line 534), which only runs after a dispute has been raised and voted on. There is no approve_milestone, release, or withdraw entrypoint for the non-disputed case, despite EscrowRecord.milestones and init_escrow (~line 256) accepting a Vec<Milestone>. It's unclear whether release for undisputed milestones is meant to be triggered by depositor sign-off, a timelock, or an external event.
-
No TTL/rent management. The contract writes many storage().persistent() entries (Escrow, Dispute, JurorStake, JurorVote, DisputeVoters, JurorSlashCount) but never calls extend_ttl/bump anywhere — contrast with the (dead) contracts/src/storage.rs::extend_ttl. On Soroban, persistent entries that aren't extended will expire and archive, which could permanently lock funds in an escrow or dispute that nobody paid to keep alive.
Both are blocking gaps for a protocol that's meant to actually pay people.
Component
Contract
Difficulty
🟣 Spike — investigation required, scope not yet defined
Tasks
Acceptance Criteria
Estimated Time
2-3 days (time-boxed spike)
Description
Two related gaps in the live, deployed contract (
contracts/trustflow/src/lib.rs):No happy-path fund release. The only code path that ever transfers escrowed tokens out of the contract is
resolve_dispute(~line 534), which only runs after a dispute has been raised and voted on. There is noapprove_milestone,release, orwithdrawentrypoint for the non-disputed case, despiteEscrowRecord.milestonesandinit_escrow(~line 256) accepting aVec<Milestone>. It's unclear whether release for undisputed milestones is meant to be triggered by depositor sign-off, a timelock, or an external event.No TTL/rent management. The contract writes many
storage().persistent()entries (Escrow, Dispute, JurorStake, JurorVote, DisputeVoters, JurorSlashCount) but never callsextend_ttl/bump anywhere — contrast with the (dead)contracts/src/storage.rs::extend_ttl. On Soroban, persistent entries that aren't extended will expire and archive, which could permanently lock funds in an escrow or dispute that nobody paid to keep alive.Both are blocking gaps for a protocol that's meant to actually pay people.
Component
Contract
Difficulty
🟣 Spike — investigation required, scope not yet defined
Tasks
release_milestone/approve_milestoneentrypoint against Soroban testnetAcceptance Criteria
Estimated Time
2-3 days (time-boxed spike)