On Agoric
Agoric’s composable smart contracts are written in JavaScript. They are secure based on Principle of Least Authority (POLA) and composable based on the Vat Model of the Electronic Rights Transfer Protocol (ERTP). Agoric’s long time goal is to move the diverse, vibrant world economy onto the decentralized web using safe smart contracts. Agoric is system for software agents participating in markets. Smart Contracts are a contract-like arrangement, expressed in code, where the behavior of the program enforces the terms of the contract without the need for a trusted enforcement agent. All invoke and agree upon what happened. Idea to be able to communicate between machines; interoperate between chains. Built on top of a layer of execution where there are modules that are used for smart contracts. Using JavaCcript we can send promises to other smart contracts. Agoric’s secure subset of JavaScript can create promise which is the result of something happening on another chain. For example an auction on another chain, send a bid, and get a promise; when the auction is complete the contract gets back the result. This same method can be applied to money, digital access, escrow, auctions, futures, forwards, derivatives; finance abstractions as components in JavaScript. Communicating network of contracts between composable networks. derivatives; finance abstractions as components in JavaScript. Object-oriented model for contractual arrangements in real-world markets. JavaScript can be used to write secure programs:
• Object-capabilites (ocaps) • Only refs carry causality • Reference graph === Access graph • Principle of Least Authority (POLA) • Distributed Secure Cross-chain Messages • Vat level IBC. And the CapTP protocols. • Multiple Vats in a single chain. • Vat unit of synchrony • Swingset is a unit of determinism. • Swingset nano=kernel • Order of message delivery among the vats in the swingset is deterministic. • Object in one vat can effectively hold the capability to an object in another vat. • The Vat is unit of portability and migration. With the capabilities. • The logic should be completely independent on what chain its running on.
Further: Object-oriented message passing, along with encapsulation and polymorphism, enables modular programming. Adding this property to an object system transforms it into a capability system. In a capability system, only connectivity begets connectivity. In a capability system, an object’s authority to affect the world outside itself is determined solely by what references it holds, since the only way the object can cause an external effect is to send a message via one of these references. Consequently, the mechanics of reference-passing determine how authority can change over time.
Agoric software is a method of structuring software in such a way that it is possible to verify the correctness of components of it. It is one of several possible models for concurrent computing, but it was originally created to address the problem of how to write secure software and has since been extended to create usable concurrent programs that are a bit simpler than the multi-threaded programs that are common in current usage. The secret data store and the computational clients would be part of a secure computation protocol, and the secure computation protocol would execute the secret computation, which means the computation that the computational clients wanted to do, but it would only return the answer that the secret data store produced, since that's the one they asked for.
Any secure system of electronic rights must solve at least three problems: • How to represent who currently has what rights. • How to enable rights holders to exercise those rights they have, and no more. • How to enable rights holders to securely transfer these rights. The static reference relationships among objects exactly represent who currently has what rights
Commerce is a rich set of market interactions that emerge when territory and abilities are abstracted into “rights”, and a rich set of arrangements that emerge for the mutually acceptable transfer of these rights. For large scale electronic commerce, we should concern ourselves with those rights which are both representable electronically and enforceable electronically, and with mutually enforceable arrangements for their transfer. These instruments represent the discovery of many new kinds of rights, and ways of deriving these rights from more primitive rights.
Vat A Solo Machine sending it as an object message serialization CapTP then serialize blob – IBC -> Message recognized as legitimate IBC – Unserialization object message delivered to the pixel. Vat is an island of synchrony. Vat only interact asynchronously Interact by sending async messages over datapipes that connect one vat to another Over this network of logical machines held together by this secure protocol
Built JS ocaps
- Where the objects are layered on top of the connections and data pipes
- By the cryptography at the data pipe level
- Use the system o secure distributed objects
- Smart Contracts / eRights
- Patterns of objects. Building on a Cosmos Zone. Object Capabilities Language JavaScript can be used to write secure programs.
- The function o makeCounter incr decr o count variable everytime we makeCounter call we get a distinct instance of this.
- The record Object-capabilites (ocaps) Only refs carry causality Reference graph === Access graph Principle of Least Authority (POLA)
“use strict” Javascript has no I/O Pure computational language. I/O provided by the hose. Browser. Solo Server. Embedded. Blockchain. The SES secure ecmascript kernel that we have working today done in collaboration Salesforce is using this today on the browser to support a 5 million developer ecosystem. XS engine from monogal.
Agoric is supporting javascript on blockchain. Working with metamask in the browser. SESify. Secure EcmaScript is essentially javascript. Caja project, Lightning Framework, Metamask. SES for security properties. Jessie Subset. The lightning platform is enforcing that they run in SES. Compose multiple apps together those apps are protected from each other. SES is very compatible. ocaps: Exercise Right, Shared, Opaque, Specific, One-way Distributed Secure Cross-chain Messages Vat level IBC. And the CapTP protocols. Multiple Vats in a single chain. The vats are part of swingset. Vat unit of synchrony Swingset is a unit of determinism. Swingset nano=kernel Order of message delivery among the vats in the swingset is deterministic. Object in one vat can effectively hold the capability to an object in another vat. 2 object references. C-List.
The interface between the vat and nanokernel is a data only interface. The Vat is unit of portability and migration. With the capabilities. The logic should be completely independent on what chain its running on.
Writing Composable Smart Contracts: More reliable, more understandable and more composable. The Smart Contracts, Electronic Rights Layers, distinct from the object layer.
Implements money out of objects. makeMint functional is called it creates a new triple; issuer, mint and ledger. New Distinct currency isolated from each other. The mint has a method called make purse. This is n object table. makePurse Method for Alice makePurse Method for Bob How can Alice buy a ticket from bob for 10 bucks. Withdraw method it creates a new payment purse then updates the ledger to update from Alice’s main to the payment purse then returns that to Alice which Alice then sends to Bob as an argument in a buy message “ I want to buy the ticket for $10” and Bob receives this payment object. Payments Objects. Bob is not paid until Alice does not have access to that money. Money is purely symbolic. Can’t do anything with it other than trade it further. erights: Exclusive, Symbolic, Assay, Fungible, All-or-nothing exchange Until he knows how much units of what currency. To turn the object that Bob has gotten into getting paid: Bob sends Deposit message to his main purse with the payment purse as an argument. The main purse looks up the payment purse in the ledger, if it is in the ledger, and only then is it actually a legitimate purse of this ledger. Can now update the ledger to transfer the 10$ back into bobs main purse. Only when the deposit message acknowledges success, does bob know hes been paid and releases the ticket to Alice. -- erights means the entire taxonomy. Covered Call Option Out of town during the concert. Covered Call Option in out framework. Escrow Exchange These Contracts are generic. The E rights framework the creation of a wide range of derivative instruments, auctions, swaps, turn out not to be specific. And can handle anything. Create the rich composition of contracts. Reflect the richness of commerce in the real world. Bring the world economy online, OCaps, Jessie, !, Contracs as objects Secure EcmaScript ERights <-> Contracts Fully cross-platform, large scale network effect The richness of market phenomena.
Why do I want Blockchains to Interact? There will be Contracts running on the Blockchain manipulating assets, if contracts cannot interact with assets that are else where, then its global villages like a global marketplace. Alice wants to buy ticker from Bob Deposit method, Sends tickets from Bob to Alice Smart Contracts are the exchange of rights Both parties have gotten the rights they thought they were going to get or it doesn’t happen at all. Specification Purse{ method getIssuer() :Issuer; method getBalance() :Assay; method deposit(amount ?