Investing & Trading with Decentralized Loans and Assets on DeFiChain

From DeFiChain-Wiki

We explain DeFiChain - Investing & Trading with Decentralized Loans and Assets on DeFiChain

Part 1: Long and short positions with stock token

Bild 1-1.png
With decentralized loans and assets on DefiChain, you can invest in different assets betting on increasing (long) or decreasing (short) prices. We will explain 3 different ways of investing.
Bild 1-2.png

Long position - Neutral DFI

Investment thesis

The future price of an asset will be higher than it is today.

DefiChain procedure

  • Sell DFI on DEX for dUSD
  • Buy your preferred asset on DEX with x amount of dUSD

Goal in the future

  • Sell asset for y amount of dUSD

Profit: (y-x) dUSD

Remarks

  • Trades and profit are in dUSD
  • DEX prices are relevant for the trade, not the price feed → pay attention of the pool ratio
  • Any price movement of DFI will not have an effect on your investment
  • Step 1 and 2 will be combined to a composite swap, which is only one step for the user
  • Your complete capital is invested

Example

With a DFI price of $2.50 you sell 280 DFI, and receive 700 dUSD. You buy 1 TSLA for those 700 dUSD and hold it.

After some time the TSLA price rises to 1000 dUSD and the DFI price to $4.00. Selling TSLA for dUSD gives you 1000 dUSD and you make 300 dUSD profit.

Remark

  • If you want to go back to DFI you will receive 250 DFI for the 1000 dUSD, because the price went up to $4.00.

→ The best case for this investment: The asset price increases


Short position - Long DFI

Investment thesis

The future price of an asset will be lower than it is today.

DefiChain procedure

  • Put some coins (e.g. DFI) as a collateral into a decentralized loan and mint a decentralized token (e.g. TSLA token).
  • Sell the token on the DEX and get dUSD amount x from selling.

Goal in the future

  • Buy token + fee back with dUSD amount y (from holding)
  • Close loan by putting token + fee back

Profit: (x-y) dUSD - interest

Remarks

  • Asset trades and profits are in dUSD.
  • DEX prices are relevant for the trade, not the price feed. → pay attention to the pool ratio
  • Getting your DFI amount back in step 4 is the same as in step. → you open a long position on DFI
  • Not all your capital is invested (2/3 – 1/10 with respect to loan collateral). → reduced yield for short position on asset
  • You will have a liquidation risk if the price of your collateral falls too low.

Example

With a DFI price of $2.50 you put 280 DFI into a decentralized loan = $700. For the value of $700 you get 0.5 TSLA (200% collateralization and TLSA price of $700). You sell this 0.5 TSLA on DEX and get 350 dUSD.

After one year the TSLA price decreased to $500 and the DFI price increased to $4.00. Now you buy back the 0.5 TSLA for 250 dUSD  and 0.01 TSLA for 5 dUSD (interest). With 0.51 TLSA you can now close your loan and make 95 dUSD profit.

You also receive back your DFI, which are now worth $1120 and you make an additional profit of $ 420. Your DFI long position was the right choice.

→ The best case for this investment: The Asset price decreases and DFI price increases!


Long position - Long DFI (leverage)

Long position - Long DFI (leverage)
Investment thesis

The future price of an asset and DFI will be higher than it is today.

DefiChain procedure

  • Put some coins (e.g. DFI) up as collateral for a decentralized loan and mint dUSD.
  • Buy your preferred asset on the DEX with x dUSD

Goal in the future

  • Sell the asset for y dUSD
  • Close a loan by putting tokens + interest back  

Profit: (y-x) dUSD - interest

Remarks

  • Trades and profits are in dUSD.
  • DEX prices are relevant for trades, not the price feed. → pay attention to the pool ratio
  • Getting your DFI amount back in step 4 is the same as in step 1. → you open a long position on DFI
  • Not all your capital is invested (2/3 – 1/10 with respect to loan collateral). → reduced yield for long position on asset
  • You will have a liquidation risk, if the price of your collateral falls too low.

Example

With a DFI price of $2.50 you put 280 DFI into a decentralized loan. For the value of $700 you get 350 dUSD (200% collateralization). You use this dUSD to buy 0.5 TSLA on DEX.

After one year TSLA price goes up to $1000 and DFI price up to $4.00. Now you sell the 0.5 TSLA for 500 dUSD. With 357 dUSD (350 dUSD plus 7 dUSD fee) you can close your loan and made 143 dUSD profit.

You also receive back your DFI, which are now $1120 worth and made an additional profit of $ 420. Your DFI long position was right.

