taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

032-brandt-vickrey-auctions.rst (14203B)


      1 DD 32: Brandt-Vickrey Auctions
      2 ##############################
      3 
      4 :Design status: Abandoned
      5 :Implementation status: Not started
      6 :DD shepherd: TBD
      7 :Historical contributors: Christian Grothoff, Özgür Kesim
      8 :First published: 2022-08-21
      9 :Last substantive change: 2022-10-16
     10 
     11 .. warning::
     12 
     13    This proposal was not implemented.  It depends on the deposit-policy and
     14    generic extension mechanisms, which were subsequently removed.  The body
     15    below is retained for historical context and is non-normative.
     16 
     17 Summary
     18 =======
     19 
     20 This document describes the design for how (SMC) auctions could be done with
     21 funds held in escrow by a Taler exchange.  It is taking major inspiration from
     22 Markus Teich's Master's thesis on "Implementing Privacy Preserving Auction
     23 Protocols".
     24 
     25 The support for these types of auctions will be in the form of an extension for
     26 a deposit policy.
     27 
     28 
     29 Motivation
     30 ==========
     31 
     32 Escrow is a key capability of payment systems. With SMC auctions we can
     33 broaden the escrow functionality beyond the (simplistic) refunds we currently
     34 offer. This provides a first new use-case for the extension mechanism. By
     35 using SMC auctions (libbrandt), we also provide privacy for another business
     36 process.
     37 
     38 We expect the design to be useful for three primary use-cases:
     39 
     40   * Auctions in the style of Ebay (consumer goods)
     41 
     42   * Auctions for commodities and stock trading
     43 
     44   * Auctions in currency exchange, including crypto-currencies
     45 
     46 We do not consider the use-case of high-value art auctions, as here the Taler
     47 payment system is likely unsuitable for the high transaction values, the
     48 privacy for the buyer would still be problematic from a money-laundering
     49 perspective, and the cost of a trusted auctioneer manually running the auction
     50 is small compared to the transaction value, so the benefits from automation
     51 are also minor.
     52 
     53 
     54 Requirements
     55 ============
     56 
     57 The discovery of ongoing auctions and the exchange of meta-data about the
     58 auction (duration, price ranges, conditions of the sale, etc.) is considered
     59 out-of-scope for the Taler protocol. Taler is only used to escrow a payment
     60 once participants have decided to make a bid on an aution.
     61 
     62   * Support libbrandt-style SMC multiparty computation to determine
     63     auction winner.  No party is trusted to learn the bids during
     64     the bidding phase, including the exchange.  This implies that
     65     participants have to always escrow the largest possible amount
     66     in the auction, even if their actual bid is much lower.
     67 
     68   * Integrate nicely with existing exchange functionality, including
     69     minimal changes to existing endpoints and introducing as few new
     70     endpoints as reasonable.
     71 
     72   * Verifiablity of the auction outcome by the exchange and the
     73     auditor. There is not supposed to be any trusted third party.
     74     Naturally, when selling real-world goods, external enforcement
     75     of the transfer of the good may be required.
     76 
     77   * Guaranteed payment. If the auction is successful (there were at
     78     least two bidders), the seller must unconditionally receive the
     79     payment.
     80 
     81   * Participants pay fees (possibly even just for participation),
     82     to ensure only truly interested parties with skin in the game
     83     participate (protection against denial-of-service attacks).
     84 
     85   * To ensure participants can perform the required computations
     86     in each round, the number of bidders on an auction may need
     87     to be limited.
     88 
     89 
     90 
     91 Proposed Solution
     92 =================
     93 
     94 We will for now consider five types of parties involved in
     95 the auction:
     96 
     97   * A seller, who is offering an item and who sets some basic
     98     rules for the auction (like the price range, duration of
     99     rounds, delivery conditions, seller's bank account,
    100     auction operator, etc.).
    101 
    102   * A number of bidders, who make bids on the auction, with
    103     the highest bidder winnig the auction and paying the
    104     second highest price to the seller.
    105 
    106   * An auction operator, who collects messages from the seller
    107     and the bidders and ultimately announces the (then universally
    108     verifiable) outcome.  In the original paper of Brand, this
    109     would be the ``blackboard``. The auction operator may
    110     also facilitate the discovery of auctions, but this is out
    111     of scope.  The auction operator may charge fees for setting
    112     up and running an auction. However, from the Taler perspective,
    113     paying an auction operator to run an auction is the same
    114     as paying any other merchant and thus out of scope for this
    115     design document.
    116 
    117   * An exchange that supports the ``policy_vickrey_auction`` extension and
    118     holds the funds for bids in escrow for the duration of the auction.  Upon
    119     completion of the auction, the exchange pays the seller from the auction's
    120     winner and refunds the other bidders.
    121 
    122   * An auditor that verifies that the exchange made the payments
    123     correctly.
    124 
    125 The high-level protocol for a bidder's interaction with the auction operator
    126 and the Taler exchange is already described in Teich's thesis in Figure 3.2:
    127 the bidder begins by registering (say with an ephemeral EdDSA key) at the
    128 auction operator.  Further messages from the bidder during this auction must
    129 then always be signed by the respective private key.
    130 
    131 The auction operator checks if there is a free slot (to limit the number of
    132 bidders per auction) and if one is free, gives the bidder a (modest) timeout
    133 until when it must prove that it escrowed an appropriate amount at the
    134 exchange.  If no slots are free, the auction operator may allow the
    135 prospective bidder to long-poll for slots to become available (say because
    136 another prospective bidder failed to provide a proof of escrow on time).
    137 
    138 The bidder then uses the existing ``/deposit`` endpoint at the exchange to
    139 escrow the maximum bid. Escrowing the maximum bid ensures that no information
    140 about the actual bid is leaked to the exchange, and that any bid that could be
    141 made by the bidder can always be executed.  In the ``/deposit``, the contract
    142 hash is set to information that includes those private parts of the auction
    143 meta data that do not concern the exchange (such as information about the item
    144 being sold).  The seller's account information is included as the receiver of
    145 the funds.  Additionally, the ``/deposit`` handler accepts an extension object
    146 which specifies the (SMC auction) extension and relevant meta-data about the
    147 auction (in particular, the bidder's ephemeral EdDSA public key, until when
    148 the auction runs, and (possibly) key material about the auction operator).
    149 
    150 The resulting proofs of deposits (plural, as there may be multiple coins
    151 involved) are then returned to the bidder. Note that the deposit confirmation
    152 signatures cover both the hash of the contract terms and the extension object.
    153 The deposit confirmations are then forwarded by the bidder to the auction
    154 operator, possibly already together with first (sealed) information about the
    155 bid.
    156 
    157 The auction operator then runs the auction protocol with all participants
    158 until conclusion. Once the winner and price have been determined, the auction
    159 operator POSTs the resulting transcript to a new
    160 ``/extensions/policy_brandt_vickrey_auction`` endpoint of the exchange.  Here,
    161 the extension-specific logic stores the transcript in its database (in a new
    162 table) and then simulates the auction again (using libbrandt), again
    163 determining the winner and price.  The extension configuration (and thus
    164 ``/keys``) may stipendulate some fee(s) charged by the exchange to handle the
    165 ``/extensions/policy_brandt_vickrey_auction`` request.  The fees should be
    166 covered by the seller.  We note that the transcript inherently contains the
    167 deposit confirmations originally issued by the exchange for the auction. So,
    168 the exchange can identify all of the coins that were escrowed (it should also
    169 double-check that the coins were escrowed for the correct auction).  It then
    170 refunds the bids from the losing bidders, pays the price to the seller from
    171 the winner (minus auction fee), and partially refunds the winner the difference
    172 between the escrowed amount and the winning bid.
    173 
    174   .. note::
    175 
    176      Partial refunds are currently implemented using the ``refunds`` table.
    177      The refunds table requires refund message signatures by the merchant's
    178      public key.  Thus, this table will need to be generalized to include
    179      some indicator as to whether the refund signature is valid or
    180      whether some other mechanism justified the refund.  The most trivial
    181      way would probably be to allow NULL values for the signature.  However,
    182      likely a link to the extension transcript should then be stored in
    183      another column to make it easier for the auditor to look for
    184      "alternative" justifications in those cases.
    185 
    186 In case participants are identified as malicious, the auction meta data should
    187 specify the penalty those participants must pay to the seller.  Again, the
    188 exchange should assess the auction transcript and then trigger the correct
    189 transactions.
    190 
    191 The auditor of the exchange can again simulate the auction protocol and can
    192 thus confirm that the exchange's ultimate transactions were correct.
    193 
    194 Transcripts
    195 ^^^^^^^^^^^
    196 
    197 A transcript of a Brandt-Vickrey auction is the JSON encoding of an object of
    198 type ``BrandtVickreyAuctionTranscript``.
    199 
    200   .. code-block:: typescript
    201 
    202     // This structure defines the transcript of an auction of Brandt-Vickrey kind.
    203     interface BrandtVickreyAuctionTranscript {
    204       // The auction definition.
    205       auction: BrandtVickreyAuction;
    206 
    207       // The public keys of the bidders, in Crockford Base32 encoding.
    208       bidders: EddsaPublicKey[];
    209 
    210       // Signatures of the auction in Crockford Base32 encoding.
    211       // One signature per bidder.
    212       signatures: EddsaSignature[];
    213 
    214       // List of policy hash codes that identify policy details associated with
    215       // each bidder.  Those codes were generated by the policy extension
    216       // policy_brandt_vickrey_auction during the deposit of coins for this
    217       // auction.
    218       policy_hash_codes: HashCode[];
    219 
    220       // The transcript of all messages received by the seller.
    221       transcript: BrandtVickreyAuctionMessage[];
    222 
    223       // Optionally, the seller can provide the winners it had calculated.
    224       winners?: BrandtVickreyAuctionWinner[];
    225 
    226       // The signature over the hash of this JSON object, without the
    227       // key ``sig`` and in normalized form, basically over
    228       //   H(auction, bidders, signatures, transcripts, winners?)
    229       // It is signed by the private key that corresponds to the public key
    230       // in `BrandtVickreyAuction`.``pubkey``.
    231       // This signature is in Crockford Base32 encoding.
    232       sig: EddsaSignature;
    233     }
    234 
    235 
    236   .. code-block:: typescript
    237 
    238    interface BrandtVickreyAuctionMessage {
    239      // The index of the bidder into the
    240      // `BrandtVickreyAuctionTranscript`.``bidders`` array.
    241      bidder: number;
    242 
    243      // The raw message in Crockford Base32 encoding.
    244      msg: string;
    245 
    246      // The signature over the message.  The signature is in Crockford Base32
    247      // encoding.  It must be signed by the private key corresponding to the
    248      // bidder's public key in `BrandtVickreyAuctionTranscript`.``bidders``.
    249      sig: EddsaSignature;
    250    }
    251 
    252 
    253 
    254   .. code-block:: typescript
    255 
    256    interface BrandtVickreyAuctionWinner {
    257      // The index of the bidder into the
    258      // `BrandtVickreyAuctionTranscript`.bidder array.
    259      bidder: number;
    260 
    261      // The index of the winning price into the
    262      // `BrandtVickreyAuction`.prices array.
    263      price_idx: number;
    264 
    265      // The winning price
    266      price: Amount;
    267    }
    268 
    269 
    270 Alternatives
    271 ============
    272 
    273 If currency is sold for currency in an auction, the seller could also escrow
    274 the currency being sold.  This could be done by a simple parallel extension
    275 for sellers that provides the seller's escrow proof as input into the auction
    276 protocol. The result would effectively be an auction-driven equivalent of the
    277 atomic swap protocols for crytocurrencies.
    278 
    279 Instead of the exchange and the auditor re-running the auction protocol
    280 internally against the transcript, it might suffice if the auction operator,
    281 seller and all bidders jointly attest to the outcome.  However, this presumes
    282 that there are no malicious participants.  Thus, this is an optimization that
    283 can help, but likely should not be relied upon.  The exchange may stipendulate
    284 different fees if auction participants provide signatures demonstrating that
    285 they agree upon the outcome of the auction.
    286 
    287 
    288 Drawbacks
    289 =========
    290 
    291 Forcing participants to escrow the largest possible bid may exclude some
    292 bidders. However, it can be assumed that the seller (wanting to get as many
    293 high bids as possible) will set a reasonable bidding range to not exclude
    294 realistic bids. If the seller set the bidding range wrong and receives no bids
    295 as a result, the auction can of course simply be repeated. Finally, excluding
    296 bidders that can only make rather low bids may help keep the number of
    297 participants managable.  Given the three application domains we focus on,
    298 it seems that the number of bidders regularly excluded from the auction due
    299 to this constraint should be acceptable.
    300 
    301 
    302 Discussion / Q&A
    303 ================
    304 
    305 A possible challenge that may require more thought is how to deal with auction
    306 participants dropping out and not sending any more messages and the
    307 equivalent attack from the auction operator of suppressing messages from
    308 certain participants.  The latter case can likely be addressed partially by
    309 network-level anonymization of all participants, as then the auction operator
    310 doesn't have the ability to target specific users. However, a conspirator
    311 could still deanonymize themselves to the auctioneer with the objective of the
    312 auction operator then suppressing messages from other (anonymous)
    313 participants and thereby possibly excluding higher bids from those users.
    314 
    315   .. note::
    316 
    317      As described above, the Master's thesis of Markus Teich proposes to
    318      address the issue of bidders dropping out of the protocol by fining them,
    319      for example by keeping (some of) the escrowed funds.  This may work, but
    320      only if we assume that the auction operator is not maliciously dropping
    321      messages from some bidders.
    322 
    323 
    324 
    325 (This should be filled in with results from discussions on mailing lists / personal communication.)