5 ms·
Apologies if this is a bit of an ELI5 request, but after many years I still don't understand the real-world uses of smart contracts. There was this post on HN a
by hn_throwaway_99 6y ago
Apologies if this is a bit of an ELI5 request, but after many years I still don't understand the real-world uses of smart contracts. There was this post on HN a couple years ago, https://news.ycombinator.com/item?id=19225857 https://news.ycombinator.com/item?id=19225857, and I still don't understand how any of those issues are addressed.
Specifically what I'm struggling to understand is that most (all?) real-world contracts require some information about the real world: The price of corn (or corn futures), whether the rental apartment was as described, whether the sneakers were authentic, etc. But whenever you need this real world information, at some point you need an oracle, or a consensus of oracles, and at that point I don't really see the point of using blockchain as you have to trust the oracles.
Would really appreciate if anybody could provide some info or links that explain how this problem is handled or solved. More importantly, would appreciate a single example of an actual smart contract that responds to events that happen in the real world.
- blhack 6y agoThis problem is solved by chainlink. Chainlink is also kindof the thing that allows all this wild DeFi stuff to happen. https://dyor-crypto.fandom.com/wiki/Chainlink_(LINK) https://dyor-crypto.fandom.com/wiki/Chainlink_(LINK)
- nexthash 6y ago> External data for contracts. > Launched by the San Francisco fintech company SmartContract in June 2017. Currently based in the Cayman Islands. Yep, that's the silver bullet for crypto. A product run by a company located in a cozy jurisdiction with a sleek website & whitepapers.
- meowkit 6y agoFederated oracles is the answer you are seeking. Essentially build systems to quantify reputation and provide rewards for those that publish data of interest in a manner that can be driven via consensus or through interfacing with an agreed upon central authority prior to a contract. You don’t “trust” the oracles you make them compete and avoid malicious actions. You are focused on off-chain interactions for smart contracts. The infrastructure is not there yet I’m afraid, but there is steady progress. I believe Taiwan is working on IoT infastructure for publishing high resolution air quality data by having individuals set up sensing nodes that gather the data and publish it. Not sure if there is any DLT involvement, but no reason there couldn’t be. On chain contracts have lots of use cases in the meantime.
- hn_throwaway_99 6y ago> On chain contracts have lots of use cases in the meantime. Thanks for responding. Can you suggest a starting point for learning more about what these use cases are, because I'm still struggling to understand what those would be. When I try searching for things like "uses for smart contracts" I'm pointed to things like this page, https://corporatefinanceinstitute.com/resources/knowledge/deals/smart-contracts/ https://corporatefinanceinstitute.com/resources/knowledge/de..., which honestly is a bunch of pie-in-the-sky bullshit that is not actually technically feasible at present.
- ozorOzora 6y agoI agree. I've been holding BTC for a couple of years as I feel that international accessibility coupled with scarcity makes for a great store of value. But DeFi I still fail to wrap my head around. My main concern being: DeFi could get harsh competition from traditional financial actors by them getting up to date on accessibility. Thus appealing to a new, more decentralized userbase.
- vmception 6y agoThe Automated Market Maker (AMM) systems are smart contracts using something more equivalent to a ballast system with pools - "liquidity pools" (LP, ironically and perfectly these act like limited partner shares of a pooled investment) - allowing the current price to be more of a ratio, which is stored in the smart contract after every trade. The largest AMM's have user-spawned markets which contain two assets (this is in direct contrast and competition to the concept of begging exchanges to add your asset and pretending that market makers organically showed up, all while getting extorted by the exchanges and market makers, the market has chosen AMMs). When someone buys in an AMM market, they send AssetA adding to the pooled balance of AssetA, and receiving AssetB, reducing the pooled balance of AssetB. The ratio (simple division) of these two assets is stored at the end of that trade in the same smart contract (the spawned liquidity pool ballast), and can therefore be read by any other user and other smart contracts. Reading is a free operation. This user-spawned and self-replication smart contract factory, alongside the price storage, has been key to the DeFi boom over the past year. No oracle required. People (organizations) are using oracles to try to keep markets with similar assets in sync, and for smarter routing for the best price. The arbitragers take care of that too, which is simply Oracle + Fund movement. Flash loan users in the repo market are arbitraging as well, which is simply Oracle + Borrow + Fund movement + Repay in a single transaction included in a single block. It is a growth industry when you stop asking why and start asking how. A lot of oracles are ignoring some market pairs, and the oracles themselves could have their own inefficiency.
- ur-whale 6y ago>real-world contracts require some information about the real world For a blockchain to know about the real world, it does indeed need so-called "oracles". These are typically trusted external entities (e.g. an actuarial firm) who "inject" signed information into the blockchain that can then be consumed as input by smart contracts "living" in the blockchain. For example, an Oracle could inject, say every day, signed with their published key pair, the average price of Bitcoin into the Ethereum blockchain, and you could image a family of smart contract paying out if and only if the oracle-published Bitcoin price meets certain conditions. This solution is - of course - very far from ideal as the information is only as good as the trust you place in these external institutions. On the other hand, this is not very different than the trust you place in well established institutions such as banks, rating firms, escrows, etc... What benefit this brings is: 1. Transparency (anyone can check the chain to see what contracts are in place) 2. Automation 3. Complex hierarchical structures where the "building blocks" or "leaf cells" is provided by the oracles. 4. A single failure of the Oracle to inject "truth" into the chain would ruin their rep. for ever. To compare this to a real world contract, one party that has - say - written a "promise to pay" if certain conditions occur could chose to reneg on that promise, which would lead to lengthy and costly legal proceedings. This latter scenario can't occur on a blockchain: the cheater would have to bribe the Oracle, a far more complicated affair. [EDIT]: and as pointed out by another comment, there are federated oracles: a smart contract can use an aggregate of multiple sources that provide the same info and form a consensus based on those. [EDIT2]: another interesting point is that as more and more financial activity "moves" to the blockchain, the need for Oracles diminishes as the information required by a smart contract becomes native. You can thus view oracles as a temporary onramp of legacy financial info into the blockchain.
- xoralkindi 6y agoWhy do people think cyberspace is not the real world? I think smart-contracts as envisioned by early cypherpunks where meant to run in a world where Governments are obsolete, they won't work well in our current society.
- hn_throwaway_99 6y agoThis is the kind of "cyber-babble" I'm talking about. Smart contracts can only respond to things that happen on the chain, but the vast majority of events that humans produce contracts to govern in the first place happen in what is colloquially termed "the real world". Yes, I think the blockchain is "real", but I think most people understand what I'm talking about when saying I want a contract to be able to reference actual performance of a service rendered in 3D space. > I think smart-contracts as envisioned by early cypherpunks where meant to run in a world where Governments are obsolete "Governments" have existed in some form since the beginning of the species (families and tribal structures, etc.) and pretending that some piece of technology may make them "obsolete" belies a very simple understanding of human nature.
- roenxi 6y agoImagine you are going to hire something expensive, and the owner wants a rental bond. So you go to a 3rd party, they set up a smart contract which automatically returns the bond to you 2 weeks after the lease ends, but the 3rd party can redirect the money to the owner by manually intervening. The example is basic, but now the 3rd party can't take the money, go broke, take risks using your bond, etc, etc, etc. There is clear-in-code records of what the powers of the parties are and when things happen. You can prove where the money ended up. This isn't an earth-shattering example, and things can still go wrong. But the failure cases have shrunk vs using paper. It is an improvement on the status quo.
- bildung 6y agoI've done your example in the real world, without smart contracts. The 3rd party is a notary. If I understood you right the notary here is replaced by a notary plus smart contracts. A notary in my juristication (Germany) is a quasi-employee of the government, so has little risk to go broke etc. The particular bonds for these cases are usually non-transferrable. OTOH smart contracts introduce new risks like bugs and costs like high gas prices - for what gain? Edit: To clarify, the modes of failure are vastly worse for the smart contract scenario. If the notary goes broke, my money will not be part of the insolvency estate. If OTOH the smart contract has a bug, everone's money is gone.
- roenxi 6y ago> A notary in my juristication (Germany) is a quasi-employee of the government, In a sense; precisely. At the moment, to fill that function, you need a quasi-government employee to have a trustworthy bondholder. With a smart contract, literally I could be the notary and while that would be super weird, I can't actually do anything not specified in the contract. Something is possible that wasn't possible before. That is why people can get excited about the idea.
- fock 6y agoyet you can do something not matching the real world outcome. and there's no way to roll that back. and people still need real-world trust in you... seems not soo smart to me.
- QuesnayJr 6y agoI'm really glad you asked this question, because I've wondered it as well.