I'm currently building a feature where users can exchange their ERC20 token for a that can be used within our DApp. This therefore requires a transaction from the user to us (their ERC20 token to us), and then we credit their account on the DApp with the app credits, in a ratio of 1:1. The issue is how are we able to do the transaction between them and us, without it costing them any ETH?

Is there a way for us to pay this transaction for the user?

Upon further reading, it seems this isn't possible with Ethereum. It seems that the only person that can pay the transaction fees is the person sending the transaction. It also seems that this is something that the Ethereum community would like to address in Serenity.


2 Answers 2


At the moment all Ethereum network transactions are paid by the user. There is no such feature where a contract or third party could pay for the gas.

It is being debated for the future versions of Ethereum. You can follow the discussion by reading Ethereum Improvement Proposals (EIP) on Github and here http://ethresear.ch/


Actually, there is a way to do this. The EIP1035, which is currently being discussed on GitHub, shows a way of performing such an interaction. Here, the user is sending the parameter bytes data, which equals bytes4(sha3(<function name>)) to the executer (in this case you) together with the contract address target, the user's nonce and his personal signature which can only be created with the help of this user's private key. The executor then recovers the ECDSA encryption of the signature and checks whether the transaction has actually been verified by the sender. Seeing as the signature is created using target, nonce, data and the private key of the sender, the transaction will only work with this combination of parameters and, therefore, cannot be manipulated.

Hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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