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.
Core Transaction Phases
- 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.
- 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.
- 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.
- 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.
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