→ The best case for this investment: Asset price increases and DFI price increases



Part 2: Liquidity mining

Bild 6-1.png
With decentralized loans and assets on DefiChain you can generate cashflow with liquidity mining. In this case you have four different ways depening on your investment strategy.
Bild 6-2.png

Liquidity Mining – Neutral DFI / Asset long

Investment thesis
  • Generate crypto cashflow with liquidity mining.
  • In the long term the DFI price will decrease and the asset price will increase.

DefiChain procedure

  • Sell some DFI on the DEX for dUSD
  • Buy your preferred asset on the DEX with half of the dUSD (amount x) received in step 1
  • Put dUSD and asset token in the pool ratio into liquidity mining

Goal in the future

  • Get DFI rewards with each minted blocks + trading fees
  • Remove liquidity and sell asset token for y amount dUSD (long term)

Profit: (y-x) dUSD + LM rewards/fees

Remarks

  • All trade profits are in dUSD
  • LM block rewards are paid in DFI
  • The fees from LM are in asset token and dUSD
  • Any price movements of DFI will not have an effect on your investment
  • Your complete capital is invested and generates cashflow

Example

Swap 560 DFI to 700 dUSD and 1 TSLA, which has an overall value of $1400 (DFI price $2.50). Put both of them into LM with a DEX price of 700 dUSD/TSLA.

liquidity token = sqrt(TSLA token * dUSD token) = sqrt(1 * 700) = 26.45

Remove liquidity after some time with increased price to 1000 TSLA.

pool ratio = TSLA/dUSD = 1/1000 dUSD = 1000 TSLA

26.45 = sqrt(1000 TSLA) TSLA = 26.45/sqrt(1000) = 0.836

dUSD = 1000 TSLA dUSD = 836

Removing liquidity and swapping the 0.836 TSLA abd 836 dUSD into USD will result in an overall amount of 2 * $836 = $1672 = $1440 + $272

Additional to your Liquidity Mining rewards, you got $272 profit from price movement of TSLA, this is the profit from asset long position you made.

Remark

If in the same time frame DFI goes up to $4.00, you will only get 478 DFI for your USD position.

→ The best case for this investment: The price of the asset increases


Liquidity Mining – Long DFI / Asset neutral

Investment thesis
  • Generate crypto cashflow with liquidity mining.
  • Long term the DFI price will increase and the asset price will stay unchanged.

DefiChain procedure

  • Put some coins (e.g. DFI) as a collateral into decentralized loan and mint decentralized token (e.g. TSLA token) + dUSD
  • Put dUSD and asset with the pool ratio into liquidity mining

Goal in the future

  • Get DFI rewards with each minted blocks + trading fees
  • Remove liquidity
  • If the pool ratio is different to start swap missing asset/dUSD
  • If needed: Buy missing asset/dUSD
  • Close loan by putting asset token/dUSD + interest back

Profit: LM rewards/fees - interest - loss of pool ratio change

Remarks

  • LM block rewards are paid in DFI
  • The fees from LM are paid in asset token and dUSD
  • Pool ratio change reduces your overall profit asset neutral position
  • Your DFI amount getting back in step 6 is the same as in step 1 you open a long position on DFI
  • Not all your capital is generating rewards (2/3 – 1/10 with respect to loan collateral) reduced yield rate

Example

Generate 1 TSLA and 700 dUSD with 1,120 DFI (200% collateralization and DFI price $2.50). Put them into Liquidity Mining with a DEX price of 700 dUSD/TSLA.

liquidity token = sqrt(TSLA token * dUSD token) = sqrt(1 * 700) = 26.45

Remove liquidity after some time with increased price to 1000 TSLA.

pool ratio = TSLA/dUSD = 1/1000 dUSD = 1000 TSLA

26.45 = sqrt(1000 TSLA) TSLA = 26.45/sqrt(1000) = 0.836

dUSD = 1000 TSLA dUSD = 836

Removing liquidity will give you 0.164 less TSLA and 136 more dUSD. Swapping the 136 dUSD will result in an overall amount of TSLA = 0.836 + 0.136 = 0.972.

0.028 TSLA are missing to close the loan and must be bought from reward income.


If in the same time frame the DFI price dicreases to $4.00, you will make additionalyl to your Liquidity Mining rewards a profit of $1,680 with your DFI long position.

→ The best case for this investment: Pool ratio remains unchanged and DFI increases.


Liquidity Mining – Long DFI / Asset long

Investment thesis
  • Generate crypto cashflow with liquidity mining.
  • Long term the DFI and asset price will increase.

