CipherSpell / CipherPact

(In Development) Suite of financial agreements on Cardano, Ergo such as escrows with collateral, zero-coupon bonds and contract for differences into smart contracts (with a web UI) for a trust-less, decentralized and publicly verifiable agreement.
GNU General Public License v3.0
7 stars 2 forks source link

Cryptographically-verifiable delivery disputes #10

Open JKleinne opened 3 years ago

JKleinne commented 3 years ago

Given:

Pd : Price of the Product
h(d): Hash ( SHA3/keccak256 ) of the Product
ID : Contract Nonce or hashIdentifier for that particular agreement
enc: encrypt
[B/S]pub: Buyer/Seller public key
[B/S]pri: Buyer/Seller private key

Delivery: The Seller sends an encrypted version of d, namely, encBpub (encSpri (d, ID)), to the interested Buyer, possibly on an off-chain channel.

Accept/Reject Delivery: The Buyer decrypts the data d, then hashes it to check if it matches the previously known h(d). The Buyer then provides a response to the Smart Contract; in this response, it either:

Reconciliation: This step is undertaken by the Smart Contract after hearing from the Buyer in the previous step.



[1] “Solving the Buyer and Seller’s Dilemma: A Dual-Deposit Escrow Smart Contract for Provably Cheat-Proof Delivery and Payment for a Digital Good without a Trusted Mediator | IEEE Conference Publication | IEEE Xplore.” https://ieeexplore.ieee.org/document/8751482 (accessed Jun. 18, 2021).
[2] S. Goldfeder, J. Bonneau, R. Gennaro, and A. Narayanan, “Escrow Protocols for Cryptocurrencies: How to Buy Physical Goods Using Bitcoin,” in Financial Cryptography and Data Security, vol. 10322, A. Kiayias, Ed. Cham: Springer International Publishing, 2017, pp. 321–339. doi: 10.1007/978-3-319-70972-7_18.

JKleinne commented 3 years ago

Initial naive implementation without Kleros integration: https://github.com/CipherSpell/CipherPact/pull/12

JKleinne commented 3 years ago

image