Logical Representation of Smart Contracts in OpenCog


#1

One thing I would like to see happen in a future version of SingularityNET (though it doesn’t need to be part of the first scalable release, fortunately) is to represent smart contracts in OpenCog’s internal AI “programming language”, Atomese…

There are endless difficult details to be worked out to achieve such a thing, but at a high level I think the following are the key aspects of what needs to be done:

  1. Refine and agree on a representation for smart contracts in
    Atomspace

  2. Agree on a scripting language for making smart contracts in
    Atomese. The default and obvious choice here is to use the OpenCog
    Scheme shell, just adding appropriate shorthands for smart contract
    authoring — roughly similar to (but more complex than) what we have
    done for Ghost (Scheme shell based chatbot content authoring) …

  3. Agree on a target blockchain for first experimentation with Atomese
    smart contracts. (This may well be Ethereum/Solidity, though it doesn’t have to be…)

  4. Write a translator that maps OpenCog smart contracts into the
    procedural form of the target blockchain

Note that there is no requirement here to translate an arbitrary
Solidity script into Atomese. Rather, if Solidity were chosen as the
target, we would map Atomese contracts into Solidity — but the outputs
of this mapping would constitute a specific and in some senses narrow
subset of Solidity scripts. However, this subset might have the full
logical capability of smart contracts (or it might have a proper subset of this capability, depending on various criteria to be explored…)

These are preliminary steps. The key thing of course is to do Step 1
sensibly, so that after the above are done, we can use logical
inference in OpenCog to prove things about the Atomese smart
contracts.

This is a lot of work, and it’s not needed to make a highly functional and scalable SingularityNET, but it seems a key part of realizing the ultimate medium-term SingularityNET vision…


#2

For smart contracts your best source of information is @NickSzabo4 on twitter and some great ideas via his blog http://unenumerated.blogspot.ca/

I know a number of Solidity devs and am happy to connect you. Would be really interested in hearing more about Atomese.

Reach out by email if that’s easier: alexandra.moxin@advancetech.io

Hope all goes well in Toronto, that’s where a number of ETH folk are located. When are you coming to Vancouver?


#3

NIST or ISO?


#4

That’s a very good idea, I also think logical lang is a natural choice! It would be cool if smart contracts could act on daily, common sense events. Like, call my secretary agent if there is a money related important mail in my mailbox, right? :slight_smile: I like this, this could be a killer integration.