Proposal for the Peercoin to Ethereum bridge. Goal is to design a system which would allow tokenization of Peercoin on the Ethereum to allow for access to one of those AMM contracts on the Ethereum (Uniswap, Mooniswap, Sushi, …).
I got a number of requests to handle this in the past few weeks. At first, I’ve wanted to handle this problem by using one of the established solutions like RenVM. However, that could be months away due to the need to remove the transaction timestamp and there are other costs associated with using 3rd party solution - like paying for fees in yet another 3rd party token.
Expected end goal
- Increase number of platforms where Peercoin is traded
- Access vast liquidity present on Ethereum AMM contracts
- Allow for trustless trading of Peercoin.
System would have two components, one on Peercoin the other on Ethereum.
On Peercoin side there would be a multisig address which would hold peercoins while they are used on Ethereum. On Ethereum side there would be a contract which would issue new wrapped peercoin tokens per demand.
- preferably large number of signers, like 3 of 12
- keys preferably on hardware wallets
Peercoin -> Ethereum
Upon deposit to the multisig address, the user would state where does he want his wrapped peercoins on the ethereum side. To which address should the tokens be deposited. Ethereum address would be embeded in the OP_RETURN field of the peercoin transaction.
Once the transaction confirms, the Ethereum contract would create exact same amount of tokens and send it to this address.
Ethereum -> Peercoin
When the user wants to return his peercoins to Peercoin network he destroys the tokens on Ethereum side by returning them back to the origin smart contract.
Unresolved: how to state a destination address (peercoin) while doing the burn?
Upon inspection that proof of burn is valid, multisig allows the user to withdraw from it.
User tailors the transaction, and submits to the rest of multisig for inspection and co-signatures.
A complex system like this requires means of coordination. There is a lot of keys participating in multisig and there could be a lot of back and forth volume. There is also a need to normalize the deposit and withdrawal transactions. Specifically, the deposit transaction must include the Ethereum destination address, so this must be forced on the user, so he does not omit it. When the user wants to untokenize Peercoin there must be a way to signal the multisig that they need to act (emiting an event). There should also be a communication channel where off-chain unsigned peercoin transactions can be shared.
A webapp with these features is probably the best solution.
Disadvantages of this solution
System would require human interaction, the user could sometime wait for some guy to come online and manually sign the transaction.
I prefer that to bots, because it can be done with hardware wallets and it’s much safer.
Perhaps one of the co-signers can be automated (a script)?