project screenshot 1
project screenshot 2
project screenshot 3

Safe Wire

SafeWire is a payment dispute infrastructure project. It aims to revolutionize the way online transactions are conducted by providing a secure, fair, and decentralized payment system with built-in dispute resolution mechanisms.

Safe Wire

Created At

ETHGlobal Singapore

Project Description

SafeWire is an innovative payment dispute infrastructure project developed for the ETHGlobal Hackathon 2024 in Singapore. It aims to revolutionize the way online transactions are conducted by providing a secure, fair, and decentralized payment system with built-in dispute resolution mechanisms. At its core, SafeWire addresses the common issues of trust and security in online transactions. It creates a bridge between buyers and merchants, ensuring that both parties are protected throughout the transaction process. The platform holds payments in escrow for a short period, typically 3-7 days, allowing time for any potential disputes to be raised and resolved. Key features of SafeWire include:

  1. Secure Payment Holding: Transactions are securely held in smart contracts, providing a safety net for both buyers and merchants. Decentralized Dispute Resolution: A DAO (Decentralized Autonomous Organization) consisting of staked moderators handles disputes, ensuring fair and unbiased outcomes. Mod Incentives and Reputation System: Moderators earn rewards and build reputation based on their performance in dispute resolutions, encouraging active and fair participation. Low Fees: The platform offers transparent and cost-effective transaction fees, making payments more affordable for all parties involved. Global Accessibility: Being a decentralized platform, SafeWire is accessible to anyone with an internet connection, regardless of their location. Multi-chain Support: SafeWire is deployed on multiple blockchain networks, including Ethereum, Arbitrum, Base, and Hedera, providing users with flexibility and choice. SafeWire not only provides a secure payment infrastructure but also creates an ecosystem where trust is built through transparency and fair dispute resolution. This project has the potential to significantly impact e-commerce, freelance marketplaces, and any scenario where online transactions occur between parties who may not fully trust each other.

How it's Made

SafeWire is built using a combination of blockchain technologies, smart contracts, and modern web development frameworks. Here's a breakdown of the key components and technologies used:

  1. Smart Contracts: The core of SafeWire is built on Solidity smart contracts, specifically the PaymentGateway contract. OpenZeppelin's contracts are utilized for standard implementations and security best practices. The smart contracts handle the payment escrow, dispute initiation, and resolution logic. Blockchain Networks: SafeWire is deployed on multiple networks: Ethereum, Arbitrum, Base, and Hedera. This multi-chain approach provides users with options and helps in achieving broader adoption. Frontend: The user interface is built using Next.js, a React framework that enables server-side rendering and efficient routing. TailwindCSS is used for styling, providing a clean and responsive design. Web3 Integration: Wagmi and Viem libraries are used for seamless interaction between the frontend and blockchain. These libraries handle wallet connections, contract interactions, and transaction management. State Management and Data Fetching: React Query is used for efficient state management and data fetching, improving the overall performance of the application. Testing: Forge, a part of the Foundry toolkit, is used for comprehensive smart contract testing. The tests cover various scenarios, including transaction creation, disputes, and resolutions. Development Environment: Foundry is used as the primary development toolkit for Ethereum application development. It provides tools like Forge for testing, Cast for contract interaction, and Anvil for local Ethereum node simulation. User Experience: The project implements a user-friendly interface for both buyers and merchants. Features like transaction lists, dispute chats, and clear status indicators enhance the overall user experience. Moderation System: A decentralized moderation system is implemented where staked moderators can vote on disputes. This system is designed to be fair and incentivized, encouraging active and honest participation. One particularly innovative aspect of SafeWire is its dispute resolution mechanism. The smart contract (smart-contract/src/PaymentGateway.sol, lines 146-166) implements a voting system where moderators can cast votes on disputes. The resolution is automatically triggered when a certain number of votes is reached, ensuring a decentralized and fair decision-making process. The project also makes clever use of React components to create a seamless experience for both buyers and merchants. For example, the DisputeChatComponent (typescript:next-app/src/components/dispute-chat.tsx, lines 52-145) provides a real-time chat interface for dispute resolution, enhancing communication between parties. By leveraging these technologies and implementing innovative features, SafeWire creates a robust, secure, and user-friendly payment dispute infrastructure that has the potential to significantly improve trust and security in online transactions.
background image mobile

Join the mailing list

Get the latest news and updates