codius-deprecated / example-bitcoin

Example contract showing how to use bitcoinjs in Codius.
ISC License
6 stars 5 forks source link

Usage/documentation is unclear #2

Open AronVanAmmers opened 10 years ago

AronVanAmmers commented 10 years ago

It's great that Codius has a (somewhat ;) working example using bitcoinjs. However it's unclear to me how this example would be part of a real-world contract.

A Codius contract, as I understand it, guarantees (through consensus of the smart oracles executing it) the correct execution of the contract "terms". I understand that the example contract would sign a Bitcoin transaction.

So in this case, many oracles would run this contract and all sign a Bitcoin transaction. And then what? Would this be used in a contract of the type "make this specific payment after some specific thing happened?" (e.g. pay the seller of a house when the property has been officially transferred according to the land administration)?

Some elaboration would help people like myself understand what Codius can do.

emschwartz commented 9 years ago

Sorry about this, this example hasn't been updated in a little while. All of the contracts we've been working on recently run as webservers that expose APIs people can talk to. In the case of a bitcoin wallet, you would implement some kinds of rules to determine whether the contract should sign the transaction or not.

Does that help?

On Fri, Sep 12, 2014 at 6:38 AM, AronVanAmmers notifications@github.com wrote:

It's great that Codius has a (somewhat ;) working example using bitcoinjs. However it's unclear to me how this example would be part of a real-world contract.

A Codius contract, as I understand it, guarantees (through consensus of the smart oracles executing it) the correct execution of the contract "terms". I understand that the example contract would sign a Bitcoin transaction.

So in this case, many oracles would run this contract and all sign a Bitcoin transaction. And then what? Would this be used in a contract of the type "make this specific payment after some specific thing happened?" (e.g. pay the seller of a house when the property has been officially transferred according to the land administration)?

Some elaboration would help people like myself understand what Codius can do.

— Reply to this email directly or view it on GitHub https://github.com/codius/example-bitcoin/issues/2.

AronVanAmmers commented 9 years ago

@emschwartz Yes it does, thanks. I understand how bitcoinjs could be used in a codius contract now. For others to understand too, I think the example would benefit from some more explanation in the Readme, like including example code of creating the bitcoin transaction, and a short textual explanation of how it could be applied (as you did above).