Skip to content

  Spin up a managed Avalanche node cluster in minutes! Learn More.

The Sync Blog

Updates and insights from the Bloq team

« Blog Home

Four Open-Source DeFi Components for Developers

defi open source components

Without open-source, composable “Lego bricks,” DeFi risks becoming the collection of “walled gardens” that most of us got into crypto and open-source to avoid

As it stands today, two norms dominate the space: 

  1. Developers working independently to reinvent the wheel ad infinitum, and
  2. Otherwise technical users who don’t have the basic footing required to “DIY” their way through many important interactions.

But the open-source nature of blockchain makes it easier than ever to create tools and broadcast them for everyone directly on-chain. And with a sufficient open-source toolkit for all to use, the ‘norms’ can shift towards a standard that enables independent developers to build off of each other and users to more effectively navigate the blockchain ecosystem.

So, here are four components from Bloq available on our GitHub that can be incorporated into new or existing DeFi projects, as well as with one another, to build more powerful applications towards a better DeFi standard. 

Address List

Status:  Production ready / Audited / Deployed

The first component is an address list contract. Users can create their own lists of Ethereum addresses for various purposes, for tokens, wallets, contracts, and so on. There are a number of instances where a publicized address list is an important tool. This could include account whitelists for DAO participation or a token sale, ERC-20 tokens approved as collateral for borrowing, a registry of well-audited (secure) smart contracts, and so on. This also represents an address KYC strategy that adheres to the Principle of Least Privilege, in that parties requiring KYC can use existing whitelists without exposing the identity of any already-KYC’d address.

As of this writing, this component has been deployed across Ethereum mainnet and Ropsten/Kovan testnets, as well as Ethereum Classic and xDai mainnet.

Non-Fungible Token Wrapper

Status:  Alpha / Not Deployed / Open for Comment

The next component is the NFT Wrapper. With this wrapper, users can “bundled” any number or amount of ERC-20 tokens into a single NFT. In essence, this represents a verifiable “portfolio” of financial products. While wrapped as a non-fungible token, this enables users to sell or auction multi-token positions on existing NFT marketplaces. There are controls in place that ensure the underlying tokens cannot be sold or moved for a certain period of time, or as long as the NFT is on sale.

Multi-Transfer for ERC-20 Tokens

Status:  Beta / Not Deployed / Out for Audit

Another tool is the multi-transfer contract for ERC-20 tokens, which allows a token holder to send any amount of tokens to any number of addresses in a single transaction using a merkle tree of (address, token amount) pairs. Claimants sign a message to verify wallet ownership to receive their tokens. This can be bundled on top of any existing ERC-20 token, DeFi or otherwise.

AMM Price Oracle

Status:  Beta / Not Deployed / Open for Comment

Finally, we’ve published a price oracle for Uniswap and Balancer liquidity pools. This enables an easy-to-integrate, resilient price feed that other DeFi contracts can integrate or interact with in a permissionless manner. 

Each of the “Lego bricks” outlined above are modular tools that can be used by other developers to build out their own products. These contracts represent the foundation of an open-source DeFi toolkit. This greatly improves the standard for security, as auditing becomes much easier and laymen can better follow contracts when they integrate the same, secure components.

Vesper and other projects in the Bloq ecosystem will be taking advantage of these components, and we encourage all other developers to work with them, too. Start building with these and let us know by tagging us at @bloqinc on Twitter. Also, sign up for the Bloq platform to start building your DeFi application. (Here is a DeFi tutorial to get started, plus our entire set of how-to lessons.)

UPDATE: 2020-11-19-2145ET: Here are these four components described in a video delivered at Avalanche’s MoneyDance conference earlier this week:

Join the Bloq newsletter for the latest updates

This field is for validation purposes and should be left unchanged.