Bitcoin Forum
October 15, 2018, 02:16:50 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: I don't understand sidechains  (Read 348 times)
Itty Bitty
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
December 10, 2017, 12:41:31 PM
 #1

I can't wrap my head around sidechain concepts.

Here's what I think I know.

Let's say there's a main chain (POW) whose token is valued at one unit.

Now let's say there's a sidechain to this mainchain, which is trying out some new tech, let's call it thimblejimble. Now this thimblejimble sidechain tokens are valued at : 1 mainchain token = 10 thimblejimble tokens. First question: Does this statement even make sense? Do sidechains have their own traded tokens such that this is what the exchange would be like?

So, from what I understand, to control 10 tokens in the thimblejimble chain, you would lock up one main chain token. I guess this means you leaving your private keys that control the main chain token behind, and somehow acquiring the private keys to 10 sidechain tokens? And then you transact in the thimblejimble sidechain for awhile with these 10 tokens (because that's what you do in a blockchain - transact (rearrangement of UTXOs and their private keys) - right? or am I not understanding what is going on within a sidechain's blocks?)

Well, let's say that after 2 months, the main chain token to side chain token value remains the same. However, the private keys to 5 of the 10 sidechain tokens you acquired have been transferred to someone else (Does this even make sense for a sidechain?). Now, you want to go back to the main chain. Are you able to transfer the 5 sidechain tokens for 0.5 mainchain token? What happened to the other 0.5 mainchain token value? Can the new owner of the 5 sidechain tokens claim the 0.5 main chain token remaining (Does this question in any way make sense?) How does the owner two or four or fourteen  transactions down the line know these 5 sidechain tokens are tied to a main chain token? Is the value lost forever if they aren't aware? I don't even know if I'm asking anywhere near sensible questions.

The whole concept of transferring value from a main chain to a side chain is completely baffling to me. I assume both chains operate similarly - POW mining, transactions grouped into blocks, blocks chained together at some average time interval. But value for these chains (main and side) of their tokens is done external to the chains - what if the relative  value of the chains change in these 2 months? I mean, I am so lost, I have no idea how to properly phrase a question, when it comes to transferring value from a main chain to a sidechain, and then back at some later date. Totally lost.

Can someone shed some light somewhere?



EDIT: In this short video,  https://www.youtube.com/watch?v=g9_MakNlHDA

the narrator says "Since wealth is actually not created on the sidechain" (2:08 of video)

Sounds important, but I can't relate it to the blockchain world I am  (not so) familiar with.
1539613010
Hero Member
*
Offline Offline

Posts: 1539613010

View Profile Personal Message (Offline)

Ignore
1539613010
Reply with quote  #2

1539613010
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1539613010
Hero Member
*
Offline Offline

Posts: 1539613010

View Profile Personal Message (Offline)

Ignore
1539613010
Reply with quote  #2

1539613010
Report to moderator
1539613010
Hero Member
*
Offline Offline

Posts: 1539613010

View Profile Personal Message (Offline)

Ignore
1539613010
Reply with quote  #2

1539613010
Report to moderator
1539613010
Hero Member
*
Offline Offline

Posts: 1539613010

View Profile Personal Message (Offline)

Ignore
1539613010
Reply with quote  #2

1539613010
Report to moderator
haltingprobability
Member
**
Offline Offline

Activity: 98
Merit: 20


View Profile
December 10, 2017, 04:52:15 PM
 #2

Now let's say there's a sidechain to this mainchain, which is trying out some new tech, let's call it thimblejimble. Now this thimblejimble sidechain tokens are valued at : 1 mainchain token = 10 thimblejimble tokens. First question: Does this statement even make sense? Do sidechains have their own traded tokens such that this is what the exchange would be like?

Well, this can easily be done by a centralized approach - buy 1 bitcoin and (provably) use it to back your new "pegged" currency by issuing 10 thimblejimble tokens.

Quote
So, from what I understand, to control 10 tokens in the thimblejimble chain, you would lock up one main chain token. I guess this means you leaving your private keys that control the main chain token behind, and somehow acquiring the private keys to 10 sidechain tokens? And then you transact in the thimblejimble sidechain for awhile with these 10 tokens (because that's what you do in a blockchain - transact (rearrangement of UTXOs and their private keys) - right? or am I not understanding what is going on within a sidechain's blocks?)

