panautomata icon indicating copy to clipboard operation
panautomata copied to clipboard

ExampleCrossToken could use a Factory contract

Open HarryR opened this issue 5 years ago • 0 comments

The ExampleCrossTokenProxy contract can only be used as a proxy for a single remote contract, it's open to any remote contract until a Redeem() operation is made, then it's locked to whichever remote contract that was.

You shouldn't trust users to create new contracts, nor is it ideal for users to have to find a contract which is suitable to be used as a proxy. We need to be able to trust a single contract.

The solution to this is to have a Factory contract, which acts like a Token registry but for remote ether. You ask the Factory 'Do you have a Token for Token X on Chain Y?' If it says No, then you ask it to create a token contract for that specific one. Future requests will answer with an already created one.

HarryR avatar Jul 11 '18 20:07 HarryR