DeFiChain Tutorials

From DeFiChain-Wiki
Revision as of 22:13, 1 March 2022 by Misterpiggie49 (talk | contribs) (Adding information)

This is a work in progress. Please do not go off of this tutorial as it is incomplete, unedited, and may not be accurate.

This tutorial is designed with easy-to-understand language without complex words or cryptocurrency jargon, for a new cryptocurrency user who has already done their research and would like to invest in DeFiChain.

A Short Introduction

DeFiChain has been designed specifically for decentralized finance, with its own blockchain anchoring (attaching) to the Bitcoin blockchain for extra security, as Bitcoin has the oldest and arguably the most secure blockchain.

The main coin of DeFiChain is DFI (it is also called "native coin," basically meaning that DFI is the main coin of the blockchain, powering the network). For example, the Bitcoin blockchain's native coin is BTC, and for the Ethereum blockchain the native coin is ETH. In essence, native coins are used for almost everything on a blockchain.

After reading this article, you probably will have more questions. Here are the official groups/social media of DeFiChain. Please note: Scammers are attempting to steal your money and personal information. If you receive a sudden DM, you do not need to respond and simply ignore them/block them. Community mods/admins/support will never start the conversation. If you are unsure if someone is attempting to scam you, chat in the official groups. Remember: There is only one legitimate group in every language. If you are already in the DeFiChain English group, there is no other DeFiChain English group.

How to Obtain DFI

There are multiple ways to obtain DFI.

Here we will describe the advantages and disadvantages of each method.

CakeDeFi

Background

Cake was founded in early 2019 by Dr. Julian Hosp and U-Zyn Chua. As you may or may not know, they also started the DeFiChain project.

They do have their own subreddit and Telegram group. These cannot provide official support, do not let anyone lead you to believe so. It will be made clear in their respective groups.

Advantages

  • Founded by same crypto investors as the project itself, so they have a great understanding of the project
  • Largest company involved with DeFiChain
  • Hundreds of thousands of users also use the platform (400,000 according to the website, cakedefi.com)
  • Offers other services on DeFiChain and supports other coins, allowing you to use it for multiple purposes
  • They are offering a $30 deposit bonus on any first deposit of more than $50, incentivizing users to start with them

Disadvantages

  • 4% premium, according to the official DeFiChain website (defichain.com)
  • KYC is required (you need to provide proof of residence and other personal information)
  • Certain locations are prohibited from using Cake, you must ensure you are in an authorized location
  • Fees may be higher than using the blockchain, and withdrawals will take longer than using the blockchain

Registration (more information needed)

The official registration form is at https://app.cakedefi.com/register. Referral codes may enable you to get a larger bonus.

Exchanges

Background

You may have heard of exchanges such as Binance and Coinbase. These are two of the largest centralized exchanges in the world. However, these exchanges do not currently support DFI. If you wish to trade DFI using this method, here are a couple conventional options:

  • KuCoin (large exchange)
    • The registration link is here. Once again, referral codes may give you certain bonuses, so take advantage of them.
    • Advantages
      • Fees are 0.2% and decrease if you trade significantly more. You also get a 20% deduction if you pay with their native token KCS. Find more information here.
      • DFI staking is offered, although with much higher fees than Cake.
      • Offers a large variety of cryptocurrencies, allowing you to trade other coins and tokens as well.
      • No KYC is required
    • Disadvantages
      • Failure to complete KYC results in a lower daily withdrawal limit. Unfortunately, it is not possible for U.S. users to complete KYC and become verified as KuCoin is not licensed to operate in the U.S. Therefore, your funds are at a greater risk should the government crack down on such exchanges.
  • Bittrex (small exchange)
    • Bittrex's registration link is here. They do have referral codes, which may give various bonuses and discounts.
    • Advantages
      • Like KuCoin, there is a large selection of cryptocurrencies available for purchase
    • Disadvantages
      • Fees are higher than at KuCoin, starting at 0.35%

In addition to these traditional exchanges, you may also use DFX.Swiss to obtain your DFI if you have a SEPA bank account. It is a community-run project and also offers DFI staking and the trading of tokens that are offered on DeFiChain. However, their services are available only on their app, and their fees are significantly higher. They begin at 2.9% for low-volume traders and decrease to 2.4%, although there is a 1% discount if you use a referral code.

Advantages

  • May be easier to use and have proven track records for exchanging all types of coins
  • Lower fees than Cake

Disadvantages

  • Exchanges are not as familiar and do not specialize in DFI

Atomic Swapping/Bridges (in progress)

Background

One feature that DeFiChain is currently working on are bridges and atomic swapping from native DFI to native coins on other blockchains such as BTC and ETH. Bridges and atomic swaps are methods of exchanging coins between blockchains. Bridges allow users to send coins from one blockchain and receive their equivalent amount in a coin on another blockchain. DeFiChain atomic swaps, which are currently (source?) available for Bitcoin, allow users to swap native bitcoin (bitcoin you can trade on exchanges) to dBTC, a tokenized form of bitcoin on DeFiChain. In other words, when you perform an atomic swap, you give away your native bitcoin and receive the form of bitcoin on the DeFiChain blockchain instead. This is similar to the concept of WBTC (wrapped BTC) on Ethereum; however, it is much more technical and complicated at the moment and is not recommended for the average user.

Advantages

  • Much more decentralized than any other option. Work is done by the system with no input needed from a centralized entity.
  • Fees may be lower than using exchanges or Cake

Disadvantages

  • Atomic swaps are complicated for the average user and beginners; small errors can lead to a total loss of funds
  • Bridges are not yet available, and are still being tested
  • Customer service does not exist, please be careful

This concludes the section, you should now have a better understanding of how to get DFI.

What you can do with DFI

While you can simply hold your DFI, you have opportunities to use that DFI to make a greater return on your investment. There are multiple ways you can generate more income on your DFI:

  • Staking
    • Masternodes
    • Centralized Delegation
  • Liquidity Mining
    • Tokenized Cryptocurrencies
    • Tokenized Stocks
    • Tokenized ETFs on bonds and various markets and commodities
  • Collateral for Vaults (Loans)
  • Bidding on Liquidated Vaults

Staking

DeFiChain is operated by thousands of masternodes from around the world. There are nearly 10,900 masternodes with a total hash rate of nearly 27,900 hashes per second, as of 01 March 2022. They secure the network and receive a block reward for every block that they mint plus any transaction fees in the block. When you are staking, you create your own masternode or delegate your DFI to a centralized entity to do so.

Advantages

  • You are helping to operate the network and make the network more decentralized
  • The only price volatility risk you incur is in the price of DFI, unlike with liquidity mining, where you have the price volatility of multiple coins
  • When making a masternode, you are given the option to freeze the masternode (you may not withdraw) for 5 years, to gain 1.5x the rewards, or 10 years, to receive 2x the normal rewards
  • DFI staking has existed since the very beginning of DFI, and is the oldest form of gaining a return on your investment

