3

I'm only getting started with my knowledge of Blockchains, but one thing has me confused.

If I were to build a Dapp offering a service for users, such that users don't have to pay to use the service, how can the transaction fees from executing the computation be paid for?

If a way around this was to only show data (i.e. so nothing is being written to the Blockchain, only read), would that have a computation cost? Does reading data count as a transaction?

Thank you in advance for your help. Please don't hesitate to correct any of the above.

2 Answers 2

2

Reading from the blockchain is free. Writing to the blockchain is not.

Why? Writing data to the chain requires that data to be saved in a block. Miners have to mine that block, and mining has costs (electricity etc).

If you were so inclined you could write a contract, send it some Ether, and have your contract functions send the transaction sender some of that Ether when they call the function. I.E Subsidize people using your contract.

1
  • 1
    It's perhaps worth noting that this refund solution doesn't help you with the "cold start" problem of helping a new user issue a transaction for free. They still need some ether in their account to pay for the gas before being reimbursed.
    – carver
    Aug 11, 2017 at 18:33
2

This isn't possible in production Ethereum right now. The end user must pay for the gas costs to run a transaction with your service.

However in a few years, Serenity is scheduled to go live with EIP 101 (draft). It would allow contracts to pay gas for the caller, among many other features.

Your Answer

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

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