Concerning retrieving your private key for the eth-address
Closed this issue · 7 comments
I have the following question about step 7 from the wiki:
7. Get the Dogecoin address that "sent" the DOGE.
Doge tokens will be assigned to the Ethereum address controlled by the private key who signed the Dogecoin transaction.
Is my understanding correct that the Dogerelay contract creates a separate new doge address that makes a doge transaction? (this account's private key will be the ethereum private key to retrieve your eth tokens)
If so, how come you can use dogecoin-qt
to retrieve the private key of this new address?
- DogeRelay does not create a new doge address. It does not create a new eth account either. In fact, creating an address is kind of a blurry concept. DogeToken just finds out what account to use.
- I don't get what "a separate new doge address that makes a doge transaction" means.
- Since eth and doge use the same cryptography for private/public keys, you can copy a private key from a doge node to an eth node.
- Doge address and Eth accounts are just "compressed" forms of public keys.
- Once you sent a lock tx on doge, DogeRelay and DogeToken just assign new tokens to the same "user" that sent the tx. ie, to the same public key.
Closing this since it is not an issue, but happy to answer more questions.
@oscarguindzberg
Thank you for your explanation. Thank you for allowing me to ask additional questions, and sorry to have opened an issue. I will go ahead and ask here.
① If I understand correctly:
The address to be retrieved at step 7 of the wiki is your own address that one uses to send DOGE to the "lock address" (Doge lock address: D596YFweJQuHY1BbjazZYmAbt8jJj4CD3E).
7. Get the Dogecoin address that "sent" the DOGE.
Doge tokens will be assigned to the Ethereum address controlled by the private key who signed the Dogecoin transaction.
In case the Dogecoin transaction has several inputs, we consider "the address that sent the DOGE" the first input address in the transaction. For instance, in this transaction the first input address is
DQdN145ebvu3v8uXC7XvGYtmYRdGQERnkL.
↑
This address is your own address. Correct?
② Is there currently any way to convert your ERC20 tokens back to DOGE coins? Or are your doge coins locked forever?
- yes
- doge coins are locked forever
@oscarguindzberg
Thank you for your answer!
I see that you have a marvellous one way peg system!
Do you have any idea how to create a two way peg method where you can unlock your doge coins again?
@oscarguindzberg is that Doge lock address proveably a burn address? It looks like a normal address someone might have the private key for...?
D596YFweJQuHY1BbjazZYmAbt8jJj4CD3E may look like a normal address but it is unspendable.
It pays to the owner of the private key whose public key RIPEMD160 SHA256 hash is 0000000000000000000000000000000000000003
It is imposible (almost) to get the private key for that.
You can verify D596YFweJQuHY1BbjazZYmAbt8jJj4CD3E is 0000000000000000000000000000000000000003 formatted as a doge address using libdohj:
NetworkParams dogeParams = DogecoinMainNetParams.get();
new Address(params, params.getAddressHeader(), Hex.decode("0000000000000000000000000000000000000003"))
Or you can use any other doge library to verify that.