Amana is a decentralized escrow protocol designed to secure agricultural trade across different regions. By leveraging Soroban Smart Contracts, Amana eliminates the "Trust Gap" between buyers and sellers, ensuring fair trade even when parties are hundreds of miles apart.
To provide a programmable safety net for regional commodity trading. Amana ensures that the risk of "sending first" is eliminated, replaced by a secure, neutral vault that only releases funds when delivery is verified.
- Smart Escrow: Secure funds holding using USDC/Stablecoins on the Stellar network.
- Dynamic Loss Sharing: Negotiable risk-sharing ratios (e.g., 50/50, 70/30) hardcoded into every trade to handle transit accidents or theft.
- Proof-of-Delivery (PoD): A mandatory video-based verification protocol involving the buyer and the driver to confirm the state of goods.
- Volatility Protection: Utilizes Stellar Path Payments to allow users to pay in local currency (NGN) while locking the value in USDC to protect against inflation.
- Automated Settlement: A flat 1% platform fee is automatically deducted upon successful trade completion.
- Frontend: Next.js (App Router)
- Smart Contracts: Soroban (Rust)
- Blockchain: Stellar Network
- Wallet Connection: Freighter / Albedo
- Storage: IPFS (via Pinata) for decentralized storage of video evidence.
- Database: Supabase (Off-chain metadata, driver logs, and user profiles).
frontend/→ Next.js app environment (UI + wallet + Supabase/Pinata client integration)backend/→ Node.js/TypeScript API environment (Supabase + Pinata + integration endpoints)contracts/→ Rust/Soroban smart contract environment
cd frontendcp .env.example .env.localnpm run dev
cd backendcp .env.example .envnpm run dev
cd contracts/amana_escrowcargo build
- Initiate: The Seller lists products. The Buyer initiates a trade, depositing funds that are converted to USDC via a Stellar Path Payment.
- Lock: The Smart Contract locks the funds and stores the agreed-upon
Loss_Ratio. - Dispatch: The Seller provides the driver's name, phone number, and vehicle manifest.
- Verification: - Success: Buyer receives goods and uploads a confirmation video. Funds release to Seller.
- Dispute: Buyer uploads a video of loss/damage with driver affirmation. A mediator reviews the evidence.
- Settlement: Based on the outcome, funds are distributed (either 100% to one party or split via the
Loss_Ratio).
- Develop core Soroban contract logic (
deposit,release,refund). - Implement basic Next.js UI for trade creation.
- Integrate
Loss_Ratiovariables into the smart contract. - Build the "Mediator" dashboard for dispute resolution.
- IPFS integration for video evidence uploads.
- Driver manifest logging and tracking interface.
- Public pilot program with regional agricultural cooperatives.
- Implementation of a "Trust Score" reputation system.
Amana is an open-source project aimed at improving food security and trade efficiency. We welcome developers, designers, and agricultural experts!
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/NewFeature). - Commit your Changes (
git commit -m 'Add NewFeature'). - Push to the Branch (
git push origin feature/NewFeature). - Open a Pull Request.
Distributed under the MIT License. See LICENSE for more information.