hackquest logo

Flex-Swap

FlexSwap is a decentralized exchange (DEX) built on Ethereum-compatible blockchain networks. It allows users to swap ERC-20 tokens and add liquidity to the exchange.

Description

FlexSwap

FlexSwap is a decentralized exchange (DEX) built on Ethereum-compatible blockchain networks. It allows users to swap ERC-20 tokens and add liquidity to the exchange. The platform is designed to make token swapping simple, secure, and efficient.

Features

  • Swap ERC-20 tokens directly.

  • Add liquidity for token pairs.

  • Real-time swap status updates.

  • Set the exchange rate for token swaps.

  • Built with Solidity smart contracts and a user-friendly frontend using HTML and JavaScript.

Contract Details

  • Contract Address: 0x6D11725a040c5b03B4c0D381F3D9852e69208f5a

  • Network: EduChain Testnet

Deployment

How to Use

  1. Set the Rate: The exchange rate for swapping tokens can be set by the contract owner.

  2. Approve Tokens: Users need to approve their tokens to be spent by the DApp before making swaps.

  3. Swap Tokens: Select Token A and Token B, specify the amount, and execute the swap.

  4. Add Liquidity: Users can add liquidity for specific token pairs to provide liquidity to the exchange.

Frontend

The frontend allows users to interact with the DEX contract, set the swap rate, and swap tokens easily. The DApp is built with HTML, JavaScript, and Web3.js to connect with the Ethereum blockchain.

Tech Stack

HTML
Bootstrap
JavaScript
Web3
Ethers
Solidity
EduChain
Sector
DeFiInfra