Decentralized accounts (dAccs) allows users to control funds directly on a secure multisig wallet while simultaneously utilizing the speed and liquidity of centralized exchanges. This is done solely through the channel-state exchange procedure within Xena Exchange. This approach helps reduce customer counterparty risk by up to 90%.
Xena Exchange is the only centralized crypto exchange that implements the principles of fund segregation. Counterparty (exchange) risk is one of the primary risks to consider when trading cryptocurrencies. In contrast to traditional financial markets, where different institutions, such as exchanges, brokers, clearing houses and banks, provide infrastructure to minimize such risks, in the cryptocurrency market, an exchange is usually a combination of all these institutions in one entity. Trading cryptocurrency requires depositing the funds to an account opened at an exchange, which in most cases is not regulated by any agency. Within the exchange, the funds are tracked off the blockchain, so in general, clients have little control over their funds. Decentralized exchanges (dEx) in their turn have the same (if not greater) counterparty risk, but they also introduce additional problems that make the whole concept nonviable.
Decentralized accounts reduce counterparty risk and allow clients to transfer funds from a secure wallet to an account in less than a second to mitigate increased market risks.
How dAccs work?
The working principles of dAccs are similar to those of the Lightning network. They include off-chain state exchanges within a channel and take less than a second.
If Alice traded without using dAccs and decided to open a position for 60 BTC, she would likely decide to use a leverage of x2 — x3 as the collateral (20 — 30 BTC) and she would need to deposit all these funds to her account on the exchange and, hence, the funds would be exposed to counterparty risk.
Let’s consider the case of dAccs. Alice creates a channel and deposits 50 BTC. The channel-opening transaction is settled to the blockchain, creating a multi-sig wallet storing these funds.
Xena Exchange can withdraw 0
Alice can withdraw 50 BTC
Before opening, Alice signs and sends a new state of the channel to Xena Exchange. This state is something like Xena Exchange – 3 BTC, Alice – 47 BTC.
After receiving the new state, Xena Exchange updates the balance of Alice’s account, which is now 3 BTC. Alice can open the position for 60 BTC with a leverage ratio of 1:20. Alice’s risk on Xena Exchange is only 3 BTC, which is only a fraction of the total counterparty risk she could have had.
If the margin level of Alice’s account approaches the stop-out level, Xena Exchange issues a margin call. Then, Alice can send a new state of the channel which allocates more funds from the multi-sig wallet to her account on Xena Exchange in less than a second.
To understand better the way dAccs work let’s take a closer look at Lightning network.
Excursus: Lightning Network.
Lightning Network is a network built over the Bitcoin blockchain which operates with the notion of channels. When opening a channel, two parties commit a portion of their funds to a multi-sig wallet. To withdraw the committed funds from this wallet, one needs signatures from both parties. When using a channel, the parties exchange with the new states of the channel, showing the new distribution of funds. This happens off-chain, so the exchange can be as fast as required. When the channel has a new state, each party can close it, settling this state to the blockchain at any time. There are also special mechanics in place which allow parties to retrieve funds after some time if the second party does not respond or close the channel in a normal way. They can also retrieve the entire amount allocated to the channel if the second party attempts to cheat. In a nutshell, it works like this:
Alice and Bob create a channel. Alice commits 10 BTC, and Bob commits 5 BTC. After settling the special channel-opening transaction to the blockchain, 15 BTC is stored in a dedicated multi-sig wallet, and the parties have the following transactions in the channel (not settled to the blockchain):
Alice submits a request to withdraw 10 BTC from the multi-sig wallet, signed by Bob
Bob submits a request to withdraw 5 BTC from the multi-sig wallet, signed by Alice
Either party can add their signature to the request they have submitted and settle it to the blockchain at any moment
Alice buys something from Bob and wants to pay him 2 BTC. She exchanges the new state of the channel with Bob using an off-chain means of communication. Now:
Alice has a request to withdraw 8 BTC from the wallet, signed by Bob
Bob has a request to withdraw 7 BTC from the wallet, signed by Alice
This process can be repeated until both parties decide to close the channel. To do so, both of them must settle and broadcast the last state of the channel to the blockchain and redistribute the funds from the multi-sig wallet to their personal wallets.