It's implementation dependent. One approach would be to allow new "partners" to join your pegged coin by putting their coins into a multisig address that is locked by their own signature plus the signatures of all other current partners who are backing the pegged coin. Suppose Dave wants to join thimblejimble as a backing partner - he plans to invest 1 bitcoin and receive 10 thimblejimbles of his own (the private key for the wallet containing 10 thimblejimbles). However, the coin is currently already backed by partners Alice, Bob and Charlie. So, Dave must lock up his bitcoin in a multisig address with Alice, Bob and Charlie as co-signers - the address is also hashlocked to permit an XCAT (cross-chain atomic transfer) when leaving thimblejimble. Once he has done this, they will sign a transaction on the thimblejimble chain authorizing the creation of 10 new thimblejimbles and assigning them to an address that Dave controls. When Dave later wants to cash out, he's going to need to show Alice, Bob and Charlie that he controls 10 thimblejimbles. They will then prepare a multisig contract that transfers Dave's 1 bitcoin back to him. Once he publishes this multisig transaction, along with the hashlock to unlock it, his thimblejimble address (which contains 10 thimblejimbles) will be unlocked (by the same hashlock) and destroyed on the thimblejimble blockchain.

Quote
Are you able to transfer the 5 sidechain tokens for 0.5 mainchain token?

With determination, I'm sure you could craft a system that allows partial exchange-out.

Quote
What happened to the other 0.5 mainchain token value?

You could prepare a transaction that unlocks all 1 of the mainchain token but then re-locks the 0.5 that is staying with thimblejimble back under a multisig just like the original:

[1.0] {Alice,Bob,Charlie,Dave} -->
-------
[0.5] --> Dave
[0.5] --> {Alice,Bob,Charlie,Dave}

Quote
what if the relative  value of the chains change in these 2 months?

This should be impossible unless the sidechain experiences a major technical problem, resulting in breakdown of the sidechain's network (e.g. a major security flaw). In other words, 10 thimblejimbles should always trade for exactly 1 bitcoin (minus tx fees).

Quote
Can someone shed some light somewhere?

Take a look at this this. It covers some of the history of commodity-backed (or "specie-backed") banknotes. The metaphor is that gold is like Bitcoin, while the paper banknotes are like sidechain notes. Ideally, you issue just one sidechain note for each Bitcoin and don't issue additional coins to try to enrich yourself.
Itty Bitty
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
December 10, 2017, 07:10:38 PM
 #3

Thanks for the detailed post, halting. Most of it is way over my head.

Maybe we can start at the beginning. How is a sidechain "born" (for lack of a better term)?

Is it

(Load Code for Main Chain into your node)  + (Load Code for Side Chain into your node (possibly different rules set than Main Chain)) + add some mechanism to transfer value back and forth between Main Chain and side chain?
haltingprobability
Member
**
Offline Offline

Activity: 98
Merit: 20


View Profile
December 10, 2017, 07:22:19 PM
 #4

Thanks for the detailed post, halting. Most of it is way over my head.

Maybe we can start at the beginning. How is a sidechain "born" (for lack of a better term)?

Is it

(Load Code for Main Chain into your node)  + (Load Code for Side Chain into your node (possibly different rules set than Main Chain)) + add some mechanism to transfer value back and forth between Main Chain and side chain?

Well, you can imagine the sidechain network as simply being an exact copy of the Bitcoin network in its infancy, but running from its own Genesis block (completely separate blockchain from Bitcoin), and probably with fewer nodes and (thus) a lower mining difficulty. Litecoin can be thought of as a Bitcoin sidechain.

To build a sidechain, you'd need to get some small number of initial nodes up and running all at once, and then convince new nodes to join your network. This way, you can process the sidechain's blockchain without interruption.

There's probably not a lot of benefit to running a sidechain unless you're Litecoin or you are using a horizontally scalable blockchain. Horizontal scaling means that more nodes in the network allows the network to handle more transaction throughput, a feature that Bitcoin's blockchain does not have (by design).
Itty Bitty
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
December 10, 2017, 08:29:05 PM
 #5

OK, I am starting to form a picture in my mind.


Let's say someone coded and tested new thimblejimble sidechain software. And let's also say 10 people have agreed to run this s/w at some agreed upon time and become a sidechain network. Leaving aside the Litecoin comment and the horizontal scaling issue, which of the following is the most correct statement for the new thimblejimble sidechain:

