Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very nice explanation. Not oversimplifying and not too detailed. Could anyone care to explain smart contracts in the same balanced fashion? I always struggle to convey my understanding.


In bitcoin you can have a transaction which requires 2 or more people to sign it before the transaction can happen/is considered valid at all.

Smart contracts, is specifying conditions which can be checked in the blockchain, like existence of certain data you expect to be posted in the OP_RETURN (comment-like field) by other transactions. When your conditions are met the "smart-contract" makes/signs and publishes its own transaction, and other contracts can depend on this output of your contract.


For Ethereum, IIRC, inside a transaction you can host a program (contract). A peer who runs your program will use your transaction money to run it (it's called gas) and display the result of the program as part of the new receiving transaction.

Everyone who verifies the contract needs to run the program as well, for free, that's why you can't have big programs.

You can then send new transactions to continue using the program, to interact with it, etc...

If you don't send enough gas, they can't run the program though. (Each functions in a program cost some amount of gas to run.)


In Ethereum and similar systems, a smart contract is a script which can hold funds and various other data. It has functions that can be called by users, which can update data and move money around. The script can also act like a user and call other scripts.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: