Counterparty Basic questions

  1. the notion of security is not the same as immutability.
  2. XCP role as a locked or pegged value for fuel

On 1) while I agree that XCP does have immutable transactions due to the nature of it being actual bitcoin transactions on blockchain, the other half of blockchain security comes from the fact that blocks are validated via the same set of rules. Block size limit is one for example. The block reward rate is another
XCP seems to have no systematic way of enforcing XCP internal rules.

Namely,
I have to trust the stakeholders not to issue more at a later date, or secretly do so without publicly announcing it.
I have to trust the block explorer written by developers to show me all the XCP issued.
I have to trust the formula for calculating the gas rate charged to contracts will remain unchanged.

In truth none of these guarantees are made in blockchain code. Only on the XCP layer which can changed without the consensus of the blockchain miners

Now I realize if the XCP usage rate is changed in the source code, people running the servers have the option not to upgrade (akin to miners not agreeing to upgrade on blockchain) but what is to stop a malicious CP host to not upgrade yet still accept contracts to execute (on an incorrect code version). What indeed is the incentive for CP servers to execute contracts at all?

On 2) seems to me like all this work to lock and isolate the value of the gas could have been better achieved by using a pegged token to USD
Like a tether.to

Because while I will agree XCP price is less volatile than BTC. That is only because the stakeholders are incentivized to stabilize prices by acting as central bank to sell into buying sprees. Etc. though in truth we’d like to see the price isolated and stable, in reality it rises independent of the actual burning of the gas and thus the net amount in USD it costs me to use a smart contract on XCP is fluctuating.
It may cost me only a penny to do a contract today. But there really is no guarantee of this
Once again I have to trust that the price won’t move away from me too much.
The only reason I can see why this was done was that in truth the original stakeholders (devs) secretly want a slow controlled price appreciation so that they can be paid for their work on the project by selling stake in the gas.
Or the fact that USD.to didn’t exist back when XCP was designed
But I do appreciate that XCP guys want to do the right thing which is to keep the price stable. So telling people not to buy XCP unless you need it (and hoping the actual burn rate of XCP by contract burn more or less follows in step) is admirable.
That’s it. Thanks for tuning in :slight_smile:

Sorry for the format, this was cut and pasted from a chat forum.

[quote=“digitsu, post:1, topic:1269”]
the other half of blockchain security comes from the fact that blocks are validated via the same set of rules. [/quote]
Blocks are validated by Counterparty federation servers in a very similar way to how they’re validated by miners. I actually have been toying with the consensus stuff a good bit lately, and you can see one of my non-conforming transactions here. Notice that blockscan shows this transaction as being invalid. You (yourself) could choose to accept this transaction I suppose, but good luck convincing the network to accept it. Bitcoin is very similar this way, you could certainly market to the world a bitcoind server that accepts 22 million bitcoins instead of 21 million. Maybe you would have a compelling argument to do so - but I can’t imagine what that argument is. Whatever that argument is - it applies equally to Counterparty’s servers.

A lot of this gets to the question of what a blockchain is, and what bitcoin’s intrinsic value is. At counterparty, we believe the value of a blockchain is immutability. And the instrinsic value of a bitcoin, is real estate on the immutable ledger. There is no mechanism in Counterparty, or Bitcoin, for ensuring that recever accepts a message in exchange for a good or service. That functionality is outside the purview of a blockchain.

This is all correct. It is also true of BTC. There is no difference. If this is the weakness that you’ve identified, crypto-currency is not for you. What we believe as Bitcoiners, is that changing any of these values would destroy the network. Thus, the incentive to do so is nil.

In truth none of these guarantees are made in blockchain code. Only on the XCP layer which can changed without the consensus of the blockchain miners

So there’s a couple of jumbled concepts here. As far as the ‘update’ is concerned, there is no need for a manual update. The money supply calculation is performed by each counterparty node on every block. They all know what the expected values are based on a deterministic calculation. (It’s very analogous to how difficulty is calculated every 2016 bitcoin blocks) So, any malformed contract would suffer the same fate as my malformed send. Those contracts would be out of consensus with the network, and their operations would not be performed outside the malicious server, and the execution results of that contract would not be spendable outside the malicious server. (thus rendering the attempt fruitless).

The incentive for the servers to execute the code is that if they’re not in consensus, they are orphaned, and are no longer able to participate in the network due to their inconsistent consensus state. It is very analogous to an orphaned chain. They are now an island, unable to transfer value and participate in the network.

I’m not sure I understand. Are you suggesting a bank of counterparty would hold USDs, and then sell gas at a fixed price? 1. Centralizing this service would now carry the risk of that agent defaulting, being regulated, and/or censored. 2. The gas is a limited resource. If you did not let a market match the supply to demand, the network would be spammed to oblivion. These are also reasons why Bitcoin isn’t pegged to a USD.

