Live data from Hacker News

Stellar Smart Contracts

stellar.org

101–110 of 130 posts

Re: Stellar Smart Contracts

#101
post #94
post #33

Earlier quoted context omitted.

> funds exist and are locked before we meet What does locking funds entail?

In the hypothetical dishwasher example, what is the buyer's incentive to lock up funds before even physically inspecting the item? What is my recourse if a spiteful seller refuses to agree to releasing my funds if I decide not to go through with the purchase? I'm not being facetious. I'm trying to understand why one would need to use an escrow service for something like this.

Buyer and seller enter a smart contract where the buyer's funds are locked for two days, then freely recoverable by the buyer only after the contract expires. That proves to the seller that the funds exist at no risk to the buyer.

A day before the contract expires, buyer and seller meet up to inspect the goods. Upon inspection, seller hands over the goods and buyer validates the release order in front of him before departing, thus completing the contract before its expiration.

Infinitesimal cost, infinitesimal risk.

Re: Stellar Smart Contracts

#102

Earlier quoted context omitted.

There are plenty of consensus protocols that don't waste energy but I think it's important to understand why PoW relies on an unproductive algorithm. Mining fulfils two roles: - identity management: To identify who is a trustworthy block producer in an anonymous and trustless network, mining introduces a cost to the block generation process and we use a game theory assumption that it serves as a barrier for attackers…

> There are plenty of consensus protocols that don't waste energy but I think it's important to understand why PoW relies on an unproductive algorithm. DPoS consensus used by Bitshares/STEEM & EOS seems to the most advanced among the models and they also have the highest TPS

All consensus protocols make tradeoffs between three properties:

- Finality Latency: how fast is a block finalised after it’s been proposed

- Decentralisation: how many consensus-forming nodes can exist in the network

- Resource Overhead: how many blocks per second do consensus-forming nodes need to verify

dPoS protocols sacrifice decentralisation and compromise in resource overhead for apparent performance, ie many transactions processed by a few very powerful servers.

The game-theory and security aspects of a blockchain like its censorship resistance, immutability or who can produce the next block are also relaxed to a level that many blockchain professionals consider unacceptable. Case in point the formation of cartels is incentivised by the dPoS delegation of vote mechanism. Corruption is baked in.

I wrote a short intro to consensus protocols a while back if you're interested in knowing a bit more: https://medium.com/@jpa_of_snc/consensus-casper-and-cryptoec...

Re: Stellar Smart Contracts

#103
post #98

Earlier quoted context omitted.

Waste is the security mechanism. Since the hash results are wasted it is risky to mount an attack on the network; if the hash results were not wasted then the cost of mounting an attack would be mitigated by the value inherent in useful work produced by the algorithm. Your rebuttal actually supports this conclusion because "useful work" would become the "common denominator" cost built into securing the network thus b…

> Waste is the security mechanism not really, consumption of energy is. and even if we accepted this weak statement, how does it follow that PoW is therefore wasteful? waste isn't the product of PoW, valid blocks are.

> consumption of energy is

Yes. That's the "waste" part. The only product of spending the energy is a proof that the energy was spent. This is obviously wasteful because there is no relationship between the absolute energy spent and the utility of the network. The higher the difficulty the more energy wasted in order to maintain the status quo. Perhaps the most obvious sign of PoW's wasteful nature is the fact that the introduction of more efficient hardware into the network increases overall energy consumption because everyone else without cutting edge ASIC technology has to increase their energy output to compensate for the increase in hash rate.

Re: Stellar Smart Contracts

#104
post #44

Both of the examples (2-Party Multisignature Escrow Account with Time Lock & Recovery, and Joint-Entity Crowdfunding) have been possible with Bitcoin for some time.

But aren't Bitcoin transactions slow and expensive?

Re: Stellar Smart Contracts

#105
post #98

Earlier quoted context omitted.

> Waste is the security mechanism not really, consumption of energy is. and even if we accepted this weak statement, how does it follow that PoW is therefore wasteful? waste isn't the product of PoW, valid blocks are.

> consumption of energy is Yes. That's the "waste" part. The only product of spending the energy is a proof that the energy was spent. This is obviously wasteful because there is no relationship between the absolute energy spent and the utility of the network. The higher the difficulty the more energy wasted in order to maintain the status quo . Perhaps the most obvious sign of PoW's wasteful nature is the fact that…

> The only product of spending the energy is a proof that the energy was spent

yes, and if that proof has value - then it's not a waste!

> there is no relationship between the absolute energy spent and the utility of the network

of course there is - security of the blockchain is proportional top energy spent mining it.

> higher the difficulty the more energy wasted in order to maintain the status quo

you got this backwards, difficulty goes higher because more energy is spent (or there is breakthrough in mining efficiency like cpu->gpu, gpu->fpga, fpga->asic, see next paragraph). and miners spend more energy because market tells them it values the security / utility / w/e of the bitcoin more.

> introduction of more efficient hardware into the network increases overall energy consumption because everyone else without cutting edge ASIC technology has to increase their energy output to compensate for the increase in hash rate

this makes no sense.. introduction of more efficient hardware increases the difficulty, not total energy spent. inefficient miner will remain inefficient and not-profitable no matter how much energy they will be spending.

Re: Stellar Smart Contracts

#106
post #97

Earlier quoted context omitted.

PoW uses energy to produce blocks in a process known as mining that consists of trial and error attempts at producing a “special” hash that meets a given difficulty target expressed in the number of leading zeroes. The difficulty target reflects the speculative work needed to produce valid blocks at regular intervals given the available hashrate. When more hashrate is added to the network the difficulty adjusts such…

