I am developing an app that uses Ethereum as its payment method, and in the app, users will have their own balances. But there is a slight problem and it has to do with fees.

  • If a user deposits funds, he is obviously paying a fee to send the money. And that is understandable

  • Now in my app, users will be able to give their friends funds as well. HERE is where the problem arises.

If a wallet is created for each new client, not only is there a fee when they first deposit money, but they would be charged money every time they gave someone else money.


I then thought of making it so that each user deposites into the same Ethereum wallet, and then have a separate database that registers how much of that total balance is of each user. So that makes it possible for having balances shifting in the database without it actually shifting in the Ethereum blockchain, until a user wants to withdraw.


How would I know which user sent the money? It is possible for a user to first specify which account they are sending the money from and then sending, but I see holes here for security reasons. For instance, what if a bad person knows the persons Ethereum address and pretends he is sending the funds and gets the funds credited to his account.

There was also the option of using the data variable in the transactionObject in the code:

web3.eth.sendTransaction(transactionObject, myCallbackFunction);

And in this option, if the data variable was a code that was randomly generated, it would make it easy to track what is happening. HOWEVER not all ethereum wallets online give the option of using that data variable during a transaction, and this might limit the amount of potential clients that can use my app.


How might I go about fixing the previous issue of finding the right way to store user balances? I am not sure if there is another way of getting this done and if someone has a solution please let me know.


1 Answer 1


Using the data field is the most appropriate solution here. I believe most standard wallets do support data field, some wallets simply have it hidden under an advanced menu. You could prompt your users to use standard wallets like MyEtherWallet that support the data field.

An alternative (probably too complex) method to deal with this would be to have a pool of Ethereum addresses. Every time you seek a deposit from a user, you generate an address and ask the user to deposit to that particular address. During withdrawals you utilize a single wallet with sufficient funds, or combine multiple wallets.

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.