Author

Topic: [ANN][XCP] Counterparty - Pioneering Peer-to-Peer Finance - Official Thread - page 310. (Read 1276817 times)

hero member
Activity: 700
Merit: 500
2-way pegging means that value may be transferred at a pegged (fixed) rate in either direction.


This special form output is a script which is able to understand an embedded proof-of-spend from another chain, which validates the accounting rules (you need to spend X bitcoins to claim X sidecoins, and vice versa), and which makes sure that claimed coins go to the indicated recipient.



this question related to the red-marked quote:

What happens if I moved a BTC to a side chain to be used with a financial instruments such as options or even betting and GAINED an equivalent value to what I moved out. I now have 2 sidecoins but previously moved only 1BTC. can I go 1-way with one of them?

Yes, because the 1BTC that you gained through trading had to be originally moved into the sidechain as well, and it can be redeemed in the same way.

Where did this gain, this additional sidecoin, come from?

Who knows?  Trading?  Betting?  SatoshiSidecoinDice?  Either way, that coin didn't come from nowhere.  It came from someone who moved it into the sidechain from the mainchain.

So is it the case that at any time, anyone can move any amount of BTC that they control into any sidechain?
EDIT: What I am getting at is whether there are limits to the number of units on a particular sidechain. One does not need to find a "seller" or "redeemer" of sidecoins to make a BTC-sidecoin trade, since the sidecoin is not truly a separate unit of currency, so one is not really trading into it, correct?