a.  Thimblejimble sidechain MUST create its own coins. In addition to these coins, at a later time when the main chain learns of this sidechain, newly appearing coins (backed by mainchain coins pegged to main chain) will join the sidechains self-created coins.

b. Thinblejimble has the OPTION of either creating it's own coins, or not.

c. Thimblejimble will ONLY use coins created from the pegged mainchain coin.



If it's a. or b. it seems to go against what the guy in the video I linked (first post) said, that wealth is not created on the sidechain. But if coins are created, isn't that going to lead to additional wealth?

If it's only c., then the 10 people that joined the sidechain nodes are volunteering their services in the beginning finding blocks, with no chance of reward until later when maybe some transaction fees can be incurred from the coins that joined from the mainchain.


Can you point me in the most straightest direction?
Andre_Goldman
Sr. Member
****
Offline Offline

Activity: 322
Merit: 251

Property1of1OU


View Profile
December 10, 2017, 09:30:33 PM
 #6

and don't do I .... no hang on I guess from I do ... Grin

I am old school; I see PoW as something like McLuhan's "The medium is the message"


Patent1number: ****-****
haltingprobability
Member
**
Offline Offline

Activity: 98
Merit: 20


View Profile
December 11, 2017, 04:16:33 AM
 #7

If it's only c., then the 10 people that joined the sidechain nodes are volunteering their services in the beginning finding blocks, with no chance of reward until later when maybe some transaction fees can be incurred from the coins that joined from the mainchain.

Can you point me in the most straightest direction?

It's c. The founding members of a sidechain would likely be investing some cryptocurrency stake of their own to get the network started. Tx fees would be zero until you get some non-negligible demand for use of the sidechain, so yes, they would be operating at zero revenue until they started to attract users. This is typical of almost any new business, however.
Itty Bitty
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
December 11, 2017, 10:25:35 AM
 #8

If it's only c., then the 10 people that joined the sidechain nodes are volunteering their services in the beginning finding blocks, with no chance of reward until later when maybe some transaction fees can be incurred from the coins that joined from the mainchain.

Can you point me in the most straightest direction?

It's c. The founding members of a sidechain would likely be investing some cryptocurrency stake of their own to get the network started. Tx fees would be zero until you get some non-negligible demand for use of the sidechain, so yes, they would be operating at zero revenue until they started to attract users. This is typical of almost any new business, however.


Thanks very much for all the info. I think you have provided me with enough to get me past my initial mental barrier, that being that the initial sidechain nodes woulds be willing to search for nonces and create blocks, despite no native sidechain token being offered and (initially) no transactions (and of course no transaction fees).

I think I can now go back and re-read some literature and watch videos on the subject with less confusion, and hopefully in better position to understand the subject. But I may be back.....
d5000
Legendary
*
Offline Offline

Activity: 1890
Merit: 1224



View Profile
December 11, 2017, 04:26:39 PM
 #9

A small addition to the answer of your last question:

Some sidechain designs (for example, Paul Sztorc's "drivechain" design) are based on merged mining. That means, roughly, that miners that mine on the original chain can mine on the sidechain without (or with only negligible) additional cost for electricity and hardware. So they wouldn't lose anything if they mine it and they could collect more transaction fees without additional costs - and so no block reward is needed to incentive miners to provide security.

Itty Bitty
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
December 11, 2017, 07:08:54 PM
 #10

A small addition to the answer of your last question:

Some sidechain designs (for example, Paul Sztorc's "drivechain" design) are based on merged mining. That means, roughly, that miners that mine on the original chain can mine on the sidechain without (or with only negligible) additional cost for electricity and hardware. So they wouldn't lose anything if they mine it and they could collect more transaction fees without additional costs - and so no block reward is needed to incentive miners to provide security.


The only mining I've ever done is using MinerGate (CPU/GPU mining) to mine some Monero (mined about 0.2 XMR after 3 months using one CPU). Anyway, on their console you can mine about a dozen tiny useless coins. However, some of these coins are merged mined, so when you're mining one useless coin, you see shares appearing for another useless coin due to the merge mining. So I guess if anyone wants to see merged mining in action you can download that (MinerGate)and play around with it.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!