Disadvantages

  • You must stake a minimum of 20,000 DFI, the minimum required for a masternode. Otherwise, you will have to delegate to a centralized entity such as Cake
  • The average APY (rewards) may be lower than with liquidity mining or other options
  • Rewards are not guaranteed when staking, as it depends on your masternode's luck to find a block. Please read the masternodes section below to get a better understanding. The APY listed when creating your masternode may be lower or higher; the APY only shows the theoretical rewards you will receive. This may not apply to centralized delegation.
  • APY decreases over time as block rewards decrease and more investors enter the network, although this occurs to all methods of gaining a return on DFI.
  • If you are creating your own masternode, you can only compound your rewards when you gain another 20,000 DFI (meaning that you cannot simply compound once you get a block reward, as you are only allowed to invest 20,000 DFI at a time. This does not apply to centralized delegation.

Masternodes

On DeFiChain, masternodes secure the network. Every masternode gets a couple chances every second to find a new block (hashes per second). Every unfrozen masternode gets 2 hashes per second, every 5-year frozen masternode gets 3 hashes per second, and 10-year frozen masternodes get 4 hashes per second. The system automatically adjusts so that all of the masternodes together find approximately 1 block every 30 seconds.

So, if the total hash rate is 50 hashes per second, the network would adjust the difficulty of finding a block so it takes about 1,500 hashes to find a new block.

Staking is a bit like playing the lottery. Every hash is a lottery ticket, and masternodes get a couple of tickets every second. If you have the correct numbers, you get to write the next block. This means that there may be a masternode that gets lucky and their "lottery tickets" keep winning, while other masternodes are not having any luck at all getting the right numbers. This is why above, it is written that rewards are not guaranteed. Your masternode may be lucky and receive lots of rewards in a period, and in the next it may receive close to nothing. The APY is just an estimate, just as buying fifty lottery tickets where the chance of winning on any ticket is 1 in 25 does not mean you will win exactly twice. All fifty may be winners, all fifty could be losers.

Advantages
  • All rewards you receive go straight to yourself. There is no centralized entity involved and you will not need to pay fees, and you are helping the network become decentralized
  • Non-custodial, you run your masternode, which can be done on your personal laptop. You control your keys, and no one needs to have control of them
Disadvantages
  • Staking becomes less profitable the less you leave your device open to write blocks. Cake leaves their servers on 24 hours a day, every day of the year, so rewards can be earned at any time.
  • 20,000 DFI must be staked, and it can only be compounded when you have another 20,000 DFI.
  • Rewards cannot be guaranteed, there may be periods where little rewards are found.

Centralized Delegation

Many people do not have the capital available to create their own masternode, or cannot run it for long enough to keep it more profitable than simply delegating it. This is where entities like DFX.Swiss, Cake, and KuCoin come in. You can stake any amount of DFI and earn rewards on it, while also being able to compound it. However, these entities run the masternodes, and you are not in control of how much rewards you receive or your DFI.

Advantages
  • You can often "set it and forget it," meaning that you can stake your DFI and not have to check back on it, as rewards will continue to accrue in your account
  • No minimum to stake
Disadvantages
  • You are making the network more centralized by allowing centralized entities to control your DFI
  • Fees can be significant. Exchanges such as KuCoin can take more than half of your staking profits

Liquidity Mining

Liquidity Mining is the process of adding liquidity to a "liquidity pool." Everyone places their holdings here, and receives tokens to represent their share of the pool, and users can swap from one token to another. In exchange, everyone who has put their tokens here gets a commission.

A simpler example of liquidity mining is listed below:

Alice is looking for a return on her DFI. Bob is a crypto investor. Currently, she sees a pool called dBTC-DFI. This means that the two assets in this pool are dBTC and DFI. Since Alice has no DFI, and she must deposit both dBTC and DFI at the rate of the pool (you cannot simply add to one side of the pool, it will imbalance it.), she will swap half of her DFI to dBTC at the current rate of the pool. She then adds both the DFI and the dBTC to the pool, and she has a 1% share of the pool. In return, the pool (system) gives her liquidity pool tokens that show that she is entitled to, or owns, 1% of the pool, whatever that might be.

Bob is anticipating that dBTC will perform worse than DFI, and he has dBTC after atomic swapping his bitcoin. He would like to own DFI instead. Luckily for him, he can swap in the dBTC-DFI pool and receive DFI instead. Bob will give the liquidity pool his bitcoin and take an equivalent DFI amount minus a fee, which is divided proportionally to each liquidity provider. Bob is now happy with his DFI, and Alice is as well, as she received a commission on her funds.

Advantages

  • Help reduce slippage to users who are swapping. Slippage is the difference in tokens you should get when swapping and the amount of tokens you actually receive
  • APYs are higher than staking (as of 01 March 2022)
  • Small price changes on one side of the pool is reduced due to the other side of the pool (risk is more diversified)

Disadvantages

  • Impermanent Loss (read the article for more information)
  • Severe crashes in either token's price compared to the other will lead to significant losses

Collateral for Vaults

It is not recommended to try this option as a beginner, but it is a helpful topic to understand.

A new feature that was recently introduced to DeFiChain is the ability to create a vault from which you can take out a loan and mint new tokens. A vault is similar to a bank, but it is decentralized and anyone can make their own. Users may deposit DFI, dBTC, DUSD, dUSDT, and dUSDC to their vault, and 50% of the vault must be collateralized with DFI. Depending on which option a borrower chose for their vault, they can take out between $10.00 (for a vault that has a ratio of 1,000%, or $1 in loans for every $10 in collateral) to $66.66 (a vault with a ratio of 150%, or $6.66 in loans for every $10) in loans for every $100 of collateral. If the ratio of the vault falls below the ratio they chose, their vault is automatically sent to be liquidated, and people bid to take the collateral from the vault (there is more information in the section below).

Users can take out DUSD stablecoins, or various stock tokens and ETF tokens. This allows an investor to go short on a token; as the value of the borrowed token decreases, the less money needed to pay back the loan. You also could leverage any crypto positions you have with the extra borrowed money.

Advantages

  • Hedging against stocks
  • Leveraging crypto positions
  • Increasing supply of borrowed token (when you "borrow a token," you are actually minting new tokens, increasing the supply, which is good for DeFiChain)

Disadvantages

  • Risk of liquidation
  • Interest must be paid on borrowed tokens

Bidding on Liquidated Vaults

Like the section above, it is not recommended for beginners to experiment with bidding and auctions, but it is still important for an investor to understand them.

Occasionally investors default in their vaults as there may be a sudden swift drop in prices, resulting in a vault to have too low of a collateralization ratio. Although users are protected from a 30% swing in prices in an hour, as vaults are halted during this time to allow users to deposit additional collateral, vaults may simply fall below the collateralization ratio. Since there is no "liquidation engine" or such, DeFiChain must think of a way to liquidate these investors' vaults.

Vaults are liquidated by the community. An auction with a six-hour time limit is held for every liquidated vault, with a minimum bid amount decided by the system. Users bid in the borrowed token, and in exchange receive the collateral inside the vault if they win. The vault owner receives the winning bid, minus a 5% fee, which is burned. (verify)

Common Topics of Confusion

There are many ideas, concepts, and topics that may be confusing to beginners and average users. Here we will go through a majority of them, and remember, feel free to ask more questions in the official social media groups that were listed at the beginning of the article.

UTXO (more information needed) (verify)

DeFiChain uses the unspent transaction (tx) output model, or UTXO. There are two types of DFI, UTXO and token. UTXO DFI can be spent (sent to another wallet) through the blockchain; it is your available balance. The other form of DFI, token DFI, is received in liquidity mining. Because in every block, which occurs approximately every 30 seconds, rewards are distributed to liquidity providers, creating tons of UTXO transactions would be inefficient, spamming the blockchain with transactions, and raising the cost of a transaction that would make it unprofitable to liquidity mine. So, rewards are instead distributed by token, which does not include a transaction fee. Token DFI must be converted to UTXO DFI before it is possible to send any DFI.

The meaning of "d" in front of a token name