Live data from Hacker News

Learn Ethereum smart contract programming

ethereumdev.io

101–110 of 244 posts

Re: Learn Ethereum smart contract programming

#101
post #98

They talk about storing money in the contract. Does this mean I will be "charged" right in the moment I "store" money in the contract? Or does it mean I'll be charged when the contract gets "destroyed" and the money "in the contract" is sent to some address? I'm asking because both sides have problems. If I don't get charged when storing money in the cotract, I could spend it elsewhere until the contract resolves. If…

I would suggest you read the white paper (https://github.com/ethereum/wiki/wiki/White-Paper)

The short answer is contracts are accounts. Just like your normal ethereum accounts. When you invoke a method marked as payment, you are essentially transferring some ether from your account to the contract. If someone wrote contract from which you can't withdraw and you send ether to it, thats stupidity - even fiat can be destroyed by stupidity.

Re: Learn Ethereum smart contract programming

#102
post #98

They talk about storing money in the contract. Does this mean I will be "charged" right in the moment I "store" money in the contract? Or does it mean I'll be charged when the contract gets "destroyed" and the money "in the contract" is sent to some address? I'm asking because both sides have problems. If I don't get charged when storing money in the cotract, I could spend it elsewhere until the contract resolves. If…

I would suggest you read the white paper ( https://github.com/ethereum/wiki/wiki/White-Paper ) The short answer is contracts are accounts. Just like your normal ethereum accounts. When you invoke a method marked as payment, you are essentially transferring some ether from your account to the contract. If someone wrote contract from which you can't withdraw and you send ether to it, thats stupidity - even fiat can be…

I see, thank you :)

Stupidity? Doesn't Ethereum want to prevent all money getting locked up somewhere?

Re: Learn Ethereum smart contract programming

#104

The problem I see with Ethereum is that it is way too complex. I have read perhaps at least 10 times on their home page without even understanding what it does, what problems it solves etc. This is the sole reason why I don't think it will be successful in it's current state. With most successful tech or services or whatever the core idea is often super simple to grasp and you can instantly see the benefit. I don't s…

Maybe if you actually used it you'd see the benefits of it... try transferring any amount of value with Bitcoin.. take note of how much it costs and how long it takes. Then do the same with Ethereum. You'll start to learn pretty quickly what some of the main differences are. Regarding the 'fixed amount of Bitcoins' argument, I'd agree it's a nice simple marketing message but if you look in to what Ethereum is plannin…

> Then do the same with Ethereum.

As long as you only ask him to do it, it will be fine. What if everybody using bitcoin did it though?

Re: Learn Ethereum smart contract programming

#105

The problem I see with Ethereum is that it is way too complex. I have read perhaps at least 10 times on their home page without even understanding what it does, what problems it solves etc. This is the sole reason why I don't think it will be successful in it's current state. With most successful tech or services or whatever the core idea is often super simple to grasp and you can instantly see the benefit. I don't s…

If you understand Bitcoin benefits as: "decentralized no single entity controls"

Then, think of Etherium as: decentralized virtual slot machines no single entity controls

So visualize a slot machine: it advertises only the various ways you could win (in fact it never discloses the number of non winning combinations which are far greater in number) in other words manufacturers advertise only the possible upside to get you to put your money in. At best the thing being advertised happens at worst something else occurs which wasn't advertised, namely you lose your money.

The big difference between smart contracts and slot machines, is the ownership, in theory the casino owns the slot machines or at least leases the slot machine from the manufacturer, and so the casino gets the profits guaranteed by the code of the slot machine. Similarly smart contracts are crated/manufactured by an individual or groups of individuals, But here is where is gets tricky...instead of a casino hosting slot machines, smart contracts will live in perpetuity hosted on a blockchain. So whereas the slot machine directs funds that aren't wins to the casino, where do such funds in the smart contracts go? To wherever the smart contract tells the funds to go, even if it's an anonymous account (really owned by the smart contract creators) or the ability for any 3rd party to claim said funds. This little trick of anonymity allows the contract manufacturers to at least claim ignorance of the location of the funds.

There is one more thing to remember, Proponents of the smart contract somehow believe between the step the manufacturer creates the contract and releases said smart contract in the wild in perpetuity, by placing the smart contract on the blockchain, they somehow become indemnified legally (both civilly and criminally) from any damages the smart contract causes. In a most extreme example proponents i talk to believe you could build a bomb coded to go off upon a funding event, and once placed on the blockchain they would have no liability for the damage caused by the bomb because they claim the bomb was controlled/detonated by the code.

Re: Learn Ethereum smart contract programming

#106
post #10
post #2

Maybe it's because I don't have a use for it yet, or at least don't know if I have a use for it. But, the whole Ethereum universe seems vague and seems like they could explain it more than they do. "Install Ethereum wallet, write a contract, ..., Profit!" ?? Is there a better source that might explain what it is, how it works (a glancing explanation not a full network inner workings)??

I Am Not An Expert. If I understand correctly, these are a way to automate the execution of the financial part of normal contracts without the need for undue trust between parties. Some simple examples that might help (and I invite correction): • I and a few investors agree to buy into an enterprise in several installments. A contract can be written to the blockchain that automates these payments. Should a majority o…

The problem with your first two examples is that the 'investment' locked up in the smart contract can't be spent, which means the investors are not bearing any risk, and therefore cannot enjoy a return. If the money could be spent on capital and operating expenses, then the smart contract wouldn't be able to refund it if the conditions of the investment failed.

It is possible to create a smart contract, like the DAO, which implements the rules of a joint stock company. But stockholders are not concerned about the risk that these rules will be broken. The risk is that the company fails and there is nothing to distribute according to the rules. Replacing the general meeting of stockholders with a smart contract doesn't change the economics of collective investment – it just adds the risk of losing everything to a bug in the contract.

Re: Learn Ethereum smart contract programming

#107

Earlier quoted context omitted.

So can "smart contracts".

Unless the attacker is careless enough to reveal his identity, or puts his ill-gotten gains at risk of being hacked back, or the victims are Ethereum foundation members, your chances of restoration are slim to none.

So I'm actually at a disadvantage here, compared to plain old contracts.

Re: Learn Ethereum smart contract programming

#108

The problem I see with Ethereum is that it is way too complex. I have read perhaps at least 10 times on their home page without even understanding what it does, what problems it solves etc. This is the sole reason why I don't think it will be successful in it's current state. With most successful tech or services or whatever the core idea is often super simple to grasp and you can instantly see the benefit. I don't s…

Um, it solves the problem of money not being trendy, duh! /s

Re: Learn Ethereum smart contract programming

#109
The sad reality of Ethereum: 1. Bitcoin is slow and expensive, Ethereum is the future 2. Ethereum software has security hole, gets hacked 3. Ethereum fans say it's an experiment there are lots of things that will transform Ethereum (Casper/PoS, Raiden, zkSNARKs, Enterprise Alliance) 4. Low price getting pumped by Ethereum Foundation & big-holder affiliates 5. Back to #1

We've seen it happen again (DAO) and again (Parity) and it will keep happening, because it's broken by design. 90s cypherpunks that pioneered this ideas had considered Turing complete design and discarded it for cryptographic state-machines that allow for formal verification.

I appreciate the experimentation, but the takeover-the-world echo-chambers of ethereum that don't focus at all on the real tech behind it and ignore everything negative is pretty disappointing. Especially because we keep getting new people buying this and becoming the greater fools.

When talking about engineering on such a critical subject, people should be way more responsible. If Bitcoin had the same attitude regarding security like Ethereum does, we wouldn't be here and cryptocurrencies would be a joke.

Lazy engineering comes at great cost as time goes by and the illusion of security is unveiled.

Re: Learn Ethereum smart contract programming

#110
post #83

Earlier quoted context omitted.

> In that context, "smart contract" is just a way of saying that you're not relying on the promise of a third party to perform the refund—it's automatic What if the code is malicious, and instead of auto refund it steals the money? I mean, not everyone would read the code to see what it really does, so what happens in that case?

> I mean, not everyone would read the code to see what it really does, so what happens in that case? This is true with real world contracts too, that's why people hire lawyers - they understand the "code" of contract law.

You can put anything in "real world" contracts (in a 'put words on the paper' sense), but there are things that would be considered illegal if brought to court. In a sense there are reasonable defaults. So if you sign without reading a contract that 'you sell your self as a slave to me' this contract would have no power because slavery is illegal.
Post reply on HN