Live data from Hacker News

Understanding Ethereum Smart Contracts

gjermundbjaanes.com

41–50 of 162 posts

Re: Understanding Ethereum Smart Contracts

#41

Earlier quoted context omitted.

Some very good points. I recall that the mainnet once had a gas per block limit of 4.7 mil before it was increased. The increase is something that is voted on by the miners, and has been fluid over the years. (Btw, it is something very similar to a block size limit in BTC, although it limits the storage + CPU usage, rather than just storage like in BTC) About the point on using floats, one should never use floats whe…

Dang you got there 3 minutes before me!

Don't worry, I'm sitting in the same boat ;-)

Re: Understanding Ethereum Smart Contracts

#42
post #17
post #15

Earlier quoted context omitted.

They all sound great. So what I'd love to see is a well written blog post describing how Ethereum would be put to work to achieve one of those goals and to give me an understanding of its superiority within the domain. I'm not demanding it and I'm not being snarky at all. It's just that's the level I'm at - without that kind of entry point I struggle to assess it.

Some of the use cases can be fairly simple (thus easier to see the value). 1. Me and You start a company together. We would like to split things 50/50. We setup an address such that when values are paid to it, half goes to you, half goes to me. Effectively we've created an "LLC with an Operating Agreement", but we aren't relying on political legal system / country to enforce. Enforcement is automatic and done by the…

Interesting. So in the case of 1, I guess I could have a function in the contract called something like sellUserXStakeTo(userId Y), that would let me transfer my 50% ownership to another user Y. And that method would be secured to only accept being called by me, or by another contract written by me.

Then if a user Y did come along and wanted to buy my stake, we'd agree a price P, then I would write a second contract that said: If user Y pays user X amount P, then call sellUserXStakeTo(Y). Then, once I'd published it, user Y would verify it, then pay the money, secure in the knowledge that I could not alter or back out of the deal.

Re: Understanding Ethereum Smart Contracts

#43
post #17

Earlier quoted context omitted.

Some of the use cases can be fairly simple (thus easier to see the value). 1. Me and You start a company together. We would like to split things 50/50. We setup an address such that when values are paid to it, half goes to you, half goes to me. Effectively we've created an "LLC with an Operating Agreement", but we aren't relying on political legal system / country to enforce. Enforcement is automatic and done by the…

Out of interest, are there any examples of real "live" structures in place using those mechanisms?

Just a simple example, sort of: https://hodlethereum.com/

It will send back your ETH after a certain date. You can check the smart contract in the bottom left corner.

Re: Understanding Ethereum Smart Contracts

#44
post #19
post #17

Earlier quoted context omitted.

Some of the use cases can be fairly simple (thus easier to see the value). 1. Me and You start a company together. We would like to split things 50/50. We setup an address such that when values are paid to it, half goes to you, half goes to me. Effectively we've created an "LLC with an Operating Agreement", but we aren't relying on political legal system / country to enforce. Enforcement is automatic and done by the…

Those are both really interesting thanks. I assume in case 2 Solidity language has some built-in mechanisms for ensuring that the current datetime is agreed across the whole network?

As DennisP said, yes there are mechanisms to ensure date is agreed upon.

Your question of "consensus" brings up other interesting points. I think an increasingly valuable service in a new smart-contract world will be to have an "Outcomes As A Service" arbiter. This would be a trusted 3rd party that publishes real-world outcomes in a method that can be accessed reliably via smart contracts.

Who will win the football game between Dallas and New Orleans on Nov 22, 2019? Who is winner of 2020 Presidential Election? etc....Essentially a service that you can tell them you want to track some real-world event and publish outcome for use in smart-contracts. Obviously this 3rd party would need to be transparent, have an open appeal process, be neutral and earning income not tied to outcome, etc.

What happens to gaming laws (and cities like Las Vegas), in a world where sports betting can be done with no middle-man needed?

Re: Understanding Ethereum Smart Contracts

#45
post #38

Earlier quoted context omitted.

Interesting point on the lack of floating-point support. I've dealt with storing fiat in real world software and using floating point is a big no-no due to the fact it is only an approximation by its very design. We therefore always stored money as integer cents/pennies etc. How is this approached with digital "money" where there is no smallest divisible unit?

Most of the time by using 18 decimals. One "Ether" is 10^18 "wei", the smallest unit of currency. Most cryptotokens built on ethereum also use that many units...but not all. Bitcoin is, IIRC, 8 units of precision.