(Thank you all for your patience and generosity in responding to my questions. I assume others trying to learn, too. I'm trying to piece things together from here and the two reddit threads.)
This is the critical question I'm still confused about. If 1 sidechain BTC always = 1 mainnet BTC, then how will sidechains be useful for assets? They'll be fine for things like fast BTC transactions etc.
Example: my sidechain asset (gold or whatever) that I paid for with 1 sidechainBTC is now worth 2 sidechainBTC. Do I redeem it for 2 sidechainBTC, then re-peg back to mainnet BTC?

Yes.

My understanding of at least part of the proposal is that the side-chain will allow Bitcoin devs to introduce new/experimental features, such as Counterparty-like features, without disturbing the mainnet or requiring multiple hard-forks/upgrades of Bitcoin.  Over time, once the new/experimental sidechains become fully vetted, it may happen that the sidechain becomes the mainchain.  In this way, a "Bitcoin 2.0" could be introduced gradually.

The asset-issuance questions apply equally to Counterparty, Mastercoin, Colored Coins, etc.  A certain amount of sidechain-BTC will be required in order to create an asset.  This asset may be traded for BTC just as Counterparty-assets (which, remember, are traded using BTC as the carrier, so they are actually BTC-assets in some way) may be traded for Counterparty-as-currency or BTC-as-currency.

You will never need to "re-peg".  The peg simply is.  It's built into both the sidechain-BTC and mainnet-BTC.  If you have 1 sidechain BTC, it will always be redeemable for 1 mainnet BTC directly through the transfer process.  If you have 1 mainnet BTC, it will always be redeemable for 1 sidechain BTC in the same way.  This is simply how the system will be built, and it cannot be changed.  If somebody did try to change it, their transaction would not be recognized by the honest nodes in the Bitcoin system. 

Perhaps the word "peg" is wrong, but I don't know a better word that communicates the idea.  Simply "equivalent"?  It is not a "peg" like with fiat currencies where one currency is manipulated to always match another.  It is the same currency.  It is like if you have 1 USD as a dollar bill, and you deposit it into your bank account.  Then you no longer have a dollar bill, but you have 1 USD in your bank account.  This can be changed back into a dollar bill by going to your bank and withdrawing it.  You can trade back and forth infinitely PaperUSD <==> BankUSD, and the bank is never going to try to give you more or less than 1 BankUSD for 1 PaperUSD.
full member
Activity: 238
Merit: 100
Counterparty mentioned in this paper.
(It is further down you would have to search for 'counterparty' to view it).
http://www.ofnumbers.com/wp-content/uploads/2014/04/Bitcoins-Public-Goods-hurdles.pdf
newbie
Activity: 13
Merit: 0
2-way pegging means that value may be transferred at a pegged (fixed) rate in either direction.


This special form output is a script which is able to understand an embedded proof-of-spend from another chain, which validates the accounting rules (you need to spend X bitcoins to claim X sidecoins, and vice versa), and which makes sure that claimed coins go to the indicated recipient.



this question related to the red-marked quote:

What happens if I moved a BTC to a side chain to be used with a financial instruments such as options or even betting and GAINED an equivalent value to what I moved out. I now have 2 sidecoins but previously moved only 1BTC. can I go 1-way with one of them?

Yes, because the 1BTC that you gained through trading had to be originally moved into the sidechain as well, and it can be redeemed in the same way.

Where did this gain, this additional sidecoin, come from?

Who knows?  Trading?  Betting?  SatoshiSidecoinDice?  Either way, that coin didn't come from nowhere.  It came from someone who moved it into the sidechain from the mainchain.

So is it the case that at any time, anyone can move any amount of BTC that they control into any sidechain?
EDIT: What I am getting at is whether there are limits to the number of units on a particular sidechain. One does not need to find a "seller" or "redeemer" of sidecoins to make a BTC-sidecoin trade, since the sidecoin is not truly a separate unit of currency, so one is not really trading into it, correct?

(Thank you all for your patience and generosity in responding to my questions. I assume others trying to learn, too. I'm trying to piece things together from here and the two reddit threads.)
This is the critical question I'm still confused about. If 1 sidechain BTC always = 1 mainnet BTC, then how will sidechains be useful for assets? They'll be fine for things like fast BTC transactions etc.
Example: my sidechain asset (gold or whatever) that I paid for with 1 sidechainBTC is now worth 2 sidechainBTC. Do I redeem it for 2 sidechainBTC, then re-peg back to mainnet BTC?
full member
Activity: 210
Merit: 100
@freedomfighter,

This is getting into implementation details, so pay close attention to the parts which seem contradictory. Conceptually anyone who wants sidecoins and has bitcoins or vice versa can simply move value from one chain to the other, in essence destroying bitcoins and printing sidecoins albeit in a reversible process. However, this takes a considerable amount of time to clear -- about 3 days -- and blockchain space which requires fees. So in practice we fully expect that someone wanting to trade bitcoins for sidecoins will use a distributed marketplace and atomic cross-chain swaps in order to buy one coin with another, by finding a buyer at the other side. Use of the pegging mechanism will be limited to market makers who arbitrage when the price starts to deviate from the peg. Make sense?

Got it. thanks.

As far as this project coming via a "for profit" company, vs. a project like CP (the most BTC-like in spirit that I have seen since.... well..... BTC itself) which is fully decentralized A-Z. what is their business model here? unlike the cp initiators and investors that would like to earn in XCP, the sidechains fellows are shareholders. of what? what is the model and how can it NOT affect the decentralized nature of such a venture? (I read and appreciated your personal commitment to this attribute and independence).

 
 
legendary
Activity: 905
Merit: 1012
@freedomfighter,

This is getting into implementation details, so pay close attention to the parts which seem contradictory. Conceptually anyone who wants sidecoins and has bitcoins or vice versa can simply move value from one chain to the other, in essence destroying bitcoins and printing sidecoins albeit in a reversible process. However, this takes a considerable amount of time to clear -- about 3 days -- and blockchain space which requires fees. So in practice we fully expect that someone wanting to trade bitcoins for sidecoins will use a distributed marketplace and atomic cross-chain swaps in order to buy one coin with another, by finding a buyer at the other side. Use of the pegging mechanism will be limited to market makers who arbitrage when the price starts to deviate from the peg. Make sense?
full member
Activity: 210
Merit: 100
why would they swap? they cant risk a loss

Atomic cross-chain swap has zero risk attached. Zero. It is 100% trustless.

The pegging mechanism merely provides a mechanism for market makers to adjust supply of sidecoins based on demand.

I must be missing something here.

In a previous post you wrote that :"we should expect a peg transaction to take at least 2-3 days to fully clear,[/font] depending on the final choice of parameters".

My previous post was based on this.

To me this means that if I am a vendor selling or buying a real asset for a sidecoin- or a future DAC performing a contractual obligation, that even if a commitment was made- that no transaction will be executed before the 2-3 days full clearance. if not than what is the significance of the 2-3 days? let it be something to disregard in the background. but in real world of contracts and assets this cant be disregarded.

1) am I missing the point here?

2) the same with converting sidecoins back to btc because I want fiat. can i sell my btc after swapping even without the 2-3 days full clearance period?

 
legendary
Activity: 905
Merit: 1012
No, it'd be a soft-fork change to bitcoin.
sr. member
Activity: 437
Merit: 260
balance
why would they swap? they cant risk a loss

