first time posting here. I have a question regarding how the Counterparty smart contracts platform would work:
Specifically related to this:
The economics of the fee system for Counterparty Contracts will necessarily be rather different from those of Ethereum, simply because there are no Counterparty miners. All Counterparty nodes will execute all contracts, and it will be the holders of XCP that receive the fees for the execution. The simplest and most robust way to make this payment will be just to destroy the fees, and to thereby reduce the money supply, as this is equivalent to paying the fee out to all holders of XCP in proportion to the size of their holdings. Unlike with Ethereum, the fees will not be constant values, but rather fractions of the total extant supply of XCP, so that no amount of computation will deplete the supply of XCP and drive it into negative territory: the divisibility of XCP ensures that there will always be enough XCP.
If the fees for contract execution are burnt, what is my incentive for running a Counterparty node? It seems that creates a free rider problem, where benefits accrue in proportion to one’s ownership percentage of XCP regardless of whether one operates a node or not. That would seem to be a terrible design, but maybe I’m missing something here.
Can someone explain to me how this?
As far as I understand it, Counterparty has no mining and doesn’t have its own blockchain. There is no incentive required. Even if only 2 people are using it, it will continue to work. All Counterparty nodes will execute all contracts, but if you want a contract between 2 people you do not need more than 2 people on the network.
Your incentive for running a Counterparty node is broadly in contributing to check the consensus of the system and more narrowly to build your own services that interact with the platform.
I agree that XCP as gas doesn’t reward those who run nodes but it still functions as a) an anti-spam measure and b) an incentive to hold XCP which helps provide liquidity for the escrow-dependent features of the protocol.
Bitcoin provides consensus on a stream of transactions and Counterparty provides a sieve to process and build state based on that stream.
I’m curious how the system will decide who gets to process such transaction since there seems to be no incentive to do it faster than anyone else.
On the other hand, it doesn’t have to be fast since you don’t get paid for it anyway and because the work(load) will be light. Incidentally this week I just re-installed my Raspberian system because I decided to buy external HDD and run Counterparty on it. Few months back I wrote a how-to here, if anyone’s interested: https://wiki.counterparty.io/w/Counterparty_on_Debian
I haven’t tried to install counterpartyd 9.45.0 on the new system, but when I do I’ll update the page.
It would be necessary for consensus for every counterpartyd node to do every calculation in these scripts. Pricing the XCP gas fee will be interesting to see in action because it’s basically an anti-spam measure on your processor, io, and storage.
I'm also interested in how the fee will be implemented. Here's how I envision it (although I wouldn't be surprised if the devs have figured out something more elegant :) ):
I guess there needs to be some sort of market pricing. There may be a hard-coded maximum limit of calculations per block. When you submit a smart contract, you'll also need to specify the maximum Gas/XCP you're willing to pay per calculation. If total number calculations for all submitted contracts is greater then the maximum, then only those willing to pay the most will be executed.
A lower price may/should also be hard-coded. Actually, it would not be that different from Bitcoin tx fees. Now you only need to pay only a symbolic 0.01 mBTC fee, but if the upper limit of transactions is reached, then only the txs with the highest fees will be included in the block.
@weex I would think those scripts should be very easy to process (and that’s why I’m now resurrecting my Pi.
: If you look at the quoted text from the original article, it says “all counterparty nodes will execute all contracts”. That makes sense to me because I think contracts would be trivial to execute. I wouldn’t bet on that, but currently that’s what I would expect.