johnpm-12 / Ethereum-EOS-cross-chain-token-exchange-example

basic example showing a token deployed on both Ethereum and EOS that allows holders to transfer their balance from Ethereum to EOS and vice versa
9 stars 4 forks source link

What happens if eos account address is undefined? #1

Open dokwon opened 6 years ago

dokwon commented 6 years ago

https://github.com/whatsyourgithub/Ethereum-EOS-cross-chain-token-exchange-example/blob/c9e3561d70d91aa5859fbcbc5fe488d9d020edac/eth/contracts/EOSExchangeableToken.sol#L86

johnpm-12 commented 6 years ago

See the Potential Improvements section of the readme. There is already a simple solution proposed, but it's not currently implemented.

The bot just has to check if the EOS account exists (or the ETH address is valid if going the other way) and re-issue the tokens back to the original address/account that requested the cross chain exchange if the destination is invalid. This ensures the total supply remains constant, and nobody is losing money.