That may not be true. It is decoupled though from much of the valuation factors that affect BTC, which makes valuation much easier and a bit more reliable for the devs.

I don’t think so. I think most of the stakeholders are hodlrs who aren’t looking to sell anytime soon. ATM The volume is so low that nearly all the speculative value is gone from XCP. I wouldn’t be inclined to sell because the price was rising too fast, it’s no sweat off my back if the price goes up too high.

Absent opportunity cost, we would certainly like the price isolated. But If the throughput of the network/economy is limited, then no we would want the price to raise so that the network is only available to those willing to pay for it. That’s how IRL gasoline works. As whether the nature of the non-intrinsic value of gasoline (both IRL and XCP) is a feature or a bug - I would suggest that’s a feature. If the market has information about the future utility of gasoline, I would imagine that should be baked into the price. That should add depth and stability to that market, over the alternative.

Regardless of whether you think this is a bug or a feature, it will always be the case in decentralized systems. Keep in mind that if you don’t need immutability, a simple perl script will do the job for free.

Kind of. And it’s not very secret. Everyone in the community openly wants the price to appreciate. But, the devs have no inordinate reward here. BTC was burned to make XCP. Just like dollars were burned to create BTC. So again, this is equally true for both counterparty and bitcoin. There is no difference here.

I think there are two separate issues here:

  1. Why stay in consensus?
  2. Why run a node that doesn’t collect fees?

The situation for Counterparty is the same as for Bitcoin. If you run a node, you’ll run the code you believe the majority of other nodes are running. Else you’ll run a one-man party. Today I can think of four major players running CP nodes; CP Foundation, Blockscan, CoinDaddy, Vennd. I’m sure several developers / hobbyists are also running their own nodes.

The number of CP nodes is certainly a lot smaller than BTC nodes. The advantage is that anyone can suggest a sensible change to CP and likely get everyone to update. Therefore the rules are not written in stone - not yet. BTC has grown so big that even the slightest protocol change is a big drama (e.g. the max blocksize limit). The same is likely to happen to CP in a few years.

Why run a node that doesn’t collect fees? BTC nodes don’t either. It’s only mining that’s rewarded - not running a node. I guess reasons for running a node are; no need to rely on 3rd party APIs, earning goodwill, security.

I agree on that synopsis of the intrinsic value of a bitcoin. What I’m wondering though is how your federated servers are incentivized to stay in consensus if they, unlike bitcoin miners are not collecting fees for their contract processing power. (or do they? the FAQ did not mention this)

I see. So what you are saying is that if I as a bad server processed a contract, the record of how many XCP I consumed is open for all to audit.?

Okay, so assuming that despite this, I publish the completed CP transaction on the blockchain, how do my counterparts to the contract ensure that the contract was valid, unless there was some sort of record in CP itself which would track only the valid transactions which reached consensus? If either my counterpart was remiss and only connected to the one or few malicious CP servers to query for contract completion, then they would be fooled correct? Or does all the federated servers need to vote on every CP transaction and confirm that it is ‘good’ before it is published to the actual block chain thus ensuring only good transactions make it there? If so, what is to stop a bad CP server from publishing to the block chain?

How is consensus formed? If CP servers are only relying on bitcoin miners to extend the blockchain with the valid CP transactions (contract payouts, presumably in BTC) how do bitcoin nodes determine the validity of CP transactions over the bad ones (this sort of overlaps with the previous point, one answer would probably suffice to answer both)

No, actually I was more thinking that if isolation of the cost of contract execution is what you want, and you want to actually profit from this model, then it would be better to use a digital asset that was pegged to a real world value that people will reckon in. Tether, bitshareUSD, or even just a bespoke pre-mined coin that you could sell on a limited basis. The reason why most people crowdsale a pre-mined coin is due to funding requirements at that stage in their project. This of course cannot apply to you since CP dev are happy to defer their profits from this project to the far future when finally the appreciation of the coin can be monetized. If this were truly the case, and nobody needs to be paid now, why not just open your doors and sell XCP like a regular gas station sells petrol or a venue owner sells tickets? Then the price of contract execution will truly be based only on the demand for its use.

I’m not sure I agree here, dollars are not burned in creating BTC anymore than capital is burned in mining gold. It is redistributed, circulated, but it does not just cease to exist. The only time something is burned is say in the burning of fossil fuels in order to run a factory that makes widgets. When a gas or a fuel is burned its utility is used up for 1 purpose. In comparison, when money is used to pay for a service, its utility is just passed onto the person that you paid for the service. (your lawyer, takes your fees, and then uses the same money to buy a Yacht.)

I would expect if I’m running a node that is executing contracts, then I would expect a cut of the fees. I’m playing the part of a lawyer and wearing a lot of potential legal risk.

These questions are great, keep them coming I’ll almost certainly use some of them for my channel.

