The following article is going to introduce xDai Stable Chain from a technological standpoint, showcasing its main attributes. Being aware of how complex some of the concepts can be, we made sure that all features are presented in a way understandable even for those without a technical background. Few of the selected topics like Staking or using the Bridge are going to receive their extended versions in the upcoming weeks to further explain how xDai with its unique solutions can continue to gain support and become one of the most widely used Stable Chains in the world.
xDai Stable Chain is the first-ever USD stable blockchain. It is a platform for digital cash that runs on an Ethereum sidechain, meaning that smart contracts can also be written and deployed on it, despite using a different consensus (POSDAO with its STAKE token mechanism. This concept will be explained in the following parts of this article). Any contract that works on Ethereum can also be used on xDai chain while keeping all the benefits of the latter one such as lower fees, faster transactions and most importantly — predictable costs as it a stable chain.
xDai is the name not only of the blockchain itself but also of the stable cryptocurrency that is being used on it. The token is directly pegged to Dai which itself is directly pegged to 1 US Dollar. Its main use case is to be the everyday currency for all kinds of payments and transactions which already has been tested among thousands during a few of the biggest cryptocurrency conferences around the world. In comparison to other currencies that try to be a payment solution for regular vendors, xDai can actually achieve it due to its users not having to worry about price fluctuations or the tokens losing value over time.
The features that come with xDai are often unique and make it one of the most interesting not only stablecoins, but general ecosystems available currently on the market. Here is the overview of all main qualities that xDai has to offer to its users, these include:
- Neutral Network
- Random Number Generator
- DPOS Consensus and STAKE Token
- Interoperability – Bridges to Ethereum
The core feature, stability, is very rarely discussed as many believe all stablecoins work the same way. This couldn’t be further from the truth, especially for xDai which has a lot of advantages over its competitors.
A stablecoin, by definition, was created to fight against price fluctuations which in crypto are especially extreme. Nobody would like to rely on an asset that one day can increase its value by 5% only to lose 20% the next day. It’s unsustainable and makes regular expenses impossible to calculate.
To eliminate those fluctuations and still take advantage of all blockchain’s perks, stablecoins are directly pegged to another asset — it can be fiat money, a cryptocurrency, a commodity or a basket of assets. In the xDai Stable Chain, the xDai has a 1:1 value ratio with Dai which is directly pegged to a dollar (which basically means that xDai = 1$).
However, the difference here is that xDai’s transaction takes place on a bridged sidechain (more on that in the Interoperability part), which means that it differs from how Dai works. Being on a sidechain (its own network) makes transactions not only faster (5 seconds) but also cheaper (0.01$ per 500tx) and it doesn’t require ETH to pay gas (transaction fees) as that is done with xDai.
It’s a single token for both payments and transaction fees that has its own Neutral Network.
Neutral Network could also be called independence. What it means is that it is not the subject of any aspects that other chains usually have to deal with:
• Big volatility as mentioned previously
• Speculation, which has direct effect on price, often on even tiny news (especially in crypto)
• FUD (fear, uncertainty & doubt) allowing outside users to affect it as well
A lot of times users are distracted by what’s happening around the chain that is not directly involved with how it’s working. This doesn’t take place with xDai. It’s a fast, transparent network with open governance, open access and most importantly a stable token so that its users always know what to expect from it. It has a clear purpose of delivering secure transactions of non-fluctuating value and no crypto-market forces can influence that process. Considering how self-aware crypto requires its market participants to be 24/7, this is a huge benefit to people who just want to feel the benefits of using a certain chain.
Random Number Generator
One of the more interesting features on xDai Stable Chain is on-chain RNG (Random Number Generator). Using a RANDAO-like process, it allows having a built-in true randomness that is essential in many types of applications across multiple industries (public management, entertainment, sports, finance etc.) such as:
• Gambling (3rd parties often cheat by manipulating the numbers to prevents players from winning)
• Sports competitions (fair division of the teams during a tournament)
• Random auditing (e.g. Tax auditing to ensure all citizens have the same chance of being checked)
The important aspect here is that the process is not only decentralized, secure and fair but also verifiable. Creation of the random number consists of participants that can observe and verify their own impact on the generation process. How does it look like? Let’s explain that on a simple example:
Imagine you have a license-plate lottery. All the people that participated in the lottery are eligible to also participate in the process of generating random numbers. Each participant submits an arbitrary number that at this stage of the process in encrypted. When the number of all participants is known, each of them needs to submit the same number for the 2nd time. The system then checks whether they match with the previously submitted ones and if they don’t, the whole process is invalidated and needs to be started over. Once they finally match, the system calculates the final random number. During the whole process, participants can audit and watch how their own numbers influence the results without the possibility of somebody manipulating it behind the scenes.
The reasoning for having an on-chain RNG is simply being self-sufficient as 3rd parties that do provide such services are centralized and require main entity to trust it. Public blockchains were designed to be decentralized with as little points of failure as possible, therefore, to avoid potential manipulation, it is better to have a solution already on-chain, without being depended on anyone else.
On xDai Stable Chain this whole process is executed by the validators in the protocol. Here is how Andrew, one of the team members explains it:
“Random numbers are generated by the validators themselves. The process requires two phases. In the first phase, called the commit phase, validators take turns sending a random, cryptographically hidden number from their node to the chain. In the second phase, called the reveals phase, validators take turns revealing the number they sent in the commit phase. An on-chain function mixes revealed numbers, creating a new random number during each block of the reveals phase. This new random number can then be used to seed an application’s native Random Number Generator (RNG).”
DPOS Consensus and STAKE Token
Before the POSDAO consensus gets explained, there needs to be a definition of a validator and delegator, who are main “actors” in the whole system. Validators are responsible for signing blocks and securing the network for a previously determined time period (which is called stacking epoch). In exchange for that, they receive block reward and transaction fees. Delegators on the other hand also play an important role in securing the network as they “vote” by placing stake in other candidates, increasing their chances of becoming a validator. During each stacking epoch, both validators and delegators (who staked with them) are rewarded with additional tokens for successful block production.
The way xDai currently works is that its validators are organizations selected from the Ethereum community. They do not receive significant rewards (they receive only transaction fees, fractions of a cent) and that model is not sustainable as it doesn’t allow the rest of the community to take part in the consensus model.
To change that and to open up to a larger community, xDai is going to move to a delegated Proof-of-Stake architecture called POSDAO. This model not only introduces a staking token (called STAKE, more on that in a bit) but also changes the consensus mode where individuals who own those tokens can become validators or delegate them to the existing ones to protect the network. This way the model creates a free-market system where the community decides who gets to validate the chain by either applying themselves or acting as delegators and placing stake on those who they feel will do the best job (with rewards waiting for both parties).
During each staking epoch, validators will be selected not only on the total stake they provide (validator + delegator stake) but also based on a random number (using the on-chain RNG explained before). The validators that are misbehaving are reported and banned from the consensus.
The previously mentioned STAKE token is an ERC20 with a market driven value. The initial supply of 8.5375M is going be slowly released while other tokens are minted in each staking epoch as a reward.
Its initial use case is protecting the POSDAO process when used by validators and delegators to secure the network. To participate in it the validators need at least 20k tokens, while delegators are required a minimum of 1k stake. The reward that the consensus participants will receive this time around are both in STAKE and in xDai. What’s interesting is that STAKE is not limited to the xDai chain only – its use can also be extended to other chains making it the first multi-chain enabled staking token.
Interoperability – Bridges to Ethereum
The importance of Interoperability increases day by day as it allows different chains, each with its own unique features, to interact with one another. In the simplest terms, it allows information to be freely shared across previously unconnected blockchains and participate in other mainnet’s applications like e.g. DEXs. This is crucial for the growth of the general ecosystem as many different projects work solely on their own network which is a huge loss of value when users are unable to connect to other chains, making them pick one instead of taking what’s best from all available options. xDai is one of the few projects that’s trying to face this issue by allowing fluid transfer between xDai and Ethereum mainnet thanks to the Bridge (more on that in a second).
Interoperability generally means two things:
1. Applications designed on one chain can run on another as well
2. Assets are capable of moving freely between 2 different blockchains
xDai’s design makes it completely compatible with Ethereum’s ecosystem (that includes other compatible chains like e.g. Ethereum Classic) which mean that ETH applications can run on it as well, while still allowing for extremely easy transfer of assets between networks. To do that, xDai is using the infrastructure of the Bridge (TokenBridge):
A quick example to illustrate how that process works would be when a user decides to convert Dai into xDai:
A certain number of Dai is locked by the user in the bridge -> corresponding amount of xDai is created on the xDai chain.
When that same user would like to convert his xDai back –
xDai gets burned/destroyed -> Dai gets unlocked from the bridge and returns to the user’s address.
The 5 features that were covered in this article are just a glimpse of what xDai really represents.
Outside of the unique architecture, xDai is also known for its largest userbase wallet, creating a decentralised community currency for remote Kenyan villages with Grassroots Economics and a multitude of use cases that are being discovered by the developers.
The following weeks are going to showcase a lot of that so if you want to stay updated you can learn more about xDai on their website and stay updated with their progress by subscribing to their Twitter account.