Facilitating secure, transparent, and decentralized escrow for diverse peer-to-peer exchanges.
The amis. project aims to provide a robust framework for secure, trustless, and decentralized escrow services, extending beyond just digital asset trades to encompass various goods, services, and jobs. Primarily accessed via a Discord bot and a complementary web frontend, amis. empowers users to engage in diverse peer-to-peer exchanges with confidence. This specific repository showcases the foundational Solidity smart contracts that power the escrow functionality. While the full amis. solution includes proprietary backend bot logic and a sophisticated frontend application, these open-source contracts represent the transparent and auditable core that governs all escrowed transactions.
The amis. ecosystem comprises three main components:
- Frontend: A web application for users to interact with the escrow system, manage trades, and connect their wallets. This component is kept private to protect proprietary UI/UX designs and integrations. It showcases the user experience and interaction with the underlying smart contracts.
- Backend: A Discord bot and its associated backend services that handle user commands, orchestrate trade setups, manage Discord-specific interactions, and communicate with the smart contracts on behalf of users. This component is also private for intellectual property and security considerations.
- Smart Contracts: The Solidity smart contracts deployed on the blockchain that manage the escrow logic, USDC token transfers, and trade state. These contracts are fully open-source and auditable, forming the trust layer of the
amis.protocol.
The Frontend and Backend interact with these Smart Contracts to create, fund, and release escrowed assets, ensuring transparency and immutability for all trade participants.
- Smart Contracts (in this repo):
- Solidity: For writing secure and efficient smart contracts.
- Hardhat: Ethereum development environment for compiling, testing, and deploying contracts.
- Frontend (not in this repo):
- React, Vite, Tailwind CSS: Modern web development stack for a responsive and intuitive user interface.
- Shadcn UI: Reusable UI components for a polished design.
- Wagmi, Ethers.js, AppKit: Libraries for seamless blockchain interaction and wallet integration.
- Backend Bot (not in this repo):
- Node.js: Runtime environment for the bot and backend services.
- Supabase: For database management and backend services.
This repository focuses on the AmisEscrowUSDC.sol smart contract, the core component responsible for facilitating secure escrow. Its key responsibilities include:
- Escrow Creation: Allowing a buyer to create an escrow for a specific transaction amount.
- USDC Handling: Managing the secure deposit and conditional release of USDC tokens.
- Trade State Management: Tracking the status of each escrowed transaction (e.g., funded, released, disputed).
- Security: Ensuring that funds are released only under predefined, verifiable conditions, typically through automated processes coordinated by the backend bot or agreed-upon multi-signature approvals.
The contract is designed to be deployed on the Base network, with particular focus on the Base Sepolia testnet for development and testing.
To compile and deploy the smart contract locally (e.g., on a Hardhat local network):
- Clone this repository:
git clone https://github.com/tonyrav3n/amis-bot-live.git cd amis-bot-live/contracts - Install Hardhat dependencies:
npm install # or yarn install / pnpm install - Compile the contract:
npx hardhat compile
- Run tests (optional but recommended):
npx hardhat test - Deploy to a local network:
(Note: The exact deployment script may vary based on your Hardhat configuration.)
npx hardhat run scripts/deploy.js --network localhost