I have deployed and tested my custom token contract using Openzeppelin contracts successfully. I need to design a dapp using metamask. I want to sell my tokens in exchange for Tether Token. In order to transfer token to buyer Is there any way to transfer token to buyer without need to pay the gas fee? I mean using a mechanism to make buyer does transaction.



For sending without gas, see the Gas Station Network and Meta Transactions come to mind: https://docs.openzeppelin.com/learn/sending-gasless-transactions

In your case, paying with Tether, they'll have to approve (increase the allowance) first.

Don't overcomplicate, let them pay for gas, that's pretty standard.


If you want to sell your token for Tether and you don't want to write a custom contract, you can:

  1. Make a Uniswap pair using UniswapV2Factory https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2Factory.sol#L32
  2. Add liquidity: https://uniswap.org/docs/v2/smart-contract-integration/providing-liquidity/
  3. Let users users swap for your token directly on uniswap, or encode the swap yourself. https://uniswap.org/docs/v2/smart-contract-integration/trading-from-a-smart-contract/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.