Author

Topic: implicit cost of pegged sidechains (Read 1686 times)

full member
Activity: 179
Merit: 151
-
September 26, 2016, 03:09:02 PM
#10
...every coin on Alpha is 100% backed by a locked coin on testnet, and using the peg mechanism you can swap a testnet coin on Alpha for one of its backing coins on testnet.

Could you show the code on how alpha does this? As per my knowledge, since the bitcoin blockchain cannot be monitoring a sidechain, the way to unlock the coins on mainchain is through a  third party federation, the sort of group RSK is building & the technique they plan on using. It would be really useful, thanks.


Alpha is using a third-party federation which processes peg-outs (though the details of this are purely mechanical, it is not too hard to write software that verifies that the federation is doing exactly what it is supposed to and no more). Peg-ins are done by Alpha's consensus code, though I don't know the details of this well enough to point you to the code.
sr. member
Activity: 452
Merit: 252
from democracy to self-rule.
September 26, 2016, 12:54:37 PM
#9
...every coin on Alpha is 100% backed by a locked coin on testnet, and using the peg mechanism you can swap a testnet coin on Alpha for one of its backing coins on testnet.

Could you show the code on how alpha does this? As per my knowledge, since the bitcoin blockchain cannot be monitoring a sidechain, the way to unlock the coins on mainchain is through a  third party federation, the sort of group RSK is building & the technique they plan on using. It would be really useful, thanks.

full member
Activity: 179
Merit: 151
-
September 26, 2016, 11:33:01 AM
#8
When the government of Argentina says they're going to peg the peso to the US dollar that means that if you come and give them a peso they will give you a US dollar in return. That's a 1 way peg.

A 2 way peg would mean you could get a peso for a dollar in the US and you could get a dollar for a peso in Argentina.

With cryptocurrencies a peg can't function this way since there isn't any authority, such as a national government, who can make such a commitment.


So what are we talking about when we say 2 way peg?

We were a bit worried about this point of confusion when we used the word "peg" in the sidechains whitepaper, but it was the cleanest word we could come up with. You're right that in the finance world, a peg between two different assets requires some authority to maintain the peg (and they do so basically by fighting every market movement, at cost to themselves). This is how sidechains work on a technical level, but not on a moral one.

A sidechain peg is not between two separate currencies, like Ethereum and Bitcoin. It is between the same currency on different blockchains. For example, there is a testnet sidechain, Elements Alpha, out there. You can distinguish between "testnet coins on the testnet chain" and "testnet coins on Alpha", and these are technically distinct entities, but every coin on Alpha is 100% backed by a locked coin on testnet, and using the peg mechanism you can swap a testnet coin on Alpha for one of its backing coins on testnet. So there can't be market movements of the coins on one chain relative to the other, except up to time-preference since the peg is slow, otherwise people will arbitrage out any price difference using the peg.


newbie
Activity: 28
Merit: 5
September 26, 2016, 07:35:32 AM
#7
but the example I made, when funds are transferred to a particular account on a particular blockchain, they are frozen there- in that one account- and the act of freezing them there is what gives you access to some proportional amount of value on another chain- until the time that you want to undo it, and you transfer them to some particular address on the 2nd chain to give you access back to you funds on the first chain- isn't that how it works?

that's the impression I got after reading those papers.
legendary
Activity: 4228
Merit: 1313
September 26, 2016, 07:25:30 AM
#6
Your Argentina example relies on people whereas the 2-way peg for sidechains should be handled completely automatically by the protocol (although for the interim solution using a federated peg that is not the case).  So you don't need a centralized authority to make the commitment.  

You might check these papers out for more details on sidechains and pegs:
https://blockstream.com/sidechains.pdf
http://www.rsk.co/blog/sidechains-drivechains-and-rsk-2-way-peg-design

You can create a sidechain for bitcoin, but doing it for ETH for example, would be a "transfer" between bitcoin and an alt-coin, not a sidechain.  ETH has its own rules for creation of ETH whereas a prototypical sidechain would have coins created and destroyed when there are "transfers" to and from the sidechain.  This means, for example, you wouldn't have different inflation rules for the sidechain.  The papers above (and many others) have much more detail.


When the government of Argentina says they're going to peg the peso to the US dollar that means that if you come and give them a peso they will give you a US dollar in return. That's a 1 way peg.

A 2 way peg would mean you could get a peso for a dollar in the US and you could get a dollar for a peso in Argentina.

With cryptocurrencies a peg can't function this way since there isn't any authority, such as a national government, who can make such a commitment.

So what are we talking about when we say 2 way peg?