So, consensus of counterparty is actually maintained by the bitcoin miners. All counterparty transactions, regardless of their counterparty validity, are ordered and persisted in the Bitcoin blockchain. The federated servers aren’t even necessary for censensus. What the federated servers do, is process an index of what’s in the blockchain that can be queried efficiently by developers. That index does things like compute what a contract output is, and who received those funds. Once this data is indexed, a developer can then query the federated server for balance information, and use that server to construct a transaction of its own. What’s interesting here is that the counterparty servers don’t ever even relay transactions. The developer queries the federation server for network state, and then broadcasts its transaction thereafter. If it’s a legit broadcast, the other servers will update their indexes commensurately.

If all the federation servers went down tommorrow, nothing terrible would happen. The next time a dev needed to construct a counterparty message, they would turn on a federation server of their own, and rebuild the indexed state of the network on that server. Typically, the only reason to run a federation server, is because you’re a dev, or because you’re someone like coindaddy.com which offers services to the community.

Correct, the other federation servers would see that as invalid, and their indexes would not be updated.

The Counterparty federation servers maintain local sqlite database which contain the computed state of the counterparty network. If you published something that didn’t add up (such as declaring a spend of XUSD in excess of your balance) none of these federation servers would update their indexes to reflect your declaration.

The counterparty servers never communicate to each other. They merely query bitcoind, and parse the blocks that come in. There is no trust needed between servers for the simple reason that they don’t talk to each other. I publish bad messages semi-regularly these days as part of my auditing efforts. They appear on the bitcoin blockchain everytime. But thus far, I have yet to pass a bad message that was indexed by my local federation server. :slight_smile:

The bitcoin miners merely order messages, and provide immutability. The federation servers validate the transaction, and update their local index. At the time that a (bad) message comes in , the federation server determines for its local developer whether that message is valid or not. If its valid, the ‘state’ of cp is then computed to reflect the contents of this message. If it’s invalid, the message is merely ignored.

Counterparty is an open source project, and not a company. Just like bitcoin. And Linux. And apache. Etc.

Vennd was doing this for a while. Certainly shapeshifter does this. You are welcome to do this as well.

I’m quite certain electricity is being burned by BTC. How you wish to express that value is up to you. Similarly, Gold extraction is very costly, and well calibrated to match (nearly) the market price of Gold. Though the process of extraction isn’t exactly as analogous to the value-burn that is Bitcoin mining, certainly a substantial amount of value is converted to unusable entropy in the Gold-mining process. (And too, not all of the costs in the Bitcoin mining process is rendered to thermodynamic waste - servers, employees, bandwidth, etc)

How much fossil fuel is burned during gold extraction? A lot?

Surely this is because you have not maliciously modified your server.
I’m talking about a case where I duff my server to lie. I tell my counterpart to use only my duff server to settle our contract. My compromised server hosts our contract, and then our contract running bad code say doesn’t burn XCP and can monkey business be done so long as I keep my users from learning the ‘true’ state of the counterparty consensus true ledger

Okay, I suppose then all the devs work on altruism alone, which is commendable. Though I will not support buying any product which required me to destroy money in the process. (note: not the same as destroying a commodity). In fact I think US law makes it illegal to burn money along the same principles. That law was founded not on patriotism, but on sound economics.

That being said, burning once and never again is at least better than a continual deflationary pressure on the economy.

I hear this argument a lot from people, which of course is a very idealist way of looking at it. Of course all work comes from energy, and all work and human endeavour and action requires at the most primal level, energy. But this is akin to saying that all work on Earth is in fact being done by the Sun, and while true, is not useful for anything more than philosophical discussions.

Firstly, as the production of a good or commodity requires energy and time, and always involves wasted energy in the process, using a finished good as a fuel to produce another good is always more wasteful than producing that second good directly with energy if possible. In this case, using a very expensive to produce BTC to create an XCP which could have much more cheaply been created (perhaps with no energy at all if you went the way of an issued token) was wasteful when it need not have been.

Secondly and more importantly, the waste suffered by burning a BTC isn’t so much so from the destruction of its intrinsic value, but the terrific loss of its value as money. If you sank a container ship full of gold to the bottom of the ocean just to magically produce some new commodity ‘gas’, the world is not going to be lamenting so much over all the gold bracelets that we will have to live without, but at the loss of money value and production value that was removed from the economy. You have literally taken productive capacity out of the system. This value can normally be replaced simply in a fiat money system, but not in a commodity money system like bitcoin.

If that law was founded on sound economics, it wouldn’t have been necessary.
Generally people do not behave uneconomically (while some may indeed behave uneconomically, some also violate the “law”, and it’s hard to imagine that the “law” somehow prevents already irrational individuals from destroying US banknotes).

I don’t have time to research on the question, but it sounds like a legacy thing from the time when the dollar was made of silver and when the face value was lower than the value of its silver content (i.e. it would make sense to melt coins for their silver content).