Is it possible to accumulate fee amount deducted from transfer transactions in a different address in smart contracts?

Person A transfers tokens to Person B. Let's say the transaction fee is 0.1 ETH, I want to make the transaction fee 0.2 ETH and send it to the address I specified at 0.1 eth while the 0.1 eth gas fee goes.

How can I do such a procedure?


You can raise the gas consumption of your token transfer but the extra gas would be wasted. You can't directly "save" the gas or transfer it.

However, what you can do is mint something like GasTokens with the extra gas. With GasTokens you can basically store gas and send the tokens anywhere you want. Then later you can burn the tokens to save in gas costs. You can read more about it here: https://gastoken.io/

The bad thing with GasToken is that they have quite big overhead, so it's not very cheap to store & retrieve the value. There is also another variant, Chi, but I'm not very familiar with that.

  • I will review the resources you suggested, thank you. Actually, what I think is to send it to another address by deducting some amount from the total amount in dex transactions like uniswap. As well as a total value in purchases and sales, can a deduction etc. be made while calculating this value? How do we send this interruption to another address and how do we interrupt. – donnita Jan 15 at 14:52
  • Basically the transaction simply utilizes more gas than it would otherwise. The gas is spent on minting real ERC20 tokens (GasTokens). The trick to gain some of the gas back when burning the tokens has to do with gas refunds when deleting data from a contract - you can read the details at their page – Lauri Peltonen Jan 15 at 15:30
  • What I really want to do is to get some commission from Uniswap transactions. The token price is $ 1 and after 100 purchases are made, sending 98 tokens and getting a $ 2 commission. – donnita Jan 15 at 19:52

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