# ETF

## Introduction

ETF (Exchange Traded Fund) is a very popular financial derivative in the traditional financial market. It is a trading product that tracks the multiples of the rise and fall of the target asset (such as BTC) and has leveraged attributes.

ChainUp ETF products, similar to huobi's ETP (Exchange Traded Products) products.



The currency in the name of the ETF product represents the underlying asset being tracked, and the numbers represent the direction and multiples of long and short positions, for example:

* BTC 3x long product, its English name is BTC 3X Long, abbreviated as **BTC3L**;
* BTC 3 times bearish product, its English name is BTC 3X Short, abbreviated as **BTC3S**;
* For every 1% increase in BTC, the net value of BTC3L increases by 3%, and the net value of BTC3S decreases by 3%.

The bottom layer of ChainUp ETF products is connected with **futures transactions**, ensuring that when users trade ETFs, there are corresponding contract positions at the bottom layer, which can hedge exchange risks and redeem users' profits. For example, if a user buys 1 share of BTC3L/USDT, the system needs to open a corresponding long position of 1 share of BTCUSDT 3 times. Therefore, ETF currency pairs need the support of liquidity market making. <mark style="color:red;">Before opening ETF currency pairs, it is necessary to connect with liquidity in advance.</mark>

ETF leverage can be adjusted arbitrarily. The current liquidity environment supports a maximum leverage of 20 times.



## Background Config

### **Turn on the ETF switch**

Path: System Configuration → Basic Configuration → KV Configuration, search for "is\_open\_etf", and turn on the ETF switch, as shown in the figure below.

<figure><img src="https://1775041679-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd1cEhboqiukWysySwLsO%2Fuploads%2F0mAk781AyCYL72FcOn3w%2Fimage.png?alt=media&#x26;token=6e9ecd4e-102a-4b77-9b19-d0a30e4ad31a" alt=""><figcaption></figcaption></figure>

### **Add ETF Token**

To add an ETF exclusive currency, please refer to [Token Config](../spot#token-config), the currency name is the regular currency name followed by the multiple and direction, such as BTC3L (more than 3 times), ETH3S (three times empty), the currency information reference is normal The currency is sufficient, as shown in the figure below.

<mark style="color:red;">The ETF currency only needs to be open for trading, and does not need to be open for deposit and withdrawal (users buy with USDT, and finally sell and convert to USDT to obtain income).</mark>

<figure><img src="https://1775041679-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd1cEhboqiukWysySwLsO%2Fuploads%2F9JVlbCX7bscUsbkc8MXp%2Fimage.png?alt=media&#x26;token=d2bd7134-4c6f-47ce-8193-81064fd963ff" alt=""><figcaption></figcaption></figure>



### **Add ETF Coinpair**

To add an ETF exclusive currency pair, please refer to [Coin Pair Config](../spot#coin-pair-config). The number of currency pairs, price accuracy, depth accuracy and other information must be consistent with the liquidity. Select “Yes” for “Whether it is an ETF trading pair”, as shown in the figure below.

<figure><img src="https://1775041679-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd1cEhboqiukWysySwLsO%2Fuploads%2FZNdACT552fwJXi3z5lbI%2Fimage.png?alt=media&#x26;token=f696f5cb-fa87-4795-8d97-1cba6ada3ae1" alt=""><figcaption></figcaption></figure>

If the Add/Edit pop-up window does not have the option "Belong to ETF Trading Pair", please check whether [the ETF switch](#turn-on-the-etf-switch) is turned on. After configuration, the spot trading interface will display "ETF trading area", and all ETF trading pairs will be displayed in this trading area, as shown in the figure below.

<figure><img src="https://1775041679-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd1cEhboqiukWysySwLsO%2Fuploads%2Fw3Bt4udaty7k8LbQvds7%2Fimage.png?alt=media&#x26;token=b1e59d43-3d8e-46d5-b147-f94600bfd4c8" alt=""><figcaption></figcaption></figure>

##

## Joint stock (necessary for daily operation)

Because the ETF product is a fund product, the initial net value is 1, and it tracks the multiple rise and fall of the underlying asset, so once the price falls (the net value price is lower than or on the verge of falling below 0.01U), the platform needs to share the product Operation (the combination of N shares and 1, N: generally a multiple of 10, 100, 1000, etc. 10), the net value price after the merger becomes N times before the merger, but the corresponding quantity will also become 1/N before the merger, The user's total assets will not be affected in any way to improve the sensitivity of price changes and optimize the trading experience.

Example: A user holds 10,000 copies of XRP3S, the net value of each share is 0.010000, and the total amount is 100 USDT. After the merger, he will hold 100 copies of XRP3S (the quantity is reduced by 100 times), the net value of each share is 1.000000 (the value is increased by 100 times), and the total amount remains unchanged at 100 USDT.

<mark style="color:red;">Whether the ETF currency pair needs to be combined is determined by the liquidity market making team.</mark>



### **Joint stock process**

1. The exchange prepares a user account as the account for depositing ETF assets;
2. The liquidity market maker initiates a stock-joining application to determine the ETF trading pairs that require stock-joining;
3. The exchange confirms the ETF trading pair that needs to be merged, and informs the user in various ways after determining the time of the merging;
4. During the period of joint stock exchange, the exchange closes the currency pair and cancels the relevant currency pair order (if the cancellation order fails, contact R\&D for processing);
5. Check whether the amount of the ETF currency is all in the available spot account (if other account types have balance, it is necessary to confirm whether the user account is the exchange's own account, and other account assets must be transferred to the spot account first)
6. DBA backup asset data;
7. DBA checks for non-usable assets;
8. Execute the ETF merging script (transfer xx shares of the user's merging currency greater than 0 to the exchange merchant's own user account, the account prepared in the first step, <mark style="color:red;">the ETF assets of this account must not be used</mark>);
9. After the script is successfully executed, the assets are checked for correctness, and the merchants of the exchange will check the assets for the second time;
10. After the liquidity market maker confirms that it is normal, the exchange will reopen the currency pair;

**Take 100 times stock as an example:**

The user ID 8888 (assuming the asset is 0) provided by the xrp3s exchange of the joint stock currency, the xrp3s balance of A (user ID 6666) is 10000, and the xrp3s balance of B (user ID 3333) is 20000, which will:

* A's assets of 10000\*0.99=9900 are given to 8888, then user A's remaining assets are 10000\*0.0.1=100, A's assets decrease by 9900, and 8888's assets increase by 9900, becoming (0+9900)
* B's assets 20000\*0.99=19800 is given to 8888, then user B's remaining assets are 20000\*0.0.1=200, B's assets decrease by 19800, and 8888's assets increase by 19800, becoming 29700 (9900+19800)
