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:
-
Refine and agree on a representation for smart contracts in
Atomspace -
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) … -
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…) -
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…