Skip to content

RamsNotes31/SertSwap

Repository files navigation

SertSwap Logo

🌊 SertSwap DEX

Decentralized Token Exchange Platform untuk Testnet

Laravel 11 Ethers.js Networks Uniswap V2

Status License


⚡ Apa itu SertSwap?

SertSwap adalah platform decentralized exchange (DEX) yang dibangun di atas Laravel dengan integrasi Web3 menggunakan Ethers.js. Platform ini memungkinkan pengguna untuk:

  • 🔄 Swap Token - Tukar token ERC-20 secara langsung menggunakan protokol Uniswap V2
  • 💧 Liquidity Pools - Tambah dan kelola likuiditas untuk pasangan token
  • 👛 Multi-Wallet Support - Koneksi dengan MetaMask dan wallet Web3 lainnya
  • 📊 Real-time Quotes - Dapatkan harga swap secara real-time

🎯 Fitur Utama

🔄 Token Swap

  • Swap ETH/MATIC ke token ERC-20
  • Swap token ERC-20 ke ETH/MATIC
  • Swap antar token ERC-20
  • Slippage tolerance yang bisa dikustomisasi
  • Transaction deadline setting

💧 Liquidity Management

  • Tambah likuiditas ke pool
  • Hapus likuiditas dari pool
  • Lihat posisi likuiditas
  • Calculate optimal amounts

🌐 Multi-Network

  • Sepolia Testnet (Ethereum)
  • Amoy Testnet (Polygon)
  • Network switching yang mudah
  • Block explorer integration

📱 User Experience

  • Dark/Light mode responsive
  • Real-time balance updates
  • Transaction history tracking
  • Glassmorphism UI design

🛠️ Tech Stack

Layer Technology
Backend Laravel 11, PHP 8.2+
Frontend Blade Templates, Vanilla CSS
Blockchain Ethers.js v6, Web3 Provider
Smart Contracts Uniswap V2 Router, ERC-20
Database MySQL/SQLite

🚀 Quick Start

Prerequisites

  • PHP 8.2+
  • Composer
  • Node.js & NPM
  • MetaMask Extension

Installation

# Clone repository
git clone https://github.com/your-username/SertSwap.git
cd SertSwap

# Install PHP dependencies
composer install

# Install Node dependencies
npm install

# Setup environment
cp .env.example .env
php artisan key:generate

# Run migrations
php artisan migrate --seed

# Start development server
php artisan serve

Configuration

Edit file .env untuk konfigurasi:

# Application
APP_NAME=SertSwap
APP_URL=http://localhost:8000

# Database
DB_CONNECTION=mysql
DB_DATABASE=sertswap

🔗 Supported Networks

Network Chain ID Router Contract Explorer
Sepolia 11155111 Uniswap V2 etherscan.io
Amoy 80002 QuickSwap polygonscan.com

📁 Project Structure

SertSwap/
├── app/
│   ├── Http/Controllers/
│   │   ├── SwapController.php      # Swap logic
│   │   ├── LiquidityController.php # Liquidity management
│   │   └── Api/TokenController.php # Token API
│   └── Models/
│       ├── Token.php               # Token model
│       └── Pool.php                # Liquidity pool model
├── public/
│   └── js/
│       └── web3-service.js         # Web3 interactions
├── resources/
│   └── views/
│       ├── swap/                   # Swap interface
│       ├── liquidity/              # Liquidity interface
│       └── layouts/                # App layout
└── routes/
    ├── web.php                     # Web routes
    └── api.php                     # API routes

🎨 UI Preview

┌──────────────────────────────────────┐
│         🔄 SertSwap DEX              │
├──────────────────────────────────────┤
│  ┌────────────────────────────────┐  │
│  │  You Pay                       │  │
│  │  [1.0        ] [ETH ▼]        │  │
│  │  Balance: 2.5 ETH             │  │
│  └────────────────────────────────┘  │
│              ⇅                       │
│  ┌────────────────────────────────┐  │
│  │  You Receive                   │  │
│  │  [1842.50    ] [USDC ▼]       │  │
│  │  Balance: 500 USDC            │  │
│  └────────────────────────────────┘  │
│                                      │
│  ┌────────────────────────────────┐  │
│  │        [ Swap Now ]            │  │
│  └────────────────────────────────┘  │
└──────────────────────────────────────┘

🔐 Security

⚠️ Testnet Only: Platform ini dirancang untuk digunakan di testnet saja. Jangan gunakan untuk transaksi mainnet dengan aset nyata.

  • ✅ Non-custodial - Private keys tidak pernah meninggalkan wallet Anda
  • ✅ Open source - Kode dapat diaudit
  • ✅ Standard ERC-20 - Menggunakan kontrak yang sudah teruji

🤝 Contributing

Kontribusi sangat dihargai! Silakan:

  1. Fork repository
  2. Buat feature branch (git checkout -b feature/AmazingFeature)
  3. Commit perubahan (git commit -m 'Add some AmazingFeature')
  4. Push ke branch (git push origin feature/AmazingFeature)
  5. Buka Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.


👤 Author

Muham


Made with Laravel & Web3

⭐ Star this repo if you find it useful!

About

Decentralized Token Exchange Platform for Testnet

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages