SPENDER: A Platform for Secure and Privacy-Preserving Decentralized P2P E-Commerce

Shuhao Zheng, Junliang Luo, Erqun Dong, Can Chen, Xue LiuarXiv 2022 · DOI · arXiv

Introduction

While blockchain technology has revolutionized the trading of digital assets like NFTs, decentralized e-commerce for tangible goods has historically faced significant hurdles. Current solutions typically force users to choose between centralized intermediaries that require surrendering private data or pure peer-to-peer (P2P) trades that carry high risks of fraud and privacy leaks. SPENDER addresses this "missing link" in Web3 by providing a practical paradigm for on-chain financial security and off-chain physical interactions without compromising decentralization.

The SPENDER Architecture

Built on the Terra ecosystem using Rust-based smart contracts (CosmWasm), SPENDER facilitates a trustless environment for three primary stakeholders: Buyers, Sellers, and Shippers. The system operates through a rigorous four-phase transaction process designed to ensure accountability and privacy.

The five-phase transaction workflow of the SPENDER platform, illustrating the interactions between Seller, Buyer, and Shipper.

Core Transaction Phases

  1. Order Creation: A seller lists an item on-chain. A buyer initiates a request by depositing the item's value into a secure smart contract escrow.
  2. Bidding Phase: Independent shippers compete for the order. To ensure honesty, shippers must deposit a guarantee (the item's value plus a time-delivery fee) into the contract. This "skin in the game" acts as an automatic insurance policy.
  3. Address Uploading: To protect user privacy, SPENDER utilizes Asymmetric Public-Key Cryptography. The chosen shipper posts a public key, and the buyer and seller encrypt their physical addresses using this key. Only the shipper, holding the corresponding private key, can decrypt the delivery details.
  4. Shipping & Returning Phase: The shipper verifies the item at the seller's location and manages the delivery. Upon confirmation by the buyer, the smart contract automatically releases payments and deposits.

System Implementation and Prototype

The authors developed a functional Graphical User Interface (GUI) using Terra.js and JavaScript to simulate real-world usage. The prototype demonstrates a complete end-to-end transaction flow on the Terra testnet, proving that complex physical logistics can be managed entirely by decentralized code.

The SPENDER Graphical User Interface showing the distinct views for (a) Buyer, (b) Seller, and (c) Shipper.

Key Insights and Security

  • Economic Incentives: By treating shipping as a competitive bidding market, SPENDER rewards efficiency. The requirement for shippers to deposit the item's value prevents theft, as a malicious shipper would lose more in their deposit than they would gain from the stolen goods.
  • Privacy Preservation: The platform follows a "need-to-know" privacy model. On a transparent public blockchain, SPENDER ensures that only the individual physically carrying the package knows the destination, and only for the duration of the task.
  • Price Stability: By utilizing stablecoins (such as UST), SPENDER avoids the volatility common in cryptocurrency markets, ensuring that the value of an order remains consistent from placement to delivery.

Future Directions

While the current prototype successfully demonstrates decentralized escrow and logistics, several areas for improvement remain. Future work includes integrating Decentralized Autonomous Organizations (DAOs) to act as formal arbitrators in disputes, implementing more granular access control for order details to comply with global data privacy laws, and developing privacy-respecting on-chain recommendation engines. Additionally, while originally built for Terra, the SPENDER paradigm is designed to be portable to other robust smart-contract platforms like Ethereum or Solana.

Summary updated

Abstract

The blockchain technology empowers secure, trustless, and privacy-preserving trading with cryptocurrencies. However, existing blockchain-based trading platforms only support trading cryptocurrencies with digital assets (e.g., NFTs). Although several payment service providers have started to accept cryptocurrency as a payment method for tangible goods (e.g., Visa, PayPal), customers still need to trust and hand over their private information to centralized E-commerce platforms (e.g., Amazon, eBay). To enable trustless and privacy-preserving trading between cryptocurrencies and real goods, we propose SPENDER, a smart-contract-based platform for Secure and Privacy-PresErviNg Decentralized P2P E-commeRce. The design of our platform enables various advantageous features and brings unlimited future potential. Moreover, our platform provides a complete paradigm for designing real-world Web3 infrastructures on the blockchain, which broadens the application scope and exploits the intrinsic values of cryptocurrencies. The platform has been built and tested on the Terra ecosystem, and we plan to open-source the code later.
BibTeX
@misc{zheng2022spender,
  author = {Shuhao Zheng and Junliang Luo and Erqun Dong and Can Chen and Xue Liu},
  title = {{SPENDER: A Platform for Secure and Privacy-Preserving Decentralized P2P E-Commerce}},
  year = {2022},
  eprint = {2206.07215},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.07215},
}
Figure