According to my understanding it means that if you send an amount of BTC, let's say amount X to a particular address A, this address is associated with a different cryptocurrency, ETH for instance ,on blockchain B.

Then having sent X of BTC to A you will have some amount of ETH proportional to X on blockchain B, until you decide to reverse the peg and have your BTC insead of ETH. Is that how it works?


newbie
Activity: 28
Merit: 5
September 26, 2016, 06:58:25 AM
#5
When the government of Argentina says they're going to peg the peso to the US dollar that means that if you come and give them a peso they will give you a US dollar in return. That's a 1 way peg.

A 2 way peg would mean you could get a peso for a dollar in the US and you could get a dollar for a peso in Argentina.

With cryptocurrencies a peg can't function this way since there isn't any authority, such as a national government, who can make such a commitment.

So what are we talking about when we say 2 way peg?

According to my understanding it means that if you send an amount of BTC, let's say amount X to a particular address A, this address is associated with a different cryptocurrency, ETH for instance ,on blockchain B.

Then having sent X of BTC to A you will have some amount of ETH proportional to X on blockchain B, until you decide to reverse the peg and have your BTC insead of ETH. Is that how it works?

staff
Activity: 4284
Merit: 8808
September 25, 2016, 08:45:17 PM
#4
I disagree with the assertion that "the only source of value difference between coins in the two networks is the friction related to the technical operation of the peg".
One could make the argument that another important source of value difference is the degree to which people are willing to hold either currency.
They aren't separate currencies. If you have 100 BTC in a sidechain and would prefer to have BTC in the parent chain, you simply move it. No third party or exchange is involved, only the fees and delays associated with making a transaction.

Quote
If I created a peg while the Ethereum price was high, pegging BTC to Ethereum at the pre-DAO rate,
This doesn't make any sense at all: you cannot 2wp ethereum to BTC: they are separate currencies; with their own issuance and supply. Trade between them requires counterparties and cannot be guaranteed to be available at any particular exchange rate.
newbie
Activity: 28
Merit: 5
September 25, 2016, 01:49:17 AM
#3
To use your example, even USD in my pocket is more valuable than USD in paypal.

That's how paypal makes money- for instance- if I sell a product on eBay paypal always keeps the money due to me for about a week- for "processing" or w/e- during this time they invest it and make money on the float.

The difference between liquid dollars in my pocket and money locked up in paypal is not deterministic or fixed- the relative values fluctuate. The money locked up in paypal is analogous to a fixed time certificate of deposit, that's what I was saying in the original post.

I'm not sure what you mean by "no guaranteed exchange".

I disagree with the assertion that "the only source of value difference between coins in the two networks is the friction related to the technical operation of the peg".

One could make the argument that another important source of value difference is the degree to which people are willing to hold either currency.

Think about the recent trouble with Ethereum. If I created a peg while the Ethereum price was high, pegging BTC to Ethereum at the pre-DAO rate, I would take a hit and loose money if we undid the peg after the precipitous drop in Ethereum value- isn't that correct?
staff
Activity: 4284
Merit: 8808
September 24, 2016, 05:27:10 PM
#2
The exchange rate is fixed because _every_ sidechain coin is backed by a fixed amount of coin in the parent chain with a fixed, programmed, and mechanically fulfilled guaranteed delivery.

This is unlike foreign currency, but like USD in your pocket vs USD in paypal (but without the custodial risk). Anyone with a coin in either can effectively move their coin into the other at any time using the peg mechanism. With a foreign currency there are separate independent supplies of the currency and no guaranteed exchange.

The only source of value difference between coins in the two networks is the friction related to the technical operation of the peg (the time preference and transfer costs, relative to the differential demand).
newbie
Activity: 28
Merit: 5
September 24, 2016, 01:40:31 PM
#1
The paper 'Enabling Blockchain Innovation with Pegged Sidechains' is a work of art, and I have the utmost respect for it's authors.

That being said there is one passage I personally find a bit hand-wavy, specifically Section 3 'Two-way peg', subsection 3.1 'Definitions'.

NOTE: I'm not exactly clear on the meaning of "deterministic exchange rate", however...

The passage "Two-way peg refers to the mechanism by which coins are transferred between sidechains and back at a fixed or otherwise deterministic exchange rate" piqued my curiosity.

How is this possible? It reminds me of a 'foreign currency certificate of deposit'*, where it's easy to get burned by the fluctuating relative values of the currencies. It seems to me that pegged sidechains are particularly susceptible to this kind of implicit cost. Is that so?


* https://en.wikipedia.org/wiki/Time_deposit


See also:

http://money.stackexchange.com/questions/1502/investing-in-foreign-cds-is-it-worth-the-risk
Jump to: