Chainflip is a decentralized platform easing the swapping of one cryptocurrency by improving inter-chain interaction through atomic swaps, wrapped tokens, and centralized entities.
Engines powering decentralized systems depend on the platform’s functionality. Unfortunately, with diverse use cases, blockchain-based assets are locked on individual networks, limiting transfer and widespread trading. Decentralized finance (DeFi) has been hard-hit, requiring the use of token pools to attract liquidity from different cryptocurrencies.
Apart from pools, other distributed networks employ the use of wrapped digital assets. Generally, wrapped coins maintain a 1:1 peg to their underlying asset while embracing a different blockchain’s token standards. For example, wrapping Bitcoin (BTC) with Ethereum’s token standards effectively ‘converts’ BTC to an ERC20 token.
However, the processes described above consume too much time, and developers only concentrate on leading cryptocurrencies. Thankfully, Chainflip removes the coding process to enable any token to be swapped for another without the need for blockchain programming knowledge.
Interestingly, the swapping process doesn’t require any central authority or specialized crypto storage systems.
But how is it possible? Below we explore the Chainflip ecosystem.
What is Chainflip?
Chainflip is a decentralized platform easing the swapping of one cryptocurrency to another. The protocol improves and learns from past projects that have tried inter-chain interaction through atomic swaps, wrapped tokens, and centralized entities. As such, the network removes major bottlenecks found on these systems.
For example, the platform supports inter-blockchain asset interaction through ordinary crypto wallets, and only a single transaction is needed for a successful swap. Chainflip’s operation mode and architecture involve staked vault nodes. Note that to keep funds safe, staked nodes interface with multi-sig wallets.
Major Chainflip Parts
Generally, they are digital currency wallets with multi-signature functionalities to enable access from multiple staked nodes.
A transaction is initiated after amassing a minimum of 2/3 of the votes from all participating parties.
Notably, vaults recognize transaction-legalizing techniques in the decentralized space. As such, Chainflip optimizes vaults to handle validation from major distributed systems.
Among the supported platforms are blockchains using the EdDSA (a digital signature scheme that beats conventional digital signatures on speed) transaction signing and smart contract-enabled systems with native EdDSA support. In addition, it interacts with platforms without smart contracting and EdDSA capabilities.
Daemons (background processes activated by select events) power the transaction validation process on Chainflip. Therefore, vault nodes run daemons from supported distributed networks. However, to reduce the burden of running as full nodes on each supported blockchain, vault nodes turn to SPV nodes for simple payment verifications (SPV).
Vaults with the right to write transactions on the system are subjected to a selection process. The platform uses vault rotation to equalize the chances of a node being selected.
Also, vault rotation activates when the number of online nodes drops below a set safe mark. In addition, the main chain facilitates vault node creation and transition to active status.
The State Chain
It manages the interaction between vaults. For example, it supervises node agreements on wallet balances and liquidity pools’ state. Notably, the chain provides permissioned access when altering its state.
Thus, it makes it possible to maintain a shared state. The state chain has three types of transactions; witness, pool balance transfers, and quotes.
- Witness Transactions – Are submitted by vault nodes when they encounter a handful of transactions. Other nodes that have witnessed or received the same transactions link their signatures.
Note that witness transactions are only added to the main chain if enough witnesses provide consent. The process serves both incoming and outgoing transactions.
- Pool Balance Transfers – The balance available in a single wallet is distributable across Chainflip nodes. Interestingly, where more than one pool has access to a single vault, the main chain only records a change in the balances when a transfer occurs between the pools.
- Quotes – These are user-generated instructions emanating from withdrawal and or swap requests. Additionally, quotes are defined when onboarding a new liquidity provider.
Additionally, the state chain manages liquidity provision and withdrawal. Liquidity withdrawal requests are initiated using quotes. Then, quoters deliver the requests to the underlying chain.
Quoters are entities interfacing general users with the state chain. Therefore, they deliver quotes to the chain. When delivering a swap quote, for example, the quoter verifies that it has the receiving address, slippage limits, return address, among other main and optional details.
Liquidity pools make part of a vault. For example, the liquidity pool handling BTC and ETH includes a section of the BTC vault and the ETH vault. Therefore, one pool can be interfaced to multiple liquidity pools.
The pools power liquidity mining. Liquidity providers (LPs) earn rewards emanating from transaction costs on the pools.
Chainflip’s approach to liquidity provision allows an LP to provide liquidity, even if they just have one asset. This moves away from other liquidity provision approaches where a liquidity pool requires an LP to provide both sides of the asset. For instance, if it’s a BTC/ETH liquidity pool, an LP must deposit both the BTC and the ETH into the pool.
The network implicitly swaps assets within a pool to rebalance the assets, eliminating the need for manual rebalancing.
How Does Chainflip Implement Security?
The network is designed to discourage attacks from financially and non-financially motivated malicious actors. In addition, it guards against trusted actors who may seek to cleverly increase their ROIs. The protocol enhances security through a native currency called FLIP. Staking FLIP provides the chain’s security.
However, to incentivize vault nodes, system emissions are programmatically implemented to ensure continued supply. To counteract the adverse effects of network emissions such as a high inflation rate, which reduces FLIP’s value, Chainflip burns the native token with each swap transaction.
On the other hand, to counter ransom attacks on nodes, the platform optimizes the collateralization of vault nodes.
Other security measures implemented by Chainflip include:
- Slashing – This is a mechanism that punishes malicious actors by allowing other vault nodes to slash their stake. The platform uses observers to detect and thwart an attacker seeking to steal funds from vaults.
- Vault Randomization – Randomization kicks in when the required number of selected vaults cannot be reached due to scaling or liquidity limitations. To prevent an attack due to the low number of selected nodes, Chainflip randomizes them. Therefore, the attacker cannot have full control of the system even if they gain control of a majority of the vault nodes.
- Penalty System – Here, vault nodes are obligated to provide high uptime and actively participate in signing transactions, among other qualities. Failure to do so results in being penalized through, for example, downscaling their stake. The penalty system uses credit scores to rank nodes based on behaviors.
Chainflip has its sight on the future of DeFi and other blockchain-based platforms using automated market-making (AMM). Currently, the fee model used on these platforms is prohibitive.
Some protocols set the fee depending on the amount of funds involved, while others let the demand and supply dictate the costs. To find the best fee structure, Chainflip investigates, and applies the best model on liquidity pools.
By eliminating the need to provide both assets in a liquidity pool, Chainflip brings a new dawn to the DeFi world. The network’s multi signature-enabled vaults provide security to stored funds.
Through enhanced vault collateralization, randomization, and stake slashing, the protocol discourages malicious actors. Also, a penalty system encourages participants to act honestly, further enhancing the platform’s security.