Issue #1 - Agoric
Blockchain-based smart contracts now power a variety of decentralized applications; however, they are still far from trustless with over $1.53B lost in DeFi exploits since the start of 2022. These breaches of trust will continue to limit user engagement in DeFi and the ability of key counterparties like insurers to underwrite smart contract risk.
A more secure and accessible smart contract language is key to real-world adoption of blockchain-based smart contracts and decentralized applications. From our diligence, we have identified two leading blockchain businesses solving this problem. The first is Agoric, which we will cover here in detail first given its upcoming token unlock on July 1, and the second is Mysten Labs, which we will cover in a later issue.
Credits: Platoon Digital thanks the Agoric team as well as Zooko Wilcox (Zcash), Dan Finlay (MetaMask), Ric Shreves (Decentralized Cooperation Foundation), Jason Potts (RMIT Blockchain), Joseph Ziolkowski (RELM), and Sam Blackshear (Mysten Labs) for their input. To be clear, the views expressed in this publication are those of the author alone and do not purport to reflect those of the Agoric team or any other individuals named in the credits.
Agoric’s product is infrastructure serving developers building smart contract applications. Its competitive edge stems from programmability, safety, composability, and interoperability.
Composability: The Agoric platform is composable-by-design, offering ready-made smart contract templates that are audited, battle-tested, and easy to import from day one. This should save developers time by eliminating the need to recreate basic applications like DEXs, OTC desks, and NFT marketplaces.
Interoperability: Integration with the Inter-blockchain Communication Protocol (IBC) means all IBC-compatible chains can interface with Agoric smart contracts. That includes 47 active zones settling ~121k daily transactions and ~$30M in daily volume . Meanwhile, integration with Gravity Bridge means ETH can be locked into a smart contract and moved over to the Agoric environment. The recent migration to Cosmos by dYdX is a strong testament to the Cosmos/IBC ecosystem.
Team: Agoric boasts a team of unparalleled smart contract visionaries led by Mark Miller and Dean Tribble. Many of the core team members have likewise worked for decades on secure distributed computing and smart contracts.
History: Agoric co-founder Mark Miller joined Project Xanadu in 1979 in the hopes of realizing distributed, censorship-resistant web publishing. He moved to Xerox PARC shortly thereafter and met Agoric co-founder Dean Tribble, with whom he collaborated on secure distributed programming languages and operating systems. Mark also co-authored “The Agoric Papers,” a set of three essays applying insights from Austrian economics on property rights to the distributed coordination of software systems .
Xanadu was on the verge of collapse that same year when it suddenly received a lifeline: Autodesk invested millions into Xanadu and its sister project, the American Information Exchange (AMIX). Mark and Dean joined “XanAMIX” along with three other current Agoric team members—Bill Tulloh, Chip Morningstar, and Chris Hibbert. While there, Dean helped design the first production smart contract.
Following the eventual collapse of Xanadu/AMIX in 1994, Mark and the others co-founded Agorics, Inc., where they applied their expertise in agoric systems to e-commerce—most notably to help IBM develop eCheck servers for BankBoston and NationsBank , .
At the time, Agorics shared office space with a consulting firm called Electric Communities (EC) that was co-founded by Doug Crockford and two former AMIX employees—Chip Morningstar and Randall Farmer. The trio subcontracted a Fujitsu deal to Dean and then Agorics.
Dean and others at Agorics drew on the work at PARC to create the “Joule” programming language . When Mark joined EC in 1996, he extended Chip’s work on the Original-E programming language with his and Dean’s work on Joule to create the E programming language—now a relatively well-known, object-oriented superset of Java for writing secure/distributed AMIX-like smart contracts. The E language was young and yet mature enough to support EC Habitats—an early “Metaverse” .
Around the same time, Brian Warner (Engineering Lead at Agoric) and Zooko Wilcox (CEO of ECC) were collaborating on a secure, distributed file storage system called Tahoe LAFS with guidance from Dean Tribble . At the behest of Zooko and with seed funding from ECC, Mark and Dean eventually co-founded Agoric in 2015. Hardened JS is derived from Mark’s work on Google’s Caja project and Salesforce’s Locker Service.
Advisors: There are four economics advisors from RMIT University—Jason Potts, Joseph Clark, Sinclair Davidson, and Chris Berg—who authored Understanding the Blockchain Economy. Additional advisors include Zaki Manian (head of development at Cosmos, advisor to the Electronic Coin Company), Brendan Eich (creator of JS), Zooko Wilcox (co-founder of Zcash), and Naval Ravikant. The team received early input from Dan Robinson (Paradigm/Uniswap), James Prestwich (Nomad), Sunny Aggarwal (Osmosis Labs), and Ethan Buchman (creator of Cosmos Tendermint) .
Investors: Electric Coin Company’s two primary investments are Agoric and Starkware. The Interchain Foundation is one of many well-known investors on the cap table and strengthens Agoric’s positioning within the Cosmos ecosystem. The Agoric team has demonstrated an ability to raise capital with $85M raised to date, consisting of $32M in Nov. 2021 when its PoS base layer went live and 70M BLD ($50M) sold in <2 hours via CoinList on Dec. 29, 2021. The event drew >759,000 unique registrants of which only 48,000 were able to participate.
Source: Platoon Digital.
User-defined contracts: User-defined smart contracts can reuse various smart contract components pertaining to governance, staking/staking derivatives, and cryptoeconomics. The Inter Protocol is the primary example - more later.
Dependencies: JS developers rely on potentially vulnerable third-party code. According to NPM, only 3% of code in modern JS apps is application-specific; the rest is imported from third-party libraries. This is dangerous in a web3 environment where that code may access digital assets or wallets . While Hardened JS cannot entirely prevent attackers from injecting malicious code into dependencies, it can limit the capabilities of that code after the fact.
Reentrancy: Agoric solves reentrancy attacks, which are endemic to the EVM . The infamous “DAO Hack” placed reentrancy attacks in the spotlight, and there are many more recent examples such as the $80M Rari Capital exploit. Agoric’s Lead Engineer, Brian Warner, highlighted the problem in his 2015 security review of Ethereum before it went live and cited Mark Miller’s thesis , .
Cosmos-SDK: Agoric VM is integrated into the Cosmos SDK—a generalized open-source framework for building application-specific blockchains on top of Tendermint Core.
Tendermint Core: Tendermint is a PoS consensus algorithm that supports virtual machines written in any programming language—including Hardened JS—and replicates them onto computers across the globe . Tendermint PoS is characterized by fast finality (~7 seconds) and low execution costs (~$0.01 per transaction) .
Inter-blockchain Communication (IBC) protocol: IBC links together Tendermint Core-powered blockchains across the Cosmos ecosystem. Interchain GmbH started designing IBC in 2019 with close collaboration from team members at Agoric and Informal Systems. Agoric is now one of four members of the IBC working group along with Tendermint, Interchain Foundation, and Informal Systems.
The Agoric team demonstrates a relentless commitment to security. To date, two audits are public—a MetaMask audit of Hardened JS and a three-part Informal Systems audit of Agoric VM. In the coming months, Agoric will publish additional audits of ERTP, Zoe, the Inter Protocol, and the Agoric Smart Wallet. Additionally, Agoric’s HackerOne bug bounty program offers rewards for issues surfaced in Hardened JS, ERTP, Zoe, Swap, and the Vaults/Reserve.
Token Model: There are two native tokens, BLD and IST, which serve complementary functions. The former is staked to secure the network while the latter is a means of payment for scaling the ecosystem.
BLD is the native staking token of the Agoric blockchain.
Staking: Agoric validators contribute to network security by staking BLD and processing transactions. In return, they earn IST-denominated fees and BLD-denominated subsidies.
Slashing: This approach encourages validators to play by the rules or else lose capital and forego future BLD and IST rewards.
Delegating: BLD holders can delegate their BLD to validators for a 3-10% commission.
Governance: BLD holders that stake or delegate BLD are entitled to governance rights over a variety of activities such as direct token votes on initiatives and election of committees to manage critical infrastructure like the Inter Protocol .
IST is a local currency that targets USD-parity with the support of overcollateralization and a native automated market maker (AMM). IST is unbundled from BLD since paying for services with a speculative asset (e.g., ETH) is like paying rent with Apple or Google shares. It draws on MakerDao’s successful risk management model.
Vaults: Anyone can borrow IST against eligible collateral (e.g., BLD, staked BLD, ATOM, OSMO) subject to a collateral factor. Depositors must repay the principal plus interest and an origination fee to withdraw their collateral. At any point if the collateral value drops below the liquidation threshold, the Inter Protocol will automatically sell off the collateral at a discount to cover the outstanding debt. The Inter Protocol will then extract a liquidation fee and return any remaining funds to the borrower. The native AMM ensures that there is sufficient market depth to liquidate user vaults.
Parity Stability Module (PSM): Anyone can exchange high-quality stablecoins like USDC for newly-minted IST. This is an alternative to minting IST through a vault and serves as a cheap and timely arbitrage opportunity whenever IST breaks parity with the US dollar .
BLD Boost: BLD stakers can borrow IST against their future BLD staking rewards, allowing them to participate in the Agoric economy while still securing the chain. Boosted BLD continues to earn staking rewards without risk of liquidation, but neither the collateral nor the staking rewards can be withdrawn until the debt is repaid plus interest and origination fees.
Swap: Swap is the native AMM and DEX that facilitates the trading of assets launched on Agoric or bridged over to Agoric via Gravity Bridge, an IBC-compatible Ethereum-to-Cosmos bridge. Swap is the centerpiece of the Agoric economy and the primary source of liquidity for BLD and IST.
Inter Protocol Reserve: The reserve ensures that there is a minimum level of liquidity for vault liquidations on Swap and protects the IST Protocol from fluctuations in collateral value by covering shortfalls in Vault liquidation. The Reserve holds user-provided collateral in vaults, execution fees in IST from the Agoric chain, and liquidation penalty fees paid by vault-users.
Leading up to the first BLD unlock event on July 1, the Agoric community will elect the initial Inter Protocol Economic Committee, vote on initial staking rewards parameters, and activate staking rewards on the network. The Inter Protocol and IST are expected to launch sometime later in Q3 2022 with authorization from governance .
Issuance Schedule: In December 2020, Agoric’s Token Generation Event (TGE) distributed 1B BLD to shareholders. The maximum long-term BLD supply was set at 1.25B with an additional 250M BLD to be issued over 3 years as staking rewards. However, there is currently support for a proposal to activate staking rewards with initial BLD issuance at 5% per year to incentivize validators securing the network .
Vesting Schedule: There are 475M BLD unlocked at present of which 170M is allocated to “network decentralization,” 100M to the DCF, 55M to the “community & ecosystem,” 125M to “operations,” and 25M undisclosed. The remaining 525M BLD are temporarily locked in vesting contracts and hence non-transferable; however, they can be delegated and will accrue BLD once governance activates staking rewards. It is unclear whether early insiders with BLD locked in vesting contracts can make use of BLD Boost.
Source: Platoon Digital
BLDer DAO: BLD holders are entitled to governance rights over simple parameter updates but also more complex decisions that might require validators coordinating on software updates . Notably, BLDer DAO elects the Economic Committee that sets collateralization ratios and liquidation penalties. Agoric is partnering with Gauntlet for risk management modeling and simulations for Inter Protocol debt limits and collateralization ratios. Gauntlet will also supply its modeling to the Economic Committee that will actively manage key Inter Protocol parameters.
Agoric Systems Operating Company (OpCo): The Agoric OpCo is a Delaware Corporation with branches in California, Washington, and New Jersey. The Agoric OpCo holds 125M BLD of which it seems to delegate 34.50M BLD and intends to delegate an additional 65.50M BLD pursuant to its Validator Delegation Program .
Decentralized Cooperation Foundation (DCF): The DCF is an independent non-profit foundation incorporated in the Cayman Islands (May 2022). The DCF’s President, Ric Shreves, is former Director of Emerging Technology at Mercy Corps and a representative to the Diem Association’s Board and Technical Steering Committee. He is joined by a 5-member board that includes Dean Tribble, Zaki Manian, Jason Potts, and 2 others TBD. Agoric OpCo bootstrapped DCF with 100M BLD to support decentralization in the Agoric ecosystem and eventually Cosmos more broadly. DCF is currently delayed on making its delegations but intends to delegate 50M BLD. It will rebalance delegations frequently and help craft incentive campaigns for liquidity providers and developers .
Bootstrap/ECC: ECC is a subsidiary of a 501(c)3 called Bootstrap that holds 42.60M BLD.
Smart Contract TAM unlock: According to research by Chainlink Labs, smart contract TAM is in the hundreds of trillions . To date, however, there have been several barriers to adoption including security and programmability. We believe Agoric’s robust design elevates smart contract standards to an institutional grade and will help catalyze new areas of decentralized application development. For example, the Agoric team is working to create regulatory-compliant smart contract insurance products. These products would be the first of their kind, opening insurance distribution beyond niche markets to more traditional broker channels.
Value Capture: From the outset, one of Agoric’s main goals was to become the default stablecoin for IBC-compatible chains. The recent LUNA/UST collapse only makes that more likely, and we expect the launch of the Inter Protocol to grease the wheels of interchain commerce and create a structural onramp for Agoric’s long term growth. Adoption of IST will directly benefit BLD token holders who capture the economic value that flows through products built using Zoe, as that value is mostly in IST, IST is minted from vaults, and BLD holders earn IST rewards from vault fees. This is all the more likely since Agoric has pre-written and battle-tested a number of templates for decentralized applications that run on top of Zoe, e.g., an OTC desk, an NFT marketplace, or a decentralized exchange. These templates help programmers accelerate application development and generate fees that ultimately reward BLD token stakeholders.
Competitive Risk: Hardened JS is one of several dedicated smart contract programming languages promising safer smart contract programming. One of these languages, Move, was designed as part of Facebook’s digital currency initiative, Libra/Diem . The Move language might be more attractive to developers since Hardened JS—like Rust—is not a “smart contract language” per se. Instead, key features (e.g., digital assets, addresses, gas metering, and transactional semantics) are supported through a platform-specific library called Zoe and a platform-specific runtime layered on top of Hardened JS, which leads to a few unfortunate consequences:
The Hardened JS smart contract community may struggle to scale beyond the Agoric developer community due to the difficulty of writing cross-platform smart contracts. There are only two options for developers wanting to write smart contracts in Hardened JS on other blockchains: either (a) use the Zoe and Agoric runtime or (b) write a Zoe-like smart contract library from scratch, as well as a new runtime. The first scenario is unattractive since the alternative platform will inherit most of Agoric’s design choices and limitations; the latter scenario is unattractive because smart contract code that uses Zoe will be incompatible with smart contracts on the alternative platform.
Cosmos Disappoints: Agoric has hitched its wagon to the Cosmos ecosystem, which may fall short of expectations. Recent feuds and turnover at Tendermint might be a leading indicator of such trouble .
Regulatory Uncertainty: Stablecoin regulations are on the horizon and it is unclear how they will affect the Inter Protocol and DeFi more broadly.
Today more than 7,000 languages are spoken globally, and likewise, developers write code in many different languages—albeit some more than others. As with Move and Solidity, we believe Hardened JS will play a meaningful role in the maturation of web3. The Agoric team is world-class, and we are excited to continue following their ecosystem as it evolves.
Last Update: 7/1/2022 (Version 1.1)
According to Dean Tribble, offer-safety removes 80-90% of common smart contract bugs entirely, including reentrancy, stuck funds, and confused deputy/ERC-20 approval problems. This is more-or-less an analogy to the way that memory-safe programming languages (e.g., Python, Java, JS, Go, or Rust) remove 70-80% of security vulnerabilities present in programming languages like C (e.g., “Use-After-Free”) , . Dan Connolly clarified that this figure is a generalization from Dean’s 30 years of production work on smart contracts but also notes that it is consistent with Agoric’s occasional smart contract bug reviews. Zoe does not address all smart contract bugs. In an auction contract, offer-safety does not prevent a buggy contract from awarding the item to the wrong bidder (or to no bidder). In an AMM, offer-safety does not ensure that liquidity tokens can be redeemed for any specific item at a later point in time.