Komodo is pleased to announce that we will soon offer a stablecoin technology, allowing developers and users in the Komodo ecosystem to create blockchain-based economic ecosystems that behave with a more user-friendly level of financial stability.
Note: Since this blog post was originally published, "Modules" have been renamed to "Contracts" and "Antara Framework" has been renamed to "Komodo Custom Contracts." However, both might still be referenced by their original names in other blog posts or in the developer documentation.
In the blockchain industry, the term "stablecoin" refers to a cryptocurrency with a financial value that is "pegged" to another currency, such as the US Dollar. Stablecoins allow users to buy, sell, and trade blockchain assets that mimic the prices of government-issued currencies.
Komodo is pleased to announce that we will soon offer a stablecoin technology, allowing developers and users in the Komodo Platform ecosystem to create blockchain-based economic ecosystems that behave with a more user-friendly level of financial stability.
The technology is still in alpha testing and development will continue throughout 2020. The new stablecoin solution will allow the value of a blockchain-based asset to be pegged to not just any government-issued currency, but also to any real-world asset, such as a currency, stock, commodity, or precious metal. In addition, stablecoins created within the Komodo ecosystem are backed by cryptocurrency collateral and issued by a blockchain, without any third-parties or intermediaries facilitating the deal. Each business that builds a stablecoin solution with Komodo's technology can choose exactly which digital currencies they would like to accept as collateral.
Stablecoins Are a Solution to Market Volatility
The financial values of many coins and tokens in the cryptocurrency industry are often volatile, and this can be a problem for both a blockchain entrepreneur attempting to create a business, and for the entrepreneur’s intended user audience. Economic volatility creates uncertainty, and this may discourage user growth. Users often appreciate the option to avoid market volatility by relying on stablecoins.
Challenges of Crypto Payments
Consider the challenge for an entrepreneur and one of their users when creating a new product. A new user will often start with their currency held in a common and stable format, such as the USD, EUR, or JPY. The user must then transfer that value through one or more cryptocurrencies such as Bitcoin or Ethereum in order to make a purchase.
From this point forward, the value of the user’s initial sum of funds can be unstable. In the cryptocurrency industry, a drop in value of 50% or more is not an uncommon experience for most currencies. This puts pressure on the user to perform their purchase of the entrepreneur’s product as rapidly as possible, and to generally avoid blockchain technology when feasible.
From the entrepreneur’s point of view, not only do they have the challenge of persuading their user to enter the cryptocurrency market, but they also have the difficulty of deciding whether to base their prices on cryptocurrency rates or fiat-currency rates.
If the entrepreneur sets their price according to a determined amount of cryptocurrency, a drop in that currency’s value could mean that the entrepreneur will receive far less value than what they need to maintain a steady business.
Alternatively, if the entrepreneur sets the price according to a fiat currency, yet requests that the user pay in a cryptocurrency, this can cause the user to hesitate to make a purchase, as the user is never certain of the right time to transfer their stable fiat value into a cryptocurrency format.
Many would-be successful entrepreneurs in the industry have seen their results frustrated by such challenges.
Eliminating Volatility With Stablecoins
This is where stablecoins can provide an entrepreneur with relief. A user can transfer money directly from their familiar fiat currency to the blockchain-based stablecoin with few fees or other costs.
From this point forward, the user does not need to worry about the effective value of their currency relative to the currencies with which they are familiar. Likewise, the entrepreneur can accept payments in the stablecoin’s currency, allowing the entrepreneur to set prices that are based on a blockchain value, and thus tied easily to their blockchain product, without introducing instability into their business models and forecasts.
Komodo’s Solution: Prices and Pegs
Komodo’s stablecoin technology comes as a pair of new Komodo Custom Contracts: the Pegs contract and the Prices contract. These two contracts take advantage of several other UTXO smart contracts, including Oracles, Gateways, and Tokens. Together, the contract allow for users and entrepreneurs to work together to maintain a blockchain-based stablecoin.
The Prices Contract
True to its name, the Prices contract serves the primary function of watching the price of an external asset and providing this data to a Smart Chain for blockchain-based enforcement.
The Prices Contract is able to connect to several online application programming interfaces (APIs). The contract can request and record data about current exchange rates associated with these APIs’ resources, then transform that data into meta-data that is housed on a Komodo Smart Chain. This allows other Komodo Custom Contracts, such as Pegs, to enforce blockchain activity based on the meta-data.
The Prices Contract relies on the Oracles Contract for some of this functionality, as the Oracles contract is responsible for viewing data in the real world and transferring this data into a blockchain format - hence the mythological name, “oracle."
The Pegs Contract
With the Prices Contract providing data, the Pegs Contract is able to manage and enforce the rate of exchange between any Bitcoin-protocol based cryptocurrency and a stablecoin that is housed on a Komodo Smart Chain. Pegs allows users of a Smart Chain to transfer the value of a cryptocurrency such as Bitcoin itself, or Komodo’s own KMD, into a stablecoin that is governed by the Smart Chain’s decentralized network.
The key aspect of Pegs is that it is able to manage a collateralized debt/loan system. Users can lock funds to the Pegs Contract, and the Pegs Contract allows them to withdraw stablecoins, which they can then exchange for other digital assets.
The Pegs Contract relies on the Oracles, Gateway, Tokens, and Prices Contract to make stablecoin features available.
As a small aside, the complementary nature of these contracts demonstrates how Komodo Custom Contracts are capable of serving as modular and composable components that work together to accomplish complex tasks which would otherwise be extremely difficult to achieve with decentralized software.
A Collateralized Debt/Loan System
A primary function of the Pegs Contract is to facilitate a collateralized debt/loan economic system.
A Pegs Stablecoin Ecosystem
The stablecoin’s network typically expects at least two types of users. The first are those who provide collateral in the form of a digital currency, which is then locked, and mint the stablecoin in the form of a decentralized loan. The second type of users are those who do not lock their funds into collateralized loans, but utilize the stablecoin through ordinary trades and swaps.
Stablecoins for Collateralized Loans
The first type of users create the initial supply of stablecoins. These users deposit any amount of a Bitcoin-protocol based cryptocurrency into the Pegs Contract, which holds these funds as collateral in a secure multi-signature wallet. The depositing users then exchange these locked funds for stablecoins, according to current exchange rates.
There is an important detail here. The users cannot withdraw the full amount of their collateral deposit. Rather, they must leave a portion of these funds locked in the Pegs Contract against market volatility. To be precise, users can only withdraw up to 90 percent of the value of their locked assets in the form of the stablecoin.
If the value of the deposited Bitcoin-protocol based cryptocurrency increases in value relative to the stablecoin, the depositing users have the option to withdraw additional stablecoins.
Alternatively, if the value of the backing cryptocurrency decreases relative to the stablecoin, depositing users have the option to deposit more assets as collateral, or to return some of the stablecoins they minted in order to keep the value of their loan below the 90 percent threshold.
If a user allows their level of debt to surpass the 90 percent threshold, the Pegs Contract allows other users to step in and purchase the user’s outstanding debt. Depending on the circumstances, the purchasing users can acquire this debt at an immediate profit. All of the indebted user’s locked funds are liquidated in these events. Recall that the indebted user has already been compensated with the withdrawn stablecoins.
Stablecoins for Trading and Purchases
The average user does not need to lock their funds to the Pegs Contract to use the stablecoin. Instead, these types of users can acquire the stablecoins through purchasing them outright from other users on the stablecoin’s network. This could be accomplished by executing an atomic swap, just as you would between any other two digital assets. All stablecoins based on a Komodo Smart Chain will have the option to easily list the asset on AtomicDEX.
This allows anyone of practically any blockchain-skill level to simply acquire a stablecoin, spend this currency in a common digital method, and to leave the network without having to worry about the complexities of cryptocurrency price fluctuation.
Dealing With Market Fluctuations
To maintain the value of the stablecoin, the Pegs Contract's collateralized debt/loan system has several stages of activity that work together to govern the price of the stablecoin.
Taking Out A Loan
The first users to back the stablecoin do so by locking any amount of a Bitcoin-based cryptocurrency to the Pegs contract.
This process is achieved by first executing a series of transactions that rely on the Gateways, Tokens, and Oracles Contracts. The specifics are available in the technical documentation linked here.
Once the funds are locked to the Pegs contract, the users may withdraw up to 90 percent of the value of their locked funds in the format of the stablecoin currency, according to the exchange rate at current market prices. For example, if the user deposits $100 USD worth of BTC, they may withdraw up to $90 worth of the stablecoin.
The remaining $10 dollar’s worth of BTC is held solely by the Pegs contract to protect against market volatility. If the value of BTC increases relative to USD, the user who deposited the BTC is able to withdraw more stablecoin coins until their account balance again reaches the 90 percent collateralized-loan level.
Dealing With Price Fluctuation
If the value of BTC falls relative to USD, the Pegs Contract allows other users to purchase the depositing user’s outstanding debt.
When the price fluctuation is small, creating a debt level of only 90% to 95%, the Pegs Contract simply allows users on the network to exchange stablecoins for the BTC in the user’s account. There is no penalty to the indebted user beyond the loss of value caused by the market fluctuation.
This feature facilitates a stablecoin economic ecosystem where the second type of user— those who do not have deposited backing cryptocurrency and are only using the stablecoin— to directly exchange their stablecoin coins for BTC, if desired.
The Liquidation Process
If the value of the depositing user’s debt exceeds 95% of their total deposit value, the Pegs Contract allows any user on the stablecoin network to initiate a liquidation process that provides an immediate profit. This process works similarly to ordinary liquidation processes that occur with margin trading.
Here, the liquidating user sends to the Pegs Contract enough stablecoin coins to account for the entirety of the indebted user’s outstanding debt, which is 95% at the moment the debt level crosses the threshold. In exchange, the Pegs Contract returns to the indebted user’s locked funds to the user who liquidated the loan.
This provides the liquidating user with an immediate return of up to 5 percent.
Leftover Funds After Liquidation
Any funds remaining in the indebted user’s account are distributed to the Pegs Contract price-management system. The Pegs Contract can use these remaining funds to automatically maintain the exchange rate as necessary, accounting for price volatility and ensuring that the entire system remains solvent.
To avoid liquidation, all a depositing user must do is add more currency to their account or return some of the stablecoins they borrowed whenever the market is slipping. Alternatively, the user may choose not to withdraw the full 90 percent of their allowed collateralized loan, or at any time they can even liquidate their own account by submitting the full value of their outstanding debt.
Using Stablecoins Without Creating a Collateralized Loan
Users who wish to use the stablecoin, but do not wish to create a collateralized loan, are able to use the stablecoin as a normal cryptocurrency. They can purchase stablecoins from other users on the stablecoin’s network, such as those users who created collateralized loan accounts, and then sell or trade the stablecoins at will.
Stablecoins: A Layer of Simplicity For the Komodo Ecosystem
Through these features, the Pegs and Prices Contracts bring a new and valuable offering to the Komodo ecosystem.
Entrepreneurs Have the Option of Stability
Rather than relying on the prices of cryptocurrencies, which have a wide level of fluctuation, an entrepreneur can use these contracts to create a stablecoin for their Komodo-based economic ecosystem. This allows the entrepreneur to offer stable prices for their customers, while managing user activity in a blockchain-based environment.
Likewise, the average user is able to transfer their financial value from a familiar currency into a blockchain format that does not suffer from the market volatility that often plagues the cryptocurrency industry.
Seeding the Network With Funds
Users who wish to promote the stablecoin network can work together to build up a large number of collateralized loans, providing the network with sufficient liquidity to function.
These loans allow users to extract more value from the stablecoin network when the value of the deposits increases relative to the stablecoin.
On the other hand, when the value of the loans decreases due to market volatility, the Pegs Contract allows other users on the network to purchase outstanding debt on the network. This allows a decentralized network of users to work together to maintain a stable exchange rate for the stablecoin, using potential and occasional profits as an incentive.
Stablecoin Development Tutorials
For more information about the Pegs and Prices contract, a full walkthrough tutorial for setting up a new peg can be found here,and a walkthrough tutorial demonstrating contract usage can be found here. Technical documentation for the Prices Contract is coming soon.
Please note that the Pegs and Prices contracts are currently in alpha testing. Developers are encouraged to use these contracts for testing purposes only until the stablecoin solution is fully launched.
📧 Subscribe to the Komodo Newsletter
If you'd like to keep up with Komodo's progress on the fully decentralized stablecoin solution and other innovative technologies, subscribe to the Komodo newsletter.Take Me To the Signup Page