If one were to create a site where users could sign up and transfer fiat currency to the site in exchange for the amount of ERC20 tokens equivalent to the fiat currency, how would they do it?

How can I program to create wallets on Ethereum and then transfer tokens from an owned wallet to that newly generated wallet?

The system would work almost like Coinbase, but instead of transferring BTC or ETH to a new wallet for the user, it would transfer the ERC20 token.

Thanks for any help. I'm very new to how the ethereum blockchain can interact with the web and such.


You have several options for this. If your application is on a website then javascript and web3 are a good choice. You could use Metamask so that your users can create accounts and have theirs keys secured in their side without having to submit them to third parties (which is a no) and web3 to interact with the ERC20 contract and with the wallet that you will create.

You can also do this with phyton through the phyton web3py package.

Hope this helps

  • Thank you Jaime. You mention using metamask, but for this project I am working towards I think that's not possible as they want low as possible friction for users just buying the tokens (like coinbase). I think the actual wallet side of things will be "behind the scenes" the users won't need to be concerned with private keys or gas costs for transfers (they will pay a small fee unrelated). Like how with coinbase they have the private key and the user has to trust them. This will also be a trust-based project. Do you think JS and web3 are the way to go still for that kind of website? – John Murphy Jun 8 '18 at 12:48
  • 1
    I assume users are informed of this (this is actually the case of most exchanges). I think this could be done using a traditional database model as you do not need the users to interact with blockchain. Behind-scenes you could do anything you wish manage user funds, accounts, and execute transactions. – Jaime Jun 8 '18 at 12:59
  • That's my own thoughts too. I'm not sure why a blockchain is needed for this project. I think the immutability is important, as it will be one of the selling points to merchants (no more chargeback fraud). – John Murphy Jun 8 '18 at 13:53
  • 1
    So you can have account for each user, your system will be just doing the transactions for them, but you will have everything on the blockchain and you can use this to prove the transparency as there would be a register of everything that has happened with every account, the users can see it and they will have the certainty that your system could not arbitrarily change the registers. – Jaime Jun 8 '18 at 13:56

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