DefiChain procedure

  • Put some coins (e.g. DFI) as a collateral into decentralized loan and mint dUSD
  • Swap half of the dUSD to asset token
  • Put dUSD and asset with the pool ratio into liquidity mining

Goal in the future

  • Get DFI rewards with each minted blocks + trading fees
  • Remove liquidity
  • Swap asset token back to dUSD
  • Close loan by putting dUSD + fee back

Profit: LM rewards/fees - fee of loan + profit price increase asset

Remarks

  • Liquidity Mining block rewards are in DFI
  • Fees from Liquidity Mining are in asset token and dUSD
  • Positive price movement of asset token generates more – for loan needed – dUSD in LM Long position on asset
  • Your DFI amount getting back in step 6 is the same as in step 1 you open a long position on DFI
  • Not all your capital is generating rewards (2/3 – 1/10 with respect to loan collateral) reduced yield rate

Example

Generate 1,400 dUSD with 1,120 DFI (200% collateralization and DFI pricen $2.5). Swap 700 dUSD for 1 TSLA. Put both of them into Liquidity Mining with a DEX price of 700 dUSD/TSLA.

liquidity token = sqrt(TSLA token * dUSD token) = sqrt(1 * 700) = 26.45

Remove liquidity after some time with increased price to 1000 TSLA.

pool ratio = TSLA/dUSD = 1/1000 dUSD = 1000 TSLA

26.45 = sqrt(1000 TSLA) TSLA = 26.45/sqrt(1000) = 0.836

dUSD = 1000 TSLA dUSD = 836

Removing liquidity and swapping the 0.836 TSLA into dUSD will result in an overall amount of dUSD = 2 * 836 = 1,672 = 1,400 + 272.

You got 272 additional dUSD from price movement of TSLA, which are not needed for closing the loan. This is the additional profit from asset long position.

If in the same time frame DFI goes up to $4.00, you will make additional profit of $1,680 to your Liquidity Mining rewards with your DFI long position.

→ The best case for this investment: The price of the asset and DFI increase.


Liquidity Mining – Long DFI / Asset short

Investment thesis
  • Generate crypto cashflow with liquidity mining.
  • In the long term the DFI price will increase and the asset price decrease.

DefiChain procedure

  • Put some coins (e.g. DFI) as a collateral into decentralized loan and mint asset token
  • Swap half of the asset token to dUSD
  • Put dUSD and asset with the pool ratio into liquidity mining

Goal in the future

  • Get DFI rewards with each minted blocks + trading fees
  • Remove liquidity
  • Swap dUSD back to asset token
  • Close loan by putting dUSD + fee back

Profit: LM rewards/fees - fee of loan + profit price decrease asset

Remarks

  • Liquidity Mining block rewards are in DFI
  • Fees from Liquidity Mining are in asset token and dUSD
  • Negative price movement of asset token generates more – for loan needed – asset tokens in LM Short position on asset
  • Your DFI amount getting back in step 6 is the same as in step 1 you open a long position on DFI
  • Not all your capital is generating rewards (2/3 – 1/10 with respect to loan collateral) reduced yield rate

Example

Generate 2 TSLA with 1,120 DFI (200% collateralization and DFI pricen $2.5). Swap 1 TSLA for 700 dUSD. Put both of them into Liquidity Mining with a DEX price of 700 dUSD/TSLA.

liquidity token = sqrt(TSLA token * dUSD token) = sqrt(1 * 700) = 26.45

Remove liquidity after some time with decreased price to 500 dUSD/TSLA.

pool ratio = TSLA/dUSD = 1/500 dUSD = 500 TSLA

26.45 = sqrt(500 TSLA) TSLA = 26.45/sqrt(500) = 1.18

dUSD = 500 TSLA dUSD = 590

Removing liquidity and swapping the 590 dUSD into TSLA will result in an overall TSLA amount of TSLA = 2 * 1.18 = 2.36 = 2 + 0.36.

You got 0.36 additional TSLA from price movement of TSLA, which are not needed for closing the loan. This is the additional profit from asset short position.

If in the same time frame DFI goes up to $4.00, you will make additional to your Liquidity Mining rewards a profit of $1,680 with your DFI long position.

→ The best case for this investment: The price of the asset goes down and DFI goes up.



Part 3: Leverage of DFI with decentralized loans

Trading Leverage of DFI - Intro1.png
With decentralized loans and assets on DefiChain you can leverage your DFI position. Basically, there are two different ways to use the leverage effect.
Trading Leverage of DFI - Intro2.png

Leverage of DFI – DFI Multiple long

Investment thesis

The future price of DFI will be higher than it is today and you want to participate with more then lineare increase.

