This project is a widget that will be dropped into an e-commerce checkout/payment page.
It will allow merchants to specify any ERC-20 token that they would like to get paid with. It also allows buyers to use any ERC-20 token to pay for a transaction.
On the backend, we use MetaMask and the 0x API to get the buyer's ERC-20 token and swap it into the token that the merchant would like to be paid with. This is all done on the payment page and does not require visiting any DEX or DEX aggregator sites. We also use 0x (and other aggregators in the future) to find the best price for the swap.
We use the 0x API in order to execute our swaps. We do all of our swaps in a custom smart contract built with Solidity and IERC20 standards.
We use Ganache-CLI to fork the mainnet Ethereum blockchain. We use Truffle to deploy our smart contracts and Infura for API access to the Ethereum network.
The backend of our demo store also uses Vendure (TypeScript), Node and SQLite for the server.