asgayapedia

Payment Info Exchange Method

Category: Technical
Impact: High (affects every covenant creation)
Phase: Phase 0 critical
Status: Open for collaboration

Update (2026-09-09): decided — coordination uses Nostr NIP-17 gift-wrapped DMs (NIP-44 encryption), not NIP-04. This document is the exploration that led there; see nostr.md.


The Question

How should the sender obtain the seller’s payment details (bank account, reference code, amount) in a way that is peer-to-peer, censorship-resistant, and privacy-preserving?


Why This Matters

Under Asgaya’s payment-first, lock-second flow:

  1. Sender creates covenant on-chain
  2. Sender selects a BCH seller from bulletin board
  3. Sender needs seller’s payment details to pay fiat via Bizum/SEPA
  4. Seller’s bot locks BCH only after receiving fiat payment

The payment info delivery is a critical checkpoint that also serves as a seller liveness check: if the seller’s bot doesn’t respond with payment details, the sender knows not to proceed with the fiat payment.


Design Requirements

The payment info exchange mechanism must satisfy:

Must Have:

Nice to Have:


Options Considered (historical)

Option 1: Nostr Direct Messages — NIP-04 → superseded by NIP-17

How it works:

1. Seller includes Nostr pubkey in bulletin board listing
2. Sender's app sends encrypted DM: "Need payment info for covenant_xyz789"
3. Seller's bot responds via encrypted DM with payment details
4. Total latency: <1 second

Pros:

Cons:

Estimated effort: Low (Nostr already integrated)


Option 2: Encrypted OP_RETURN on BCH

How it works:

1. Sender posts request to blockchain (optional)
2. Seller's bot posts OP_RETURN transaction with payment info
3. Payment info encrypted with ECIES using sender's covenant pubkey
4. Sender's bot monitors blockchain, decrypts info
5. Total latency: ~2 minutes (one block confirmation)

Pros:

Cons:

Estimated effort: Moderate (requires encryption library and monitoring)


Alternative Proposals Welcome

The Bitcoin Cash community may have better solutions we haven’t considered:

Possible alternatives:

What we’re looking for:


Success Criteria

A solution is considered successful if:

  1. Reliability: >99% success rate in delivering payment info within 2 minutes
  2. Privacy: Payment details only readable by intended sender
  3. Censorship resistance: Works even if some infrastructure is blocked/down
  4. User experience: Feels instant to user (<5 second perceived latency)
  5. Implementation: Can be built and tested within 2-4 weeks
  6. Maintenance: Doesn’t require constant manual intervention

Investigation Methods

1. Protocol Analysis

2. Security Review

3. Performance Testing

4. Community Feedback


How to Contribute

If you have expertise in:

We’d love your input on:

  1. Which option (Nostr or OP_RETURN) is better for Phase 0?
  2. Are there hybrid approaches we should consider?
  3. What edge cases or failure modes are we missing?
  4. Are there existing BCH projects solving similar problems?

How to help:


Technical Context:

Architectural Context:


Current Status

Decision: ✅ Made — Nostr NIP-17 gift-wrapped DMs (NIP-44 encryption), not NIP-04. See nostr.md.
This page is the exploration that led there (kept for the decision trail); the “Options” and “Questions for Discussion” below are historical.


Questions for Discussion

  1. Nostr relay trust: How much do we trust Nostr relay operators? Can they censor specific message types?

  2. On-chain bloat: Is 200 bytes per covenant acceptable permanent on-chain storage? Or is this wasteful?

  3. Hybrid approach: Should we implement both (Nostr primary, OP_RETURN fallback)? Or is this over-engineering?

  4. User messaging: If Nostr is chosen, should we also enable user-to-user messaging for coordination? (sender→recipient, recipient→merchant)

  5. Future-proofing: Which approach is more likely to still work in 5 years? 10 years?


This unknown represents a critical Phase 0 design decision. Your expertise can help Asgaya choose the right path.

Last updated: 2026-05-31
Status: Seeking community input —

🏠 Home ↑ Unknowns 📖 Glossary