Atomic cross-chain swap has zero risk attached. Zero. It is 100% trustless.

The pegging mechanism merely provides a mechanism for market makers to adjust supply of sidecoins based on demand.
It is true that a two-way peg from Bitcoin to a side-chain would necessarily involve hard forking Bitcoin, right? You'd have to somehow signal to the Bitcoin blockchain that the "Bitcoin" represented by the side-chain is returning to the original Bitcoin blockchain.

Is there some OPCODE that can be used on mainnet right now that facilitates two way pegging between Bitcoin and a side-chain?
legendary
Activity: 905
Merit: 1012
why would they swap? they cant risk a loss

Atomic cross-chain swap has zero risk attached. Zero. It is 100% trustless.

The pegging mechanism merely provides a mechanism for market makers to adjust supply of sidecoins based on demand.
full member
Activity: 210
Merit: 100
Why will it take 3 days to clear?

First, a significant amount of work needs to be built on the “burn” transaction before it is used to claim the coins on the other chain, for the simple reason of avoiding DoS attacks. Then there is a length of time called the quieting period during which the return transaction and associated proofs are published, but not finalized, and anyone else can step forward with a reorg proof and rollback the transaction. Finally, there is a period of time afterwards analogous to the coinbase maturity where the coins are not spendable because a reorg could undo the peg transaction.

So that's three different waiting periods, each of which would probably be in the range of 100 - 144 blocks, if not more. The exact parameters are not set in stone at this moment, but with that in mind we should expect a peg transaction to take at least 2-3 days to fully clear, depending on the final choice of parameters.

I dont see how this makes any sense.

lets be practical:

Lets say that I bought an ounce of gold for $1000 worth of sidecoin from bitcoin tangible assets on a sidechain.

I paid 2btc for example in both cases. Now suddenly gold went up to $1250 and I'd like to get my 2.5 sidecoins by selling it back to BTA.

I call on BTA and they now need to get some sidecoins to buy from me, since they didnt want to hold any unnecessary sidecoins on a sidechain. so they need to take 3 days to get sidecoins (why would they swap? they cant risk a loss).

I will then need 3 more days to convert back to the main BTC blockchain.

How is this better than conducting my same business via the CP or MSC protocol within minutes and without being more exposed in a sidechain?

even if you tell me that BTA will always keep sidecoins, the same is not always true with other assets that may require a willing buyer to PM me that they are interested and then we will both have to wait 3 days for them to buy and have sidecoins available etc.

If I wanted to turn sidecoins to fiat for some reasons- I now added a 3 day exposure to BTC-fiat volatility that I am not interested in while waiting for the transaction to take place. 
legendary
Activity: 905
Merit: 1012
Why will it take 3 days to clear?

First, a significant amount of work needs to be built on the “burn” transaction before it is used to claim the coins on the other chain, for the simple reason of avoiding DoS attacks. Then there is a length of time called the quieting period during which the return transaction and associated proofs are published, but not finalized, and anyone else can step forward with a reorg proof and rollback the transaction. Finally, there is a period of time afterwards analogous to the coinbase maturity where the coins are not spendable because a reorg could undo the peg transaction.