Ah that makes sense - if Bitcoin keeps going at its present rate could 8 units of precision simply not be enough? Would a hard-fork be the solution to this?

Re: Understanding Ethereum Smart Contracts

#46
post #25

Earlier quoted context omitted.

I know that one of the major power companies in Germany works on chargers for electric cars based on Ethereum; send x ether to the smart contact and the charging station will let you charge your car accordingly.

What bit of that needs a smart contract? Seems perfectly do-able without one, and you still need the same levels of trust even when there's a smart contract in there.

I think the idea of Ethereum is that all infrastructure is there, so with a very thin layer (a smart contract) you get everything else (distributed computing, payments, crypto, even storage) for free.

Re: Understanding Ethereum Smart Contracts

#47
post #17
post #15

Earlier quoted context omitted.

They all sound great. So what I'd love to see is a well written blog post describing how Ethereum would be put to work to achieve one of those goals and to give me an understanding of its superiority within the domain. I'm not demanding it and I'm not being snarky at all. It's just that's the level I'm at - without that kind of entry point I struggle to assess it.

Some of the use cases can be fairly simple (thus easier to see the value). 1. Me and You start a company together. We would like to split things 50/50. We setup an address such that when values are paid to it, half goes to you, half goes to me. Effectively we've created an "LLC with an Operating Agreement", but we aren't relying on political legal system / country to enforce. Enforcement is automatic and done by the…

1- 50% of what? Revenue into the company or dividens/salary etc out of the company? if it's the latter, then, how do we make sure that you don't spend $500.000 for trash bins for the office? Do we have to make sure every decision goes through the network? (i.e. who is the authority to decide what is reasonable and what is blatant fraud if things go sour AND is it even possible to make sure that nothing possibly can go sour[I don't think so.]. So, fraud is possible, and in the case of fraud, -say; the network retroactively decides that something really constitutes a fraud, hence is a crime- who is the enforcer of the punishment[which is most likely to be physical: like prison sentence]?)

2- How do you make sure that your child doesn't sell it in 2025 and buys a Lambo? (which is a problem you don't have with regular Trusts AFAIK)

Re: Understanding Ethereum Smart Contracts

#48
post #38

Earlier quoted context omitted.

Most of the time by using 18 decimals. One "Ether" is 10^18 "wei", the smallest unit of currency. Most cryptotokens built on ethereum also use that many units...but not all. Bitcoin is, IIRC, 8 units of precision.

Ah that makes sense - if Bitcoin keeps going at its present rate could 8 units of precision simply not be enough? Would a hard-fork be the solution to this?

If one bitcoin were worth $100 million, then one "satoshi" (the smallest unit in bitcoin) would be worth a buck. So, 8 units of precision is probably plenty.

Re: Understanding Ethereum Smart Contracts

#49
post #17
post #15

Earlier quoted context omitted.

They all sound great. So what I'd love to see is a well written blog post describing how Ethereum would be put to work to achieve one of those goals and to give me an understanding of its superiority within the domain. I'm not demanding it and I'm not being snarky at all. It's just that's the level I'm at - without that kind of entry point I struggle to assess it.

Some of the use cases can be fairly simple (thus easier to see the value). 1. Me and You start a company together. We would like to split things 50/50. We setup an address such that when values are paid to it, half goes to you, half goes to me. Effectively we've created an "LLC with an Operating Agreement", but we aren't relying on political legal system / country to enforce. Enforcement is automatic and done by the…

How about using smart contracts for prop betting

Re: Understanding Ethereum Smart Contracts

#50
post #17

Earlier quoted context omitted.

Some of the use cases can be fairly simple (thus easier to see the value). 1. Me and You start a company together. We would like to split things 50/50. We setup an address such that when values are paid to it, half goes to you, half goes to me. Effectively we've created an "LLC with an Operating Agreement", but we aren't relying on political legal system / country to enforce. Enforcement is automatic and done by the…

1- 50% of what? Revenue into the company or dividens/salary etc out of the company? if it's the latter, then, how do we make sure that you don't spend $500.000 for trash bins for the office? Do we have to make sure every decision goes through the network? (i.e. who is the authority to decide what is reasonable and what is blatant fraud if things go sour AND is it even possible to make sure that nothing possibly can g…

Parent gives you an answer that is scoped to "divide incoming by half and send the halves to given addresses" and you criticizing that the answer doesn't cover all scopes you can come up with?

Him: "This baker makes bread rolls". you: "What about dark bread? What about non-bread items? What's his broker?"

Post reply on HN