Skip to content

gian-gg/sabot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Sabot โœ…

Contributors Forks Stargazers Issues License

Table of Contents
  1. ๐Ÿ—บ๏ธ Project Overview
  2. ๐Ÿ“ฑ Screenshots
  3. ๐Ÿ’ป Getting Started
  4. ๐Ÿ“ Notes
  5. ๐Ÿ“ฌ Contributing
  6. โš–๏ธ License

๐Ÿ—บ๏ธ Project Overview

A composable platform designed for peer-to-peer transaction verification, offering clear transaction lifecycles, invite-and-accept flows, and structured UI primitives that make it easy to extend or re-implement. Acting as a third-party safety layer, Sabot ensures verified, transparent, and scam-free online transactions.

โญ Features

๐Ÿ”— Blockchain Escrow Integration: Comprehensive smart contract integration for secure fund management
๐Ÿ”ฎ Oracle Verification System: Decentralized dispute resolution with oracle-based verification
โš–๏ธ Arbiter Management: Democratic arbiter selection and dispute resolution workflows
๐Ÿ“Š Real-time Status Tracking: Live updates for escrow status and deliverable tracking
๐Ÿ›ก๏ธ Enhanced Security: Multi-layer security with access controls and reentrancy protection

๐Ÿ“š Built With

Vercel Next.js TypeScript Ethereum Lisk shadcn/ui Tailwind CSS Lucide Icons Google Gemini

๐Ÿ’ป Getting Started

Follow these steps to get Sabot running on your local machine.

๐Ÿ”ง Prerequisites

  • Node.js (version 16.0 or higher)
  • Bun
  • Metamask

๐Ÿ› ๏ธ Installation

1. Clone the Repository

git clone https://github.com/gian-gg/sabot.git
cd sabot

2. Install Dependencies with Bun

# Install project dependencies
bun install

3. Environment Setup

# Copy the environment template
cp .env.example .env

Edit the .env file with your configuration (API keys, database URL, etc.)

4. Database Setup

Apply database migrations:

# Run Supabase migrations
npx supabase db push

5. Blockchain Setup (Optional)

For full escrow functionality, set up the smart contract:

# Navigate to blockchain directory
cd ../SabotBlockchain/transaction-smart-contract

# Install dependencies
npm install

# Deploy contracts (local development)
npx hardhat run scripts/deploy-local.ts --network localhost

โ–ถ๏ธ Running the Application

bun run dev

๐Ÿ“ Notes

๐Ÿ”— Blockchain Integration

Sabot now includes comprehensive blockchain integration for secure escrow management:

  • Smart Contract: Deployed AgreementLedger contract with advanced escrow functionality
  • Oracle System: Decentralized verification for dispute resolution
  • Token Economics: ERC-20 token integration with fee distribution
  • Security: Multi-layer security with access controls and reentrancy protection

๐Ÿ“š Documentation

All project documentation is available in the docs directory. This includes:

  • Introduction: Documnetation related to getting started.
  • Architecture: Documentation related to the application's architecture and design.
  • Developer Guide: Comprehensive guides for developers, covering setup, architecture, and contribution guidelines.
  • User Guide: Detailed information for end-users on how to use the application.

๐Ÿงช Testing

The platform includes comprehensive testing for both frontend and smart contract functionality:

# Frontend tests
bun test

# Smart contract tests
cd ../SabotBlockchain/transaction-smart-contract
npx hardhat test

๐Ÿ’ฑ Transaction Smart Contract

The smart contract code for this project is hosted in its own repository: transaction-smart-contract.

This project provides a token-based (SBT) system for creating immutable agreements and managing multi-deliverable escrow.

Key Technologies:

  • Blockchain: Lisk Sepolia Testnet
  • Smart Contract Language: Solidity
  • Development Framework: Hardhat
  • Programming Language (for project configuration/scripts): TypeScript

Key Features:

  1. Token & Agreement System:

    • SBT Utility Token: An ERC20-like token built directly into the contract.
    • User Registration: registerUser() grants new users 100 SBT.
    • Agreement Creation: createAgreement() allows two registered users to create an immutable, timestamped agreement.
    • Fee Mechanism: 10 SBT from each party (total 20 SBT) for agreement creation. 80% (16 SBT) goes to devWallet, 20% (4 SBT) is burned.
    • Reporting System: reportIssue() allows parties to create on-chain reports for disputes.
    • Admin Controls: Ownable contract (OpenZeppelin) allows owner to update devWallet.
  2. Escrow System:

    • Multiple Deliverable Types: Supports Crypto (ETH), BankTransfer, FileDeliverable, PhysicalItem, Service, and Hybrid escrows.
    • ETH Locking: Securely locks ETH for crypto-based escrows.
    • Hash-Based Verification: Uses cryptographic hashes for non-crypto deliverables.
    • Dual Confirmation: Both parties must confirm completion for fund release.
    • Proof Submission: Parties can submit proof of delivery/completion.
    • Mutual Arbiter Selection: Disputes require both parties to approve an arbiter.
    • Arbiter Resolution: Arbiters can resolve disputes (release, refund, split).
    • Fee Structure: 2% platform fee on successful completion, 1% arbiter fee for dispute resolution.
    • Expiration Handling: Automatic refund to initiator if escrow expires.
    • Cancellation: Initiators can cancel pending escrows.
    • Security: ReentrancyGuard protection.
  3. Oracle Verification System:

    • Purpose: Automatic verification for FileDeliverable and Service escrows.
    • Authorization: authorizeOracle() (owner-only) manages oracle addresses.
    • Submission: submitOracleVerification() allows authorized oracles to submit verification results, auto-confirming for the submitting party if verified.
    • Advisory Role: Assists confirmation but doesn't control release; arbiter decisions always supersede.

๐Ÿ“ฌ Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ข Contributors

contrib.rocks image

โš–๏ธ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Your third-party safety layer for verified, transparent, and scam-free online transactions.

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 7