So that's three different waiting periods, each of which would probably be in the range of 100 - 144 blocks, if not more. The exact parameters are not set in stone at this moment, but with that in mind we should expect a peg transaction to take at least 2-3 days to fully clear, depending on the final choice of parameters.
legendary
Activity: 1106
Merit: 1026
we would be interested to know if anyone has had issues running bitcoind on Linux (Ubuntu) server with 1GB of RAM (especially with 0.9.0+). The VPSes will be dedicated to running bitcoind, essentially.

The MSC faucet runs on a 1 GB RAM Ubuntu 12.04.4 x64 node with bitcoind 0.9 without problems and 60+ connections for a few months now. 512 MB were too little and resulted in random crashes.
legendary
Activity: 1512
Merit: 1004
I tried to transfer xcp from blockchain address to counterwallet. I take private key from the blockchain BTC wallet under the option " Export unencrypted and and Bitcoin-Qt format". When I imported the private key to counterwallet, it shows "Not a valid private key". Anyone know how to solve this problem? Many thanks.
anybody help me?
Importing uncompressed keys is high on our todo list.

It should have been the very first feature.
I don't see the use of this wallet if I cannot import the priv key from blockchain.info and I think everyone would agree.


It can import some private keys from Blockchain.info. The lack of support for uncompressed keys was an oversight which we will rectify as soon as possible.
hope you can handle this ASAP.
sr. member
Activity: 386
Merit: 250
So is it the case that at any time, anyone can move any amount of BTC that they control into any sidechain?

Yes, and in doing so they give up access to those bitcoins. So the amount of total bitcoin-equivalent coins under control by users is conserved.

EDIT: What I am getting at is whether there are limits to the number of units on a particular sidechain.

Well there obviously can't be more than 21 million * peg price sidecoins. Other than that, the number of sidecoins in existence is simply determined by current demand. It helps to think of sidecoins and bitcoins being the same thing, as distinctions between the two are mostly implementation details. At any given time there are max 21 million bitcoins in existence, some of them on the main bitcoin chain, some of them on specific side chains.

One does not need to find a "seller" or "redeemer" of sidecoins to make a BTC-sidecoin trade, since the sidecoin is not truly a separate unit of currency, so one is not really trading into it, correct?

This is getting into implementation details, so pay close attention to the parts which seem contradictory. Conceptually anyone who wants sidecoins and has bitcoins or vice versa can simply move value from one chain to the other, in essence destroying bitcoins and printing sidecoins albeit in a reversible process. However, this takes a considerable amount of time to clear -- about 3 days -- and blockchain space which requires fees. So in practice we fully expect that someone wanting to trade bitcoins for sidecoins will use a distributed marketplace and atomic cross-chain swaps in order to buy one coin with another, by finding a buyer at the other side. Use of the pegging mechanism will be limited to market makers who arbitrage when the price starts to deviate from the peg. Make sense?

Yes, that makes sense.

Why will it take 3 days to clear?

It will be interesting to see (if this is actually implemented) how the distributed marketplaces will act. They will reserve certain amounts of particular sidechains, so how will they know how much? Will their fees for transacting bitcoins for sidecoins and back depend upon the scarcity of the sidecoins they have allotted/reserved? Will such fees be flexible according to the demands for particular sidecoins? We will see, perhaps.

I initially was confused because people were talking about running altcoins as sidechains, and I thought that meant that the same unit limits would be enforced. Now I see that sidechains are simply ways of running your bitcoins as/through specialized protocols that are not available through the primary bitcoin blockchain.

Thank you for your detailed responses.

And I apologize to the Counterparty regulars. It appears we've used this thread to talk about something that is not specifically about internal Counterparty issues, though it might bear on Counterparty.
sr. member
Activity: 364
Merit: 264
Haven't posted here in a while. Real life takes its toll. Lots seem to be going on after the mainnet launch.

Since everything appears to be fine, I'll step out again.
member
Activity: 111
Merit: 10
Digitizing Valuable Hard Assets with Crypto
I have created a new asset on the system:  Charity Coin
See http://charitycoin.co.uk

