How and Why to Self-Integrate Dai into Decentralized Apps

23 April 2020

As the most used cryptocurrency in the decentralized finance (DeFi) space, the Dai stablecoin has been integrated into an entire ecosystem of projects. Behind Dai is the Maker Protocol, an arrangement of smart contracts built on the Ethereum blockchain. The Protocol is the infrastructure for the decentralized, self-governed MakerDAO. Currently, over 600 projects have integrated Dai into their apps, many without Maker’s help. As the DeFi movement continues to gain traction, and as users learn the ease of self-integrating Dai into their products and services, that number will grow. 

Why Integrate Dai Into Decentralized Apps?

Dai fits the ethos of many blockchain projects: it’s decentralized, open-source, composable, and more. 

Dai Is Decentralized, Governed by the Maker Community

The Dai stablecoin is generated and controlled by users, not a central party. Anyone, anywhere can generate Dai by depositing collateral into a Maker Vault or buy Dai on an exchange, and then use the token in a number of ways, including for repayment of debt, cross-border transactions, payment for goods and services, and to earn the Dai Savings Rate (DSR) on the Dai they hold.

Dai is Open-source and Easy to Integrate

Dai code is open-source—free and available to all. “No one needs permission or assistance to integrate Dai into their dapps,” says Greg Diprisco, Head of Business Development at the Maker Foundation. “If you’re a smart contract developer, integration is very easy. For entrepreneurs who are not developers, it can be more complex, which is why Maker provides a wide range of developer guides on its Github pages, as well as more user-friendly documentation and tutorials.”* 

Composability Enables Rapid Innovation and Bottom-up Growth

The Maker Protocol yields composability, a feature of its design wherein the various components of the system can be easily connected to form any number of satisfying results. Think of composability like Lego blocks that allow developers to build on Maker to create new dapps on top of existing dapps quickly. Thanks to composability, developers can integrate Dai and other Maker Protocol features, including the Dai Savings Rate (DSR), which lets users earn on their Dai holdings. The more integrations there are, the more engaged the Maker community becomes and the more DAI liquidity grows.

Dai Integration can Provide a Unit of Account and a Shared Economy

As a decentralized digital asset soft-pegged to the US Dollar, Dai is often used as the unit of account in a dapp. For example, Augur will integrate Dai as part of its system overhaul launching in June. A predictive market dapp built on Ethereum, Augur provides a way for people to place bets on all sorts of events. 

For some projects, including those part of the Dai Gaming Initiative, Dai integration provides a shared infrastructure that might not have existed previously. “When you integrate Dai into a blockchain game application, such as Forgotten Artifacts, you're not just integrating a currency, you’re integrating an entire economy,” says Diprisco. “Some game developers create parallel digital universes. While they'd like to have an in-game economy, it's a very complicated undertaking. It would be like if the U.S. economy was limited to simply passing dollar bills back and forth,” he explains, “with no banks, investments, no markets outside of simple exchanges of goods. But by using Dai, they get the entire DeFi ecosystem, which provides a shared economy to plug into.”

Dai is integrated into the popular game Forgotten Artifacts (Video created by Simon Kertonegro, CEO of Reeward.io.) 

Start integrating Dai

To integrate Dai into their projects, developers and others can refer to Maker’s Dai Token Guide on Github. Additional resources on the page will help developers gain a better understanding of the Dai token contract and its functionality before tackling the integration process. 

Guides for integrating other features of the Maker Protocol, including the Dai Savings Rate, into applications for a broader range of use cases are available on Maker’s Github Library.

Finally, in addition to sourcing Maker’s Github documentation, developers can use the  Dai JavaScript Library (dai.js) to integrate Maker technology into their JavaScript-compatible front end web pages.

Maker’s extensive developer library on GitHub helps developers integrate Dai into their decentralized apps.
Maker provides user-friendly documentation and tutorials, as well as a wide range of developer guides on its Github pages.

How Dai Integration Helps Expand the DeFi Ecosystem

Like money in general, Dai’s usefulness depends on wide distribution. “Global acceptance of Dai is a necessity,” says Diprisco. “Global acceptance means taking baby steps and allowing the ecosystem to continue to grow with more partners and use cases.”

As Dai use cases and benefits increase, so, too, does user confidence, which contributes to Dai integration, adoption, and growth. This concept is known as Network Effect. The more projects that integrate Dai, the more people are exposed to it, and the more it’s valued. In addition, the dapps that integrate Dai pave the way for the other layers of solutions, providing end users more options and variety. 

By sourcing Maker’s developer documentation and tutorials, anyone can harness Dai in their projects with no (or very little) help from Maker. To learn more about self-integrating Dai, check out Maker’s Developer Library and the Maker Ecosystem page

* Some Maker documentation includes old terminology (e.g., Collateralized Debt Position, or CDP, instead of Maker Vault). New terminology was introduced in November 2019. Learn more here.

23 April 2020