you're not telling me anything i dont know. you're just using wrong words to describe things. PoW's work is hashes and they are discarded. PoW's product is valid block signatures and transitively - blockchain security. something is wasteful if the product is worthless. discarded hashes are worthless but valid signatures aren't worthless. if somebody was running bitcoin miner and discarding all hashes - their work wou…

Producing fraudulent blocks (ie, containing double-spends) is the same as "discarding all the hashes" because the consensus mechanism (the fork choice rule) will ensure that the block is rejected, unless the attacker can also provide 51% of the current network hashrate to force this bad block into the canonical chain.

I defend PoW as the most secure consensus protocol for the major public blockchains precisely because the cost of an attack is so high right now. The wastefulness of PoW guarantees that there won't be reason to get involved in the mining business unless one intends to produce valid blocks and get paid for it.

edit: I would argue that producing fraudulent blocks is a "strictly dominated strategy" in game-theory terms, because its outcome is always worse than following the protocol rules and producing a valid block. From that perspective I believe it is the same as "discarding all the hashes".

Re: Stellar Smart Contracts

#107

I recently started moving our token from Ethereum to stellar for the simple reason that I came to the conclusion that Ethereum is too far from being production ready to be of use in an application that has actual users that generate any kind of sizable amount of transactions. Ethereum is cute until you have use cases and uses that require it to actually process transactions. The Ethereum ecosystem is a big mess right…

The liquidity you get from using the Ethereum-based ERC20 standard for your token is vastly greater than using a runner-up like Stellar. ERC20 is used in something like 95 of the top 100 tokens by market cap, while Stellar doesn't even have 1 token in the top 100.

That means it's much easier to get your token listed on an exchange if it's ERC20, and there are dozens of wallets, with combined millions of installations, that users can use to hold it.

It also means numerous decentralized exchanges (e.g. 0x, Kyber) and other value-adding applications that are compatible with it, like the smart-contract based loaning Dapps that can use ERC20 tokens as collateral (e.g. the Dharma protocol) and relatively soon, second layer solutions for low-cost instantaneous transactions, like Raiden, Liquidity Network, Celer Network etc.

I just don't see why anyone would want to move from Ethereum, which has seen its market share in the token market grow steadily over the last two years, to something that's barely used like Stellar.

Is liquidity secondary to transaction throughput for the use-case of your token? If so, couldn't you use a traditional MySQL server, or a permissioned sidechain, or even a more centralized ledger like Stellar, for the high-throughput uses of the token, and use Ethereum for trading it? Going the dual-blockchain route is what Kik ended up doing with its token, Kin, based on the reasoning that having its token convertible to the ERC20 standard gave it access to a much larger pool of liquidity.

Re: Stellar Smart Contracts

#108
post #97

Earlier quoted context omitted.

you're not telling me anything i dont know. you're just using wrong words to describe things. PoW's work is hashes and they are discarded. PoW's product is valid block signatures and transitively - blockchain security. something is wasteful if the product is worthless. discarded hashes are worthless but valid signatures aren't worthless. if somebody was running bitcoin miner and discarding all hashes - their work wou…

Producing fraudulent blocks (ie, containing double-spends) is the same as "discarding all the hashes" because the consensus mechanism (the fork choice rule) will ensure that the block is rejected, unless the attacker can also provide 51% of the current network hashrate to force this bad block into the canonical chain. I defend PoW as the most secure consensus protocol for the major public blockchains precisely becaus…

> Producing fraudulent blocks (ie, containing double-spends) is the same as "discarding all the hashes"

no, it's not the same, it has the purpose of Producing fraudulent blocks. you're contradicting yourself within single sentence..

> The wastefulness of PoW guarantees

there is no wastefulness. there is energy consumption with purpose of securing the blockchain.

it would have been wasteful if difficulty was fixed and miner was spending 100 times more energy than necessary to create a block every 10 minutes, but since difficulty adjusts - there is zero waste in PoW. every joule spent was necessary and provided value.

Re: Stellar Smart Contracts

#109

Earlier quoted context omitted.

> consumption of energy is Yes. That's the "waste" part. The only product of spending the energy is a proof that the energy was spent. This is obviously wasteful because there is no relationship between the absolute energy spent and the utility of the network. The higher the difficulty the more energy wasted in order to maintain the status quo . Perhaps the most obvious sign of PoW's wasteful nature is the fact that…

> The only product of spending the energy is a proof that the energy was spent yes, and if that proof has value - then it's not a waste ! > there is no relationship between the absolute energy spent and the utility of the network of course there is - security of the blockchain is proportional top energy spent mining it. > higher the difficulty the more energy wasted in order to maintain the status quo you got this ba…

Using electricity as a proof of investment is still a waste of electricity.

Proof of work is to establish that money is being spent. A less wasteful system wouldn't convert money into electricity to feed into computations to prove that.

Proving that you lit heaps of cash on fire would be less wasteful.

Just because a process is wasteful doesn't mean it isn't valuable. Air freight is wasteful but is also valuable.

Re: Stellar Smart Contracts

#110
post #73

If I'm reading the docs right, the Stellar smart contracts are extremely different from Ethereum smart contracts - in fact, it almost feels like a stretch to call them the same name. Like "animals" vs "plants". Ethereum smart contract are actual virtual machines. They are tiny computers that run whatever bytecode you want. You could calculate pi to a million decimal places in a smart contract, if you had the money fo…

How smart should a contract really be though? It seems like a feature rather than a bug that there are limits.

The word "contract" is a bit misleading. On Ethereum these scripts are used for all sorts of things, including the on-chain parts of second-layer scaling solutions.
Post reply on HN