The primary purpose of this coin is to encourage charitable donations and I think this could add value to Counterparty

The basic principals are:
1. £1 verified donation to any registered charity = 1 Charity Coin
2. This is the only method of coin creation
3. There will be a maximum of 100 million coins

The basic idea is to verify all donations via the comments on JustGiving and then publish the links to all the comments so all the users can know that coins are only created after genuine donations.  The coins are then manually allocated to donors.

Please let me know what you guys think and how this could improve.  It is only in the early stages so there may be many weaknesses in the system.  Please contact me at [email protected] if you have any suggestions on how to improve it or if you would like to help.

Please also feel free to test the concept out and make a small donation to a charity of your choice.


Welcome!

Great to see more AssetBacked issuances launching on Counterparty.

Cheers!
BTT
full member
Activity: 224
Merit: 100
CabTrader v2 | crypto-folio.com
Database 9 is now 26 MB  Shocked
legendary
Activity: 905
Merit: 1012
So is it the case that at any time, anyone can move any amount of BTC that they control into any sidechain?

Yes, and in doing so they give up access to those bitcoins. So the amount of total bitcoin-equivalent coins under control by users is conserved.

EDIT: What I am getting at is whether there are limits to the number of units on a particular sidechain.

Well there obviously can't be more than 21 million * peg price sidecoins. Other than that, the number of sidecoins in existence is simply determined by current demand. It helps to think of sidecoins and bitcoins being the same thing, as distinctions between the two are mostly implementation details. At any given time there are max 21 million bitcoins in existence, some of them on the main bitcoin chain, some of them on specific side chains.

One does not need to find a "seller" or "redeemer" of sidecoins to make a BTC-sidecoin trade, since the sidecoin is not truly a separate unit of currency, so one is not really trading into it, correct?

This is getting into implementation details, so pay close attention to the parts which seem contradictory. Conceptually anyone who wants sidecoins and has bitcoins or vice versa can simply move value from one chain to the other, in essence destroying bitcoins and printing sidecoins albeit in a reversible process. However, this takes a considerable amount of time to clear -- about 3 days -- and blockchain space which requires fees. So in practice we fully expect that someone wanting to trade bitcoins for sidecoins will use a distributed marketplace and atomic cross-chain swaps in order to buy one coin with another, by finding a buyer at the other side. Use of the pegging mechanism will be limited to market makers who arbitrage when the price starts to deviate from the peg. Make sense?
member
Activity: 111
Merit: 10
Digitizing Valuable Hard Assets with Crypto
We are also in the process of developing the required hardware specs as well. The RAM per node will be between 1GB and 2GB. While we are staging hardware requirements experiments internally, we would be interested to know if anyone has had issues running bitcoind on Linux (Ubuntu) server with 1GB of RAM (especially with 0.9.0+). The VPSes will be dedicated to running bitcoind, essentially.

I cannot say who our current VPS provider is, but we've had VPS shutdowns when running nodes with 1GB of RAM on a large VPS provider. These nodes shutoff unexpectedly and we think there are rule-based trips we've crossed with the VPS provider.

As such, we've upgrade all our nodes to a minimum of 2GB RAM and 40 connections for each node and we seem to be doing okay.
newbie
Activity: 9
Merit: 0
I have created a new asset on the system:  Charity Coin
See http://charitycoin.co.uk

The primary purpose of this coin is to encourage charitable donations and I think this could add value to Counterparty

The basic principals are:
1. £1 verified donation to any registered charity = 1 Charity Coin
2. This is the only method of coin creation
3. There will be a maximum of 100 million coins

The basic idea is to verify all donations via the comments on JustGiving and then publish the links to all the comments so all the users can know that coins are only created after genuine donations.  The coins are then manually allocated to donors.

Please let me know what you guys think and how this could improve.  It is only in the early stages so there may be many weaknesses in the system.  Please contact me at [email protected] if you have any suggestions on how to improve it or if you would like to help.

Please also feel free to test the concept out and make a small donation to a charity of your choice.
Jump to: