Skip to content

Atomic Swap Contract #309

Description

@Mkalbani

Location: contracts/atomic_swap
Language: Rust (Soroban)
Estimated Time: 7 hours
Difficulty: Medium

Description

Implement an atomic swap enabling trustless token exchanges between two parties using time-lock conditions.

Tasks

  • Design atomic swap structure
  • Implement initiator swap creation
  • Add participant acceptance
  • Create hash-time-locked contract (HTLC)
  • Implement secret reveal mechanism
  • Add timeout refund logic
  • Create swap status queries
  • Write comprehensive tests
  • Implement swap history
  • Add replay protection

Acceptance Criteria

  • Swaps created with time-locks
  • Both parties must reveal secrets
  • Timeout refunds escrow
  • Swap atomic (all-or-nothing)
  • History tracked
  • All tests pass

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions