DEV Community

Daniel Ioni
Daniel Ioni

Posted on

MyZubster Marketplace: Accept BTC or ETH, Settle in XMR

MyZubster Marketplace: Accept BTC or ETH, Settle in XMR

We're expanding MyZubster from a knowledge-provenance experiment into a marketplace where people can exchange physical resources, skills, lessons, mentoring and collaboration.

And we're now exploring the payment layer.

The idea is:

Let marketplace participants accept Bitcoin or Ethereum while allowing the recipient to settle in Monero.

Conceptually:

Buyer

├── BTC

└── ETH


Payment intent


Confirm payment


Conversion / swap layer


XMR


Seller settlement

But there is an important distinction between what MyZubster already implements and what we're designing next.

What already exists

MyZubster already has a growing protocol for marketplace-related knowledge and resource exchanges.

A marketplace object can conceptually represent:

Physical resource
Skill lesson
Mentoring
Workshop
Demonstration
Collaboration request

We have also introduced a Skill Marketplace protocol.

A skill exchange can be represented as:

Teacher

Skill listing

Learner accepts

Session

Learner attempts the skill

Evidence

MyZubster record

This is already being connected to real knowledge domains including fermentation, programming, sound systems, art, sport, martial arts and music.

The repository currently contains the Knowledge Protocol, Resource + Knowledge Transfer Protocol and Skill Marketplace Protocol.

Why Monero is already part of the architecture

Monero is already a first-class MyZubster knowledge domain:

XMR-*

But we're deliberately keeping knowledge about Monero separate from financial advice or promises of anonymity.

More importantly, MyZubster already distinguishes between something being stored by the application and something actually being committed to a blockchain.

RECORDED

is not the same as:

ONCHAIN_RECORDED

We only want to use ONCHAIN_RECORDED when an actual blockchain operation provides a verifiable network and transaction/record identifier.

What we're designing now

The next marketplace layer would allow a seller to define something similar to:

{
acceptedAssets: ["BTC", "ETH"],
settlementAsset: "XMR"
}

The buyer could therefore pay with an asset they already hold.

For example:

Alice sells a drawing lesson

Price / quote

Bob chooses BTC

BTC payment

Payment confirmed

BTC → XMR conversion

XMR settlement

Alice

Or:

Carol offers a calisthenics session

Buyer chooses ETH

ETH payment

ETH → XMR conversion

XMR settlement

The marketplace transaction and the knowledge-transfer record would remain separate.

That's important.

Paying for a lesson doesn't prove that the lesson happened.

And:

recording a lesson doesn't prove that payment happened.

The records should be separate

We're thinking about the architecture as several independently verifiable objects.

MARKETPLACE LISTING

├───────────────┐
▼ ▼
PAYMENT INTENT SKILL TRANSFER
│ │
▼ ▼
PAYMENT SESSION
│ │
▼ ▼
CONVERSION EVIDENCE
│ │
▼ ▼
XMR SETTLEMENT KNOWLEDGE GRAPH

This separation follows the same philosophy already used throughout MyZubster:

never infer one event from another event.

What the payment code still needs

This is the part that is not implemented yet.

We still need a real payment model, something along the lines of:

PaymentIntent {
id,
listingId,
payer,
recipient,

inputAsset,
inputAmount,

settlementAsset: "XMR",
expectedSettlementAmount,

quoteId,
quoteExpiresAt,

paymentAddress,
paymentTxId,

conversionId,
settlementTxId,

status
}

The state machine could then enforce transitions such as:

CREATED

QUOTED

AWAITING_PAYMENT

PAYMENT_DETECTED

PAYMENT_CONFIRMED

CONVERSION_PENDING

CONVERTED

SETTLEMENT_PENDING

SETTLED

with explicit failure/refund/expiry states as well.

The exact model still needs to be implemented and tested.

BTC → XMR and ETH → XMR aren't just one API call

There are several engineering questions we still have to solve.

We need to decide how conversion is performed, who executes it, how quotes expire, how exchange-rate movement is handled, how many confirmations are required, what happens when somebody sends the wrong amount, how refunds work, and what happens if payment succeeds but conversion or settlement fails.

We also need to decide whether the architecture is custodial or non-custodial wherever technically possible.

Those aren't UI details.

They're part of the payment protocol.

We also need a reconciliation layer

A robust implementation should be able to distinguish:

payment requested
payment detected
payment confirmed
conversion requested
conversion completed
XMR settlement broadcast
XMR settlement confirmed

Every external identifier needs provenance.

For example:

{
inputNetwork: "BITCOIN",
inputTxId: "...",

conversionProvider: "...",
conversionReference: "...",

settlementNetwork: "MONERO",
settlementTxId: "..."
}

If one of those values isn't available, MyZubster shouldn't manufacture it.

It remains unknown or pending.

That's the same rule we're applying to our Knowledge Graph.

Blockchain doesn't equal truth

This is especially important for MyZubster.

Suppose somebody pays for a Thai-boxing lesson.

We might eventually have:

BTC payment

BTC → XMR

XMR settlement

and independently:

Coach

Session

Learner

Learner attempt

Evidence

A blockchain transaction can provide evidence about the payment.

It does not prove that the learner attended the session or learned Thai boxing.

The knowledge protocol handles that separately.

Why we're doing it this way

MyZubster is slowly becoming a graph of different kinds of exchange:

RESOURCE GRAPH
Who gave what to whom?

KNOWLEDGE GRAPH
Who taught what to whom?

EVIDENCE GRAPH
What observations support the claim?

MARKETPLACE GRAPH
What was offered and accepted?

PAYMENT GRAPH
What was paid and how was it settled?

Those graphs can reference each other without pretending that one proves all the others.

That's the architecture we're working toward.

Where the project is today

The open-source repository already contains the domain/evidence engine, Knowledge Cards, provenance records, knowledge relations, collaboration records, reproduction/version tooling, integrity checks, transaction/recovery logic, Knowledge API and the new marketplace/knowledge-transfer protocols. The current repository tree also contains the new ART-001 card alongside the existing knowledge records.

What isn't there yet is equally important:

no production BTC payment processor, no ETH payment processor, no BTC→XMR or ETH→XMR conversion engine, no XMR settlement service, and no production wallet/custody implementation.

That's what comes next.

Follow the code here:

MyZubster on GitHub

Explore the currently deployed knowledge layer here:

MyZubster Knowledge Explorer

Next step

The next implementation milestone is turning this architecture into actual schemas and runtime code:

Marketplace Listing

Payment Intent

BTC / ETH payment

Confirmation

Conversion

XMR settlement

Verifiable payment provenance

Then we can connect payment provenance to the resource and knowledge graphs without conflating payment with proof of learning or delivery.

That's the next piece we're building.

Top comments (0)