CoinChoice is a MetaMask & Browser Extension that gives you choice over which coins are used to pay gas.
- Go cross-chain sooner
- Minimise steps to interact with Smart Contracts
- Need ETH? Top up your gas directly from MetaMask
- New crypto users no longer need to withdraw gas from a CEX
- Stake and withdraw all of your ETH. Pay gas in another token.
- Select a default coin for your gas fees
- On each transaction, you will be prompted to cover gas in your chosen coin
- Sign a message
- A small amount of ETH is deposited into your wallet
- Continue with your original transaction
- All transactions are simulated using the Tenderly API
- A gas estimate is compared to your chosen coin using the 0x Quote API
- You are prompted to pay gas in your chosen coin
- On approval, your meta-tx is used to swap from your chosen coin to ETH with the 0x Protocol
- Finally, your original transaction will proceed as though you had ETH all along
This all happens in a single seamless user experience.
- Receive funds in any currency
- New wallet, no problem. Transfer coins as though you had the gas
- Always have the right coins to stake in an LP Pool
Learn more: https://go.usher.so/coinchoice
backend
: A NestJS Web Server responsible for- simulating transactions against the Tenderly API and 0x Quote API to yield gas estimates in chosen currency
- receive and syndicate messages between the client's Metamask Snap and Browser Extension
- receive meta-tx to forward to relayer contracts
browser-extension
: A Browser Extension powered by the Plasmo Framework- intercepts RPC requests to MetaMask in order to inject swaps to ETH for gas financing
- offers a popup where Gas Coin can be selected
- offers a popup for Token management powered by Cypher Onboarding SDK
All data is submitted to
backend
service where Blockchain Interactions and Simulations are managed
contracts
: Smart Contracts that power relaying meta-transactions to facilitate swaps on 0x Protocol.ceramic
: An alternative approach to data management whereby ComposeDB is used in place of MongoDB for Wallets and Selected Coinsfrpc
: A package to leverage the Fluence Network's fRPC Gatewaymeta-mask
: A package that contains a React.js Site and assocated MetaMask Snap.- The Snap is responsible for offering ETH Swaps directly within the MetaMask interface, by showing a message "Need ETH?"
- The Snap works by making a request to the
backend
so that a message is forwarded to the client'sbrowser-extension
, enabling an experience where the MetaMask Snap can initiate the Browser Extension - The associated Site is used to enable MetaMask Snap Installation
The codebase is highly experimental as it was developed at the EthDenver Hackathon in a matter of days!
Simply fork this repo and make it your own, or create a pull request and we can build something awesome together!
Star this project ⭐️⭐️⭐️, and feel free to follow the team behind it by visting: https://go.usher.so/coinchoice