Live data from Hacker News

Understanding Ethereum Smart Contracts

gjermundbjaanes.com

141–150 of 162 posts

Re: Understanding Ethereum Smart Contracts

#141

Earlier quoted context omitted.

My mom works for Mercedes and she's been telling me (She's really tech-y) they really wanna use Blockchain/Smart contracts to help validate someone before they purchase a car. Essentially before you buy a car, you need to verify you have the credit, cash, etc.. whatnot. She says that Diamler/Mercedes think they could make this a lot smoother with smart contracts and what not.

Would it be used for an internal system, or for contacting credit score companies, banks, etc?

I believe internal for dealerships to use. Again, she's not very tech-y so I'm not entirely sure.

Re: Understanding Ethereum Smart Contracts

#142
post #10

What I'd greatly appreciate is a walk through of a plausible real world use case. I find it hard to concentrate on the technology itself until I understand the application.

My mom works for Mercedes and she's been telling me (She's really tech-y) they really wanna use Blockchain/Smart contracts to help validate someone before they purchase a car. Essentially before you buy a car, you need to verify you have the credit, cash, etc.. whatnot. She says that Diamler/Mercedes think they could make this a lot smoother with smart contracts and what not.

*she's really NOT tech-y, my mistake

Re: Understanding Ethereum Smart Contracts

#143
post #138

Earlier quoted context omitted.

> [...] only to eventually encounter all the issues that floating point was invented to solve. When they encounter those issues they then end up having to adapt their code only to basically re-invent a broken, unstable quasi-floating point system when they would have been much better off using the IEEE floating point system [...] Would you care to elaborate on some of these issues? I'm genuinely curious.

Sure, I'll embarrass myself here and use myself as an example since this is how I actually came to even learn about this to begin with. When I started working in finance straight out of school (not in HFT at the time), I naively accepted the dogma that money should never be represented using floating points. I mean everywhere I went I would read in bold letters don't use floating point! Don't use floating point! So I…

Thanks a lot for this answer -- the real-world scenario including your thought process is very insightful.

Re: Understanding Ethereum Smart Contracts

#144
post #138

Earlier quoted context omitted.

> [...] only to eventually encounter all the issues that floating point was invented to solve. When they encounter those issues they then end up having to adapt their code only to basically re-invent a broken, unstable quasi-floating point system when they would have been much better off using the IEEE floating point system [...] Would you care to elaborate on some of these issues? I'm genuinely curious.

Sure, I'll embarrass myself here and use myself as an example since this is how I actually came to even learn about this to begin with. When I started working in finance straight out of school (not in HFT at the time), I naively accepted the dogma that money should never be represented using floating points. I mean everywhere I went I would read in bold letters don't use floating point! Don't use floating point! So I…

You know there's a numeric type in postgres? Not quite arbitrary precision, but large enough for pretty all practical purposes "up to 131072 digits before the decimal point; up to 16383 digits after the decimal point"

https://www.postgresql.org/docs/current/static/datatype-nume...

Re: Understanding Ethereum Smart Contracts

#145
post #135
post #133

Earlier quoted context omitted.

To clarify for myself and maybe others: are you arguing against using a single integer scaled to the smallest precision someone thought they'd need N year(s) ago? If so: totally agreed. Inflexible single-scaled-ints have been a plague in nearly every piece of production code I've seen them in. I'll take floats (well, doubles) any day over this. Flexible scale tho (arbitrary precision / bigdecimal equivalents (I'd pre…

Yes, we are on the same page. BigDecimal is appropriate for representing money, fixed point arithmetic is not. I simply argue that in situations where you care about performance, you can actually drop BigDecimal and use floating point decimal or even floating point binary and get perfectly good results that have exact precision so long as you model your domain.

Yeah, if you know your domain and know you're creating only an acceptable amount of error, by all means float it up. Floats are easy to use and predictable nearly everywhere, since nearly everyone follows the same spec.

Generally though, I think people don't quite do due-diligence here. And/or the domain changes enough that numbers get large enough to invalidate the earlier analysis. There are obviously exceptions to this though, and for them, they know what they're doing and why they're doing it and it's all good.

Re: Understanding Ethereum Smart Contracts

#146
post #97
post #10

What I'd greatly appreciate is a walk through of a plausible real world use case. I find it hard to concentrate on the technology itself until I understand the application.

Having recently gone through the prolonged pain of probating a will, I think smart contracts could be used to enforce wills without the need for probate. But of course, that opens up its own can of worms, like the need for potential heirs to maintain a digital identity for possibly decades. What happens if someone cuts all digital ties and effectively becomes a hermit? At least with ordinary probate, you can simply v…

Wills usually change many times in your lifetime, and with a smart contract you'd have to build in safe void clauses that can't be exploited.

Re: Understanding Ethereum Smart Contracts

#147

Earlier quoted context omitted.

No its fundamental. In the trust fund example, you cant stop the recipient trading their key or wallet early, as you have no way to verify the human holding it. Unless you keep that access with some legal guardian. In which case your security still sits in the legal system, as it would if you just used a trust fund. So whats the point? Again in the company example, it only works if you both observe that the coins mea…

What's to stop someone from trading a normal trust fund away? The recipient can simply take out a loan with the trust as collateral.

how do you prove to the bank the non-existence of a clause that would void the trust if this is done(and noticed)?

the main point I tried to make above was this: in normal life there is the "human factor"; like, if you look at a situation, you can reasonably comment on whether it's a positive situation from an actor's perspective; whether the actors were engaging in fraudulent activity etc. In digital-only world, there is no such thing as "probable cause", "reasonable doubt" etc.

which makes the application of smart contracts to real life intractable(IMHO borderline impossible for complex situations for the near future[~10 years?]).

Re: Understanding Ethereum Smart Contracts

#148
post #97
post #10

What I'd greatly appreciate is a walk through of a plausible real world use case. I find it hard to concentrate on the technology itself until I understand the application.

Having recently gone through the prolonged pain of probating a will, I think smart contracts could be used to enforce wills without the need for probate. But of course, that opens up its own can of worms, like the need for potential heirs to maintain a digital identity for possibly decades. What happens if someone cuts all digital ties and effectively becomes a hermit? At least with ordinary probate, you can simply v…

It also has the hard limit that the assets being willed must be crypto currency. It wouldn't work for a house, car, cash, etc...

Re: Understanding Ethereum Smart Contracts

#149
post #82
post #29

I've been programing my own Ethereum smart contract (virtual currency) for awhile now. Here's some gotchas off the top of my head: - You have about 500 lines of code to work with. This of course varies, but smart contracts have to be really small to fit in the max gas limit (6.7 million wei). - You can't pass strings between contracts (coming soon). - There are no floating point numbers. Since you're probably working…

For passing strings between a contract you can return the string as Bytes32 and let the remote contract query a function to access that.

Wait you can’t call another contract’s function (from a contract) if it takes a string as argument?

Re: Understanding Ethereum Smart Contracts

#150
post #15

Earlier quoted context omitted.

Crowdfunding (ICOs) is a use case. DNS (ENS) is a use case. Organisational Transparency (Aragon) is a use case. Prediction Markets(Augur) are a use case. Electricity Markets (Grid+) are a use case. International payment card with zero fees (TenX) is a use case. I can go on for a while longer, there are hundreds of use cases but the question is: what would be a use case for you?

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.

The superiority is always going to be the same: you don’t have to trust a third party anymore.
Post reply on HN