Agoric Alpha: The Future of DeFi Starts with Composable Building Blocks
Decentralized Finance (DeFi) is the new frontier of financial services. Like many frontiers, it’s exciting but dangerous. Agoric is building a public blockchain to make it more exciting and less dangerous. Welcome to the first step: the Agoric alpha release.
The Agoric alpha release introduces our smart contract platform. It enables JavaScript developers to get in on DeFi quickly and easily. Our object-based approach to smart contracts enables DeFi legos that are directly reusable. The smart contract framework leapfrogs existing technologies while providing a secure, stable infrastructure. Now developers can build, deploy, and operate sophisticated dApps and DeFi markets. It’s live now, so get started.
Contracts Upon Release
Numerous transaction components — what we think of as DeFi legos — are already available in the Agoric contracts repository, including:
- Fungible and non-fungible tokens
- Atomic swap
- Covered call
- Simple exchange
- Automated market maker (“autoswap”)
In the coming months, we will be growing this collection with the help of you and the rest of our community.
Smart Contract Code Sample: Call Option
As an example, the covered call option is the right (with no obligation) to buy digital assets at a predetermined price, called the strike price. This call option is “covered,” meaning that the owner escrowed the digital assets for the call option. Escrow guarantees that the assets can be transferred without relying on the owner to keep their promise. The call option has an expiration date, which is when the opportunity is canceled. The digital assets owner cannot remove the assets from escrow before the expiration date.
const proposal = {
give: { StrikePrice: moola(25) },
want: { Asset: concertTicket("E4") },
exit: { afterDeadline: { deadline: time, timer: myTimer } },
};
This deadline serves as the expiration date for the covered call option. If the option has not been exercised by the deadline, as specified in the above code example, its underlying assets are paid out to the contract’s creator as a refund of their escrowed assets.
Developer Experience
Agoric is a team of engineers. We’ve based our developer experience on our decades of open-source software experience. In our alpha, you can expect the following.
- VS Code with debugging support
- Ability to build and test locally
- Types included to accelerate your local development
- Rapid testing iteration with the Ava test infrastructure
Path to Mainnet
We’re now at alpha, which provides DeFi developers with their first taste of a radically better environment to build financial legos.
On to beta! We next leverage the smart contract platform to build the market institutions for our rich crypto economy, including voting, AMMs, and a stablecoin integrated with staking. Those same components will be available for reuse by DeFi dApp developers.
Finally MainNet! In 2021. Subscribe to our newsletter for release timing, video coding sessions, how-to articles, and more.