DefiChain procedure

  • Use coins7tokens (e.g. DFI) as collateral for a decentralized loan and mint dUSD
  • Buy more DFI on the DEX with dUSD for price x
  • Optional: if you want, repeat this steps

Goal in the future

  • Sell your DFIs for price y
  • Close the loan by paying dUSD + fee back
  • Optional: if needed, repeat steps before until all loans are closed

Profit (double long):

(y-x) * DFIinvest * (1 + (1 / collateralization - ratio)) - interestloan

Remarks

  • Trades and profit are made in dUSD
  • DEX prices are relevant for trading, not the price feed take care of the pool ratio!
  • Your DFI amount will be returned in (the last) step-4 is the same as in (the first) step-1 you open a long position on DFI (you hold your DFI)
  • Not all your capital is invested (2/3 – 1/10 with respect to loan collateral) for effective leverage a low collateralization near 150% is needed
  • You will have multiple liquidation risks if the price of your collaterals falls too low.

Example (maximum leverage)

  • At a DFI price of $2.50 you buy 300 DFI (investment $750) to use them as colleteral for a decentralized loan (investment: $750)
  • For the value of $750 you will get 500 dUSD (150% collateralization). You will use this dUSD to buy 200 DFI on the DEX (investment: $500)
  • Additional (triple long): Use the 200 DFI ($500 worth) again to receive a decentralized loan, receive 333.33 dUSD and buy 133.33 DFI

After one year DFI price goes up to $4.00 dUSD.

  • For additional triple long position: Sell 133.33 DFI on DEX and get 533.33 dUSD. Put 333.33 dUSD + 16.66 dUSD interest into loan (profit: $183.34)
  • Sell the 200 DFI on the DEX and receive 800 dUSD. With 500 dUSD + 25dUSD of interest close the loan and receive your investment of 300 DFI (profit: $275).
  • Sell your investment of 300 DFI for 1200 dUSD (profit: $450)

Overall profit: $450 + $275 + $183.34 = $725/$908.34 (double/triple long) Result without leverage: 450dUSD

→ The best case for this investment: the DFI price increases (and never drops to liquididation level).


Leverage of DFI – DFI Multiple long/Asset short

Investment thesis

The future price of DFI will be higher than it is today and you want to participate with more then lineare increase. At the same tome the asset price decreases.

DefiChain procedure

  • Put some coins (e.g. DFI) as a collateral into a decentralized loan and mint an asset token
  • Sell this asset token on the DEX for v dUSD
  • Buy more DFI on the DEX with dUSD for price x
  • Optional: if you want, repeat this steps

Goal in the future

  • Sell your DFIs for price y
  • Buy back the asset token for w dUSD
  • Close the loan by returning the asset token + paying the fee
  • Optional: if needed, repeat steps before until all loans are closed

Profit (double long):

(y-x) * DFIinvest * (1 + (1 / collateralization - ratio)) + (v - w) - feeloan

Remarks (additional to first scenario)

  • You are betting on two assets

more possible profit but higher risk to loose collateral (DFI price decreases and asset token increases)

  • You have higher multiple liquidation risks if the prices of your collaterals falls to low

Example (maximum leverage)

  • With a DFI price of $2.50 you buy 300 DFI (investment $750) and use them to receive a decentralized loan (investment: $750)
  • For the value of $750 you get 0.5 TSLA (150% collateralization and TLSA price of $1000). You sell this 0.5 TSLA on the DEX and get 500 dUSD (investment: $500)
  • You use these dUSD to buy 200 DFI on the DEX (investment: $500)

After one year the DFI price increases to $4.00 dUSD and the TSLA price decrease to $500:

  • Sell the 200 DFI on the DEX and get 800 dUSD (profit: $300)
  • With 250 dUSD + 12.5dUSD of interest you can buy back the needed TSLA token and close the loan (profit: $237.5)
  • Get back your investment of 300 DFI und sell them for 1200 dUSD (profit: $450)

Overall profit: $450 + $237.5 + $300 = $987.5 Result without leverage: $450dUSD

→ Best case for this investment: DFI price goes up and asset price goes down


Leverage of DFI – Liquidation risk

Liquidation risk

If the value of your collateral drops below the defined loan level, you have to increase it. Otherwise your loan will be auctioned off. Using a combination of DFI and some stable coins like USDC or USDT as a collateral can reduce the risk, because half of the holdings are stable against US-Dollar.

For a better understanding and comparabillity, we will introduce some figures

  • Token value: V
  • Collateral value: C
  • Collateral ratio: r = C / V
  • Loan collateralization level: L

