bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 19쪽 중 14쪽
gnals the order is being fulfilled.
– Offline payment: If a vendor is offline, the buyer creates and funds a 1-of-2 multisig
address with enough money to cover their intended purchase. When the vendor comes
online, they may take money out of the multisig address (sending change back to the
buyer), and fulfill the order. If the vendor never comes back online (or e.g. after some
reasonable waiting period), or if the buyer changes their mind before he comes back,
the buyer may empty the 1-of-2 address back into her personal wallet.
• Moderated purchasing: A 2-of-3 multisig address is constructed between the buyer, vendor,
and a moderator agreed on by both buyer and vendor. The buyer funds this address before
vendor fulfillment, and then once the product is delivered two of the parties cooperate to
release the funds. If the vendor and buyer can’t reach an agreement, they may enlist the
moderator’s judgement.
We will not cover high-trust purchasing, as, without any complex communication required, the
features are fairly trivial. 4
10.1.1 Purchasing workflow
All purchases should fit within the same set of steps, assuming all parties do their due diligence.
A number of steps are related to what a moderator should expect when stepping in, e.g. “did you
request a refund, before getting me involved?”.
1. A buyer accesses the vendor’s online shop, identifies a purchase to make, selects ‘I want to
purchase it’, makes funding available for that purchase, then submits the purchase order to
the vendor.
3 Fulfilling a purchase order means sending the product out to be delivered to the purchaser.
4 1-of-2 multisig can take advantage of some concepts useful for 2-of-3 multisig, in particular constructing the
address in the first place.
CHAPTER 10. MONERO IN AN ESCROWED MARKETPLACE 109
2. The vendor receives the purchase order, verifies the product is in stock and the available
funding is enough, and either returns money to the buyer or fulfills the order by shipping
out the product and notifying the buyer with a receipt.
• For a 2-of-3 multisig, the buyer can optionally authorize payment when receiving noti-
fication of fulfillment.
3. The buyer either receives the product as expected, or doesn’t receive the product on time or
receives a defective product.
• Good product: The buyer either gives feedback to the vendor, or does nothing.
– Buyer sends feedback: The buyer can leave either positive, or negative feedback.
∗ Positive feedback: If this is a 2-of-3 multisig that hasn’t been paid yet, then
this is the step where the buyer confirms payment to the vendor. Otherwise
it’s just a positive review. [END OF WORKFLOW]
∗ Negative feedback: If this is a 2-of-3 multisig, then this step leads into the ‘bad
product’ workflow. Otherwise it’s just a negative review.
– Buyer does nothing : Either the vendor has already been paid, or it’s a 2-of-3
multisig and he needs to cooperate with someone to receive funds.
∗ Vendor has been paid: [END OF WORKFLOW]
∗ Vendor has not been paid : The vendor pursues payment.
(a) The vendor contacts the buyer requesting payment (or sends out a reminder).
(b) The buyer either responds, or does not respond.
· Buyer responds: The buyer’s response can be to make a payment, or pursue
a refund.
> Buyer makes payment : [END OF WORKFLOW]
> Buyer pursues refund : Go to the ‘bad product’ workflow.
· Buyer does not respond: The vendor enlists the moderator’s help to release
funds. [END OF WORKFLOW]
• No product or bad product : The buyer pursues a refund.
(a) The buyer contacts the vendor requesting a refund, perhaps with an explanation.
(b) The vendor complies with the refund request, or contests it (or ignores it).
– Vendor complies: Money is refunded to the buyer. [END OF WORKFLOW]
– Vendor contests: Either it’s not a 2-of-3 multisig, or it is.
∗ It’s not a 2-of-3 : [END OF WORKFLOW]
∗ It’s a 2-of-3 : Either the buyer gives up on the refund request (literally, or by
failing to respond in a timely manner), or the buyer is adamant.
· Buyer gives up: Either the buyer authorized the vendor’s payment, or not.
> Buyer authorized payment: [END OF WORKFLOW]
> Buyer didn’t authorize: The vendor contacts the moderator, who autho-
rizes the payment. [END OF WORKFLOW]
· Buyer is adamant: The vendor or buyer contacts the moderator, who coop-
erates with the participants to pass judgement. [END OF WORKFLOW]
CHAPTER 10. MONERO IN AN ESCROWED MARKETPLACE 110
10.2 Seamless Monero multisig
We can take advantage of the natural purchase order workflow to squeeze in nearly all parts of
a Monero 2-of-3 multisignature interaction without the participants even noticing. There is an
extra small step for the vendor at the end, where he must sign and submit the final transaction
to receive payment, analogous to ‘emptying the cash register’. 5
10.2.1 Basics of a multisig interaction
All 2-of-3 multisig interactions contain the same set of communication rounds, involving address
setup and transaction building. In order to comply with the normal workflow we use a reorga-
nized transaction construction process compared to our multisig chapter (recall Sections 9.4.2 and
9.6.2).6
1. Address setup
(a) All users must first learn the other participants’ base keys, which they will use to
construct shared secrets. They transmit the public keys of those shared secrets (e.g.
Ksh =Hn(kbaseA ∗kbaseB G)G) to the other users.
(b) After learning all shared secret public keys, each user may premerge and then merge
them into the address’s public spend key. The aggregation private spend keys will be
used for signing transactions. A hash of the primary signers’ (the buyer and vendor)
shared secret private key (e.g. ksh =Hn(kbaseA ∗kbaseB G)) will be used as the view key
(e.g. kv =Hn(ksh)). We go into more detail on these keys later (Section 10.2.2).
2. Transaction building: Assume the address owns at least one output already, and the key
images are unknown. There are two signers, the initiator and the cosigner.
(a) Initiate a transaction: The initiator decides to start a transaction. She generates open-
ing values (e.g. αG) for all owned outputs (she isn’t sure which ones will get used yet),
and commits to them. She also creates partial key images for those owned outputs, and
signs them with a proof of legitimacy (recall Section 9.5). She sends that information,
along with her own personal address for receipt of funds (e.g. for change if appropriate,
etc.), to the cosigner.
(b) Make a partial transaction : The cosigner verifies that all information in the initiated
transaction is valid. He decides the output recipients and amounts (they could be
partially based on the initiator’s recommendation), inputs to be used along with their
respective ring member decoys, and the transaction fee. He generates a transaction
private key (or keys if there are subaddresses involved), creates one-time addresses,
5 Extending this beyond (N-1)-of-N is likely infeasible without more steps, due to the additional rounds necessary
for setting up a lower threshold multisig address.
6 This procedure is actually quite similar to how Monero currently organizes multisig transactions.
CHAPTER 10. MONERO IN AN ESCROWED MARKETPLACE 111
output commitments, encoded amounts, pseudo output commitment masks, and open-
ing values for the commitments to zero. To prove amounts are in range, he builds
the Bulletproof range proof for all outputs. He also generates opening values for his
signature (but does not commit to them), random scalars for the MLSAG signatures,
partial key images for owned outputs, and proofs of legitimacy for those partial images.
All of this is sent to the initiator.
(c) Initiator’s partial signature: The initiator verifies the partial transaction’s information
is valid, and conforms with her expectations (e.g. amounts and recipients are as they
should be). She completes the MLSAG signatures and signs them with her private
keys, then sends the partially signed transaction to the cosigner along with her revealed
opening values.
(d) Finish the transaction: The cosigner finishes signing the transaction, and submits it to
the network.
Single-commitment signing
Unlike what is recommended in our multisig chapter, only one commitment is provided per partial
transaction (by the transaction initiator), and it is revealed after the cosigner sends out their
opening value explicitly. The purpose of committing to opening values (e.g. αG) is to prevent a
malicious cosigner from using their own opening value to affect the challenge that gets produced,
which could allow him to discover other cosigners’ aggregation keys (recall Section 9.3). If even
one partial opening value is unavailable when the malicious actor generates his own, then it is
impossible (or at least negligibly probable) for him to control the challenge. 7,8,9
Simplifying in this way removes one communication round, which has important consequences for
the buyer-vendor interaction experience.
7 This is also why the initiator only reveals her opening values after all transaction information has been deter-
mined, so neither signer can alter the MLSAG message and influence the challenge.
8 Single-commitment signing could be generalized as (M-1)-commitment signing, where only the partial trans-
action author does not commit-and-reveal and other co-signers only reveal after a transaction is fully determined.
For example, suppose there is a 3-of-3 address with cosigners (A,B,C), who will attempt single-commitment signing.
Signers B and C are in a malicious coalition against A, while C is the initiator and B is the partial transaction author.
C initiates with a commitment, then A provides his opening value (without commitment). When B constructs the
partial transaction, he can conspire with C to control the signature challenge in order to expose A’s private key.
Please also note that (M-1)-commitment signing is an original concept first presented here, and is not backed by
any advanced research material or code implementation. It may end up being completely erroneous.
9 One way of thinking about this is to consider the meaning and purpose of a ‘commitment’ (recall Section 5.1).
Once Alice commits to value A she is stuck with it, and can’t take advantage of new information from event B
(caused by Bob) that happens later. Moreover, if A hasn’t been revealed then B can’t be influenced by it. Alice and
Bob can be sure that A and B are independent. It is our contention that single-commitment signing as described
meets that standard, and is equivalent to full-commitment signing. If the commitment c is a one-way function of
opening values αAG and αBG (e.g. c =Hn(αAG,αBG)), then if αAG is committed to initially, αBG is revealed
afterC(αAG) appears, and αAG is revealed after αBG appears, then αBG andαAG are independent, and c will be
random from both Alice’s and Bob’s perspectives (unless they collaborate, and except with negligible probability).
CHAPTER 10. MONERO IN AN ESCROWED MARKETPLACE 112
10.2.2 Escrowed user experience
Here is our detailed walk-through of buyer-vendor-moderator interactions involving a 2-of-3 multisig-
based online purchase using Monero.
1. Buyer makes a purchase
(a) Buyer’s new shopping session : A shopper enters an online marketplace, and her client
generates a new subaddress to be used if she starts a new purchase order. 10 In that
marketplace she finds vendors, and each vendor is offering a selection of products and
prices. Invisible to the shopper herself, but visible to her client (i.e. the software she is
using to buy things), each product has a base key for use in multisig-based purchases.
Alongside that base key is a list of preselected moderators, and each such moderator
has a base key and precomputed vendor-moderator shared secret public key. 11
(b) Buyer adds a product to cart : Our shopper decides she wants something, selects the
payment option (i.e. direct payment, 1-of-2 multisig, or 2-of-3 multisig), and if she
selects 2-of-3 multisig she is presented with a list of available moderators that she can
choose from. When she adds the product to her cart, her client, invisible to her (and
assuming she selected 2-of-3 multisig), uses the product’s base key, the moderator’s
base key, and the vendor-moderator shared secret public key, to, in combination with
her own shopping-session subaddress’s spend key (as her base key), construct a 2-of-3
buyer-vendor-moderator multisig address. 12
The view key is a hash of the buyer-vendor shared secret private key (not the aggregation
private key, i.e. before premerge), and the encryption key for communications between
the buyer and vendor is a hash of the view key. 13
(c) Buyer moves to checkout: The shopper views her cart with all its products, and decides
to proceed to checkout. This is where she makes funding available before finalizing the
purchase order. Her client constructs a transaction (but does not sign it yet) that will
either pay directly to the vendor, or fund a multisig address (with a little extra for
future fees). If funding a 2-of-3 multisig address, the client also initiates two transac-
tions sending money out of that address. One can be used to pay the vendor, and the
other to refund the buyer. Their inputs’ partial key images are based on the funding
transaction that has not been signed yet.
10 Using a new subaddress for each purchase order, or even a new subaddress for each separate vendor or vendor’s
product, makes it more difficult for vendors to track the behavior of their customers. It also helps make sure each
purchase order is unique, in the case of someone buying the same thing twice.
11 It would be straightforward for vendors to also include, invisible to shoppers, commitments to opening values
for transactions. However, to handle multiple purchase orders for the same product, he would have to provide many
commitments up front for each potential buyer. We can only imagine how messy that could become. This is part
of the utility brought by our single-commitment signing simplification.
12 Exactly how a marketplace should be implemented is open to interpretation, since for example selecting the
payment type for a product could be presented to the user at checkout instead of in the ‘add to cart’ interface.
13 This same process would take place for 1-of-2 multisig, leaving out the moderator.
CHAPTER 10. MONERO IN AN ESCROWED MARKETPLACE 113
In reality, she only needs committed opening values for the two transactions, and then
separately one copy of the partial key images (with proof of legitimacy) and one copy of
her shopping-session subaddress. That subaddress has a dual purpose; it is the buyer’s
address for refunds or change outputs, and its spend key is the buyer’s multisig base
key.14
(d) Buyer authorizes payment: After looking over all the purchase order details, the shopper
authorizes it. 15 Her client finishes signing the funding transaction, and submits it to
the network.16 It sends the purchase order, along with the funding transaction’s hash
and initiated multisig transactions, and the buyer-moderator shared secret public key,
to the vendor. 17
2. Vendor fulfills a purchase order
(a) Vendor appraises purchase order : The vendor examines our shopper’s purchase order,
then approves it for shipping. If he was paid directly then there is nothing else to
consider, and if he was paid via 1-of-2 multisig then he can make a transaction paying
himself out of that address. For 2-of-3 multisig his client generates a subaddress for
receipt of money in the purchase order, and makes two partial transactions out of the
buyer’s initialized transactions. The payment transaction sends the product price to the
vendor, and the rest to the buyer as change, while the refund transaction just empties
the multisig address back to the buyer.18 Note that he reconstructs the multisig address
out of the buyer-vendor-moderator base keys in combination with the buyer-moderator
shared secret public key.
(b) Vendor ships the product: The vendor ships the product, and sends a fulfillment notifi-
cation to the buyer. That notification includes a receipt for the purchase, as well as a
request for the user to complete payment (everything from here on out refers to 2-of-3
multisig). Hidden to the user is the vendor’s purchase order subaddress, which can be
used in case of dispute resolution, and both partial transactions.
3. Buyer completes payment or requests a refund : A buyer can do this as soon as they receive
fulfillment notification, or wait until the product has been delivered.
(a) Buyer submits partially signed transaction : The buyer decides whether to pay for her
purchase, or request a refund. Her client creates a partial signature on the appropriate
partial transaction, and sends it to the vendor. Any refund would presumably include
an explanation justifying it.
14 It is important to initiate separate transactions, since committed opening values can only be used once.
15 If the buyer cancels the purchase order, her funding transaction and partial multisig transactions get deleted.
16 If her cart contained multiple vendors’ products, then her client can create multiple purchase orders and handle
them separately. The vendors can all be paid by the same funding transaction.
17 The buyer’s client should keep track of payment order details like total price, to later verify the content of
multisig transactions before signing them.
18 The partial transactions could plausibly share a lot of values since they involve the same inputs, and only one
of them should ultimately get signed. For the sake of modularity and robust design we think it’s best to handle
them separately.
CHAPTER 10. MONERO IN AN ESCROWED MARKETPLACE 114
(b) Vendor completes transaction: The vendor receives a partially signed transaction, fin-
ishes signing it, and submits it to the network. If necessary he sends a refund notifica-
tion, with proof, to the buyer.
4. Moderated dispute: At any point after the buyer submits a purchase order and before the
multisig address is emptied of funds, either the vendor or buyer can decide to get the mod-
erator involved. Party A is whoever raised the dispute, while Party B is the defendant. 19
(a) Party A contacts moderator: Party A initiates two transactions, for payment or refund,
this time geared toward Party A-moderator signing, and send them to the moderator
along with necessary information for building the multisig address (the base keys, the
Party A-Party B shared secret public key, and the private view key) and reading the
multisig wallet’s balance (the partial key images and their proofs).
(b) Moderator processes dispute
i. Moderator acknowledges dispute : The moderator acknowledges they are looking
into the dispute, at the same time creating partial transactions out of the initiated
transactions and sending them to Party A. They make sure to notify PartyB about
the dispute, and also initiate two more transactions with PartyB to expedite failure
of Party A to comply with the final verdict.
ii. Moderator pursues a verdict : The moderator looks at the available evidence, and
can interact with the parties to gather more information. They may try to mediate
the argument, in hopes of both parties resolving it without the need to pass a
verdict.
iii. Dispute reaches an end: Either the buyer and vendor resolve it on their own in the
end, or the moderator passes a verdict which they communicate to both parties.
• Note: If the defendant party should receive funds per the verdict, but hasn’t pro-
vided an address for whatever reason, the moderator can try to contact them and
cooperate with them to receive those funds. Since it doesn’t involve the disputer,
that contact can be made (or pursued further) after the dispute has been resolved.
(c) Party A or B accepts the verdict : If no Party A-Party B transactions were finalized, it
implies the dispute was resolved by moderator’s decision.
i. Party A accepts
A. Party A completes their partial signature on the verdict transaction, and sends
it to the moderator.
B. Th프로젝트로 돌아가기