Create a contract to mint token when deposit, and can exchange it back

Hi!

I want to mint a token when deposit on contract (like crowdsale contract) and the owner would be able to exchange back the minted token for the initial deposit.

Someone know if something like that already exist?

If it isn't exist, I think I have to work from crowdsale contract, but I don't know how to manage the refund on demand from this contract...

Eg:

  • send 0.1 ETH to the contract to mint 1 TKN
  • send 1 TKN to the contract to receive 0.1 ETH

Thanks for your help!

Hello @Galaxy_Nougat

You should check out WETH.