To avoid liquidation the following inequality must always be fullfilled:
L <= r

With this the relative part of your collateral representing loan level is:
L = r * x x = L / r

Now, the question of how much your collateral ratio can drop, can be derived:
d = 1 - x = 1 - (L / r)

Example With a DFI price of $2.50 you put 100 DFI (investment = $250) into a decentralized loan with a collateralization level of 200% and generate an asset token $100 worth. (For constant asset value), your collateral must stay above $200 to avoid liquidation.

→ Possible price reduction befor liquidation:
d = 1 (200% / ($250 / $100)) = 1 - (200% / 250%) = 20%

Depending on the planned collateral ratio, you can decide which loan level fits your willing ness to take risk. Have in mind, that the lower loan colleralization levels will have higher interest.

Table of allowed change in collateral ratio:

Invested collateral ratio
Loan collateralization level 200% 300% 400% 600% 800% 1000% 1200% 1500%
150% 25.0% 50.0% 62.5% 75.0% 81.3% 85.0% 87.5% 90.0%
175% 12.5% 41.7% 56.3% 70.8% 78.1% 82.5% 85.4% 88.3%
200% n/a 33.3% 50.0% 66.7% 75.0% 80.0% 83.3% 86.7%
350% n/a n/a 12.5% 41.7% 56.3% 65.0% 70.8% 76.7%
500% n/a n/a n/a 16.7% 37.5% 50.0% 58.3% 66.7%
1000% n/a n/a n/a n/a n/a n/a 16.7% 33.3%

If your collateral is only DFI and the assets price remains constant, the table directly reflects the allowed DFI price change.

Using a stable coin (e.g. USDC) as part of the collateral will reduce the volatility and can reduce the liquidation risk.


Leverage of DFI – Level of Leverage

Level of leverage

The leverage depends on the number of iterativley creared loans and converges to a fix ratio. This depends on the used collateral ratio.

Example With a DFI price of $2.50 you buy 400 DFI (investment $1000) and put them into a decentralized loan. You get 500 dUSD (200% collateralization) and buy 200 DFI
Holdings (with collaterals): 600 DFI = 1.5 * 400 DFI

→ Leverage factor: 1.5

Table with leverage factors for different collateral ratio:

Level of Leverage
Collateral ratio 1 Loan 2 Loans 3 Loans 4 Loans 5 Loans
175% 1.57 1.90 2.08 2.19 2.25
200% 1.50 1.75 1.88 1.94 1.97
300% 1.33 1.44 1.48 1.49 1.50
400% 1.25 1.31 1.33 1.33 1.33
800% 1.13 1.14 1.14 1.14 1.14
1000% 1.10 1.11 1.11 1.11 1.11
1500% 1.07 1.07 1.07 1.07 1.07

For effective leveraging you need a low collateral ratio, which will be near the liquidation level - higher risk!



Part 4: Arbitrage trading of dUSD – DFI pool

Arbitrage trading of dUSD – DFI pool – Crypto arbitrage

Arbitrage trading of dUSD – DFI pool – Crypto arbitrage.png
Arbitrage trading on current Crypto-DEX

Scenario 1: DFI is cheaper on DEX

  • Buy DFI on DEX with dXYZ (e.g. dBTC)
  • Sell DFI on Echange for XYZ (e.g. BTC)
  • Transfer XYZ to Cake
  • Withdraw XYZ and swap to dXYZ

Scenario 2: DFI is more expensive on DEX

  • Same procedure in the reverse direction

External resources allow perfect arbitrage


Arbitrage trading of dUSD – DFI pool – dUSD arbitrage

Arbitrage trading of dUSD – DFI pool – dUSD arbitrage.png
Arbitrage trading on decentralized assets DEX

Scenario 1: DFI is cheaper on DEX

  • Mint dUSD
  • Buy DFI on DEX with dUSD
  • … wait …
  • Sell DFI on DEX for dUSD


Scenario 2: DFI is more expensive on DEX

  • Sell DFI on DEX for dUSD
  • … wait …
  • Buy DFI on DEX with dUSD

The decentralized assets will be a closed ecosystem on DefiChain. No other opportunities to buy or sell DFI for arbitrage. Everything must be done via loans or DFI. Closing arbitrage position only in the reverse way of opening it.

No external or other resource for arbitrage


Arbitrage trading of dUSD – DFI pool – Overall control

Arbitrage trading of dUSD – DFI pool – Overall control.png

The operator of the loan schemes can influence the buy or sell pressure in the dUSD-DFI pool by changing the interest rates.


Part 5: Arbitrage trading of dUSD – asset pool