Open dokwon opened 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.
https://github.com/whatsyourgithub/Ethereum-EOS-cross-chain-token-exchange-example/blob/c9e3561d70d91aa5859fbcbc5fe488d9d020edac/eth/contracts/EOSExchangeableToken.sol#L86