Quickzap is a decentralized payment gateway that enables payments on the web using almost any ERC20 token or ETH. It consists of a smart contract, API and a web3 enabled page. The online store owner adds a script to his store which is executed when a button is clicked on the checkout page. The script takes the contract address of the token the merchant wants to receive, his wallet address and the amount payable in dollars. The script loads the web3 enabled page as a pop-up and it collects the parameters passed to the script from the URL. The page communicates with the smart contract on the blockchain. It lets the customer select a token in his wallet he wants to use to make payment. The smart contract swaps the ERC20 token selected by the customer on a DEX to the merchant's preferred token if they are different. If the token selected by the customer is the same as the token preferred by the merchant, it sends it directly to the merchant.
How It's Made
The project consists of a web3 enabled page, smart contract and an API. The web3 enabled page allows people to select a token they wish to use in making payments and helps create and send transactions. It scans the wallet and finds the cheapest token which can be used for payment. We get the prices of these tokens using the Coingecko API and get the amount to be paid using the Uniswap SDK. The project makes use of smart contracts written in Solidity. The smart contracts communicate with the Uniswap protocol and use it for swapping when the token is used for payment and the token being sent as payment are different i.e token customer sends is different from token merchant wants.