An Introduction to Agoric

TicoJohnny
7 min readJun 28, 2021

Two weeks ago, the community got the chance to have a one on one (community) with the CEO of Agoric, Dean Tribble on Reddit at the Community Interview. We learned alot about the Agoric team ethos, their novel developments, and why JavaScript in Cosmos is so exciting.

Background

Dean Tribble has been the CEO of Agoric for almost three and a half years. Before starting Agoric, Dean had a strong background leading software projects. He worked at VerifyValid as a CTO for almost a decade, spent a couple years at Deluxe Corporation and before that he worked as a Principle Architect at Microsoft, working there for nine and a half years.

Agoric is a robust architecture for building secure smart contracts based in JavaScript for maximum reach. Agoric empowers developers to execute transactions, establish new markets, and craft novel exchanges — all without centralized control. Agoric uses an object-capability (ocap) security architecture, in which access to a programming object itself is the authority to use the object. All kinds of digital assets can be easily created, but importantly, they can be transferred in exactly the same ways, with exactly the same security properties.

Agoric is committed to making strong security easier to achieve. Creating secure smart contracts using today’s technology is inherently difficult. That difficulty has limited both the number of applications created, and the number of programmers qualified to create them. We are developing an open, JavaScript-based, object-capability (ocap) programming layer to address both issues. The Agoric ocap layer will include robust security properties beyond anything available today, and it will provide that security across substrates, from local machines to global blockchains.

Why Cosmos

Dean explains that Agoric’s VM is technically consensus-agnostic and early on they contemplated launching on a different platform. He goes on to say that, “Our view of the world has always been “islands of synchronous transactions in a world of loosely-coupled async communication”. That aligns well with the architecture and ethos of Cosmos. After a few conversations with the core Cosmos team it became clear that their ethos of loosely coupled sovereign chains was very aligned with ours. The IBC protocol was designed in part based on previous work from the Agoric team, and so you could say that we like it :). We believe in a multichain world and think IBC connectivity will be critical to this ecosystem evolving. With the coming Gravity DEX, I think that’s going to ramp up sooner than most people think.”

The JavaScript Advantage

According to the Developer Economics, 12.4 million developers were using JavaScript in 2020. Just about 53% of the world’s developers have JavaScript experience. According to the 2016 Stack Overflow Developer Survey, “JavaScript is the most commonly used programming language on earth. Even Back-end developers are more likely to use it than any other language.”

Agoric being launched as a JavaScript Smart Contracts focused chain in the Cosmos Ecosystem is particularly interesting because of how adopted JavaScript is as a programming language. It is worth nothing that if any JavaScript developers are used to existing frameworks like React, the transition could be quite easy, Dean explains that, “If we want to get a lot of the world cooperating better via smart contracts, we have to enable those world’s developers to build them. And that just works better to meet them where they are at. We believe that we will be able to bring in many more external developers as a result. If they have used a framework like React, then learning the framework should be straightforward. So I think they could produce credible code in a week or two. Something that was a combination of using existing components, etc. might take a few weeks.”

Conversion from Solidity

It’s also an important factor to consider just how many people are writing up code in Solidity, Dean expects to draw in some folks from the Solidity community with just the ease of use of JavaScript, with respect to, “Solidity developers, our friends at Summa (now Celo) noted that writing contracts in JS was about 4x faster than Solidity, even before taking into account the support our contract framework provides. I do expect to draw some Solidity programmers. With the connectivity from IBC and Gravity bridge, I expect a few Solidity projects to reproduce their business on our chain: it will be easier to innovate, and run faster/cheaper, while still being connected to their initial customer base.”

Userbase and Token Incentives

With such a new platform, you might wonder how Agoric intends to draw a user base or create incentives to bring developers and customers to the network. Dean explains it rather well, “On the native demand side for developers, the JavaScript draw is big. The number of Solidity developers in the world is around 10,000 according to Electric Capital. By comparison JavaScript has 10M+ developers with an active community, many of whom are interested in building DeFi products but haven’t been able to contribute yet. We do have a portion of our staking tokens set aside for liquidity incentives and early developer incentives, but we haven’t yet released any details on where those will be targeted. A good bet is the Cosmos community and broader Defi ecosystems.”

Cross Browser Compatibility

Some users might be concerned knowing that JavaScript is knowing to have some cross-browser compatibility issues. It might be relieveing to know that the Agoric team is aware and are building with this knowledge. Dean explains that, “Primarily this is not an issue for the chain because we use specific JS engines on the chain. We will be using NodeJS (V8 runtime) and the XS runtime (from Moddable). Both are modern, standards-compliant JS engines. XS is specialized for small memory footprint, high-reliability, and embedded systems. JavaScript at this point is incredibly consistent across browsers. The JS standards committee and all the implementers have done an amazing job on that. Remaining compat[ability] issues are minor ones and likely in the DOM.

Who Benefits from Agoric

There are many industries that will benefit from Agoric, as far as developing on Agoric, Dean explains that, “Certainly “experienced programmers” is our focus first (which includes student hackers!) . With the additional features like offer-safety, ability to program with standard tools like VSCode, etc. our system will certainly be more welcoming to new developers. But the focus is entrepreneurial devs with relevant experience (e.g., fintech) and an eagerness to build and deploy something fast.”

Security

Some developers believe that JavaScript is not secure enough to be used as a language for writing out Smart Contracts. However, according to Dean, “JavaScript starts out malleable; any part of the program can change who e.g., array iteration works. As an accident of history, JS is actually more securable than most other languages. Our Chief Scientist, Mark Miller, and others have driven into the language standard the key features that enable us to lock down the JS environment so that we have the kind of user-mode/system-mode separation that secure operating systems require. We use that to enable execution of arbitrary JS code (e.g., 3rd party contracts) safely in confined boxes where they can’t escape and break things. That tech is used in Salesforce’s AppExchange, the next generation of extensible MetaMask wallets, and of course, our smart contracts.”

What’s holding the most popular language in the world back from blockchain?

To follow up on the security of Agoric, the community asked why we don’t see JavaScript in blockchain already. Dean explains that, “It MUST be locked down so that one library cannot change the meaning of basic system components like Arrays. And it MUST be deterministic. We address both of those (e;.g., by stubbing Math.random and Date.now before locking the intrinsics down with our SES and endo components). And we are the only JavaScript tech that does that. We have designed so that we can support WASM in the future (Mark helped with the initial architecture and security of WASM), but that’s not this year. A general note for compiled languages: there’s an intrinsic vulnerability when the programmer writes in one language/model (e.g., Rust) and the system executes a different model (e.g., wasm or EVM). So we like that the language semantics we execute are what the programmer actually wrote.”

How To Get Involved

There’s a lot of ways to get involved with Agoric, you should definitely check out the resources at the bottom of this article. Dean adds,

“If you want to come build on us:

  1. Check out our Beta for an early glimpse of our Treasury
  2. Join our Discord to connect with us on what you’re building. The development and product team (and I) are there to help
  3. Keep your eyes peeled for developer bounties being posted soon”

Learn more about Agoric

📑 Documentation

💌 Contacts

Official WebsiteGithubTwitterTelegramDiscord

--

--