# Trading and Fees - TKN to TKN

Bootstrap requirements met for eth
Bootstrap requirements met for wbtc

v3.describe()

Trading Liquidity Vault Staking ERC20 Contracts Vortex External Protection Protocol WalletState
0 bnt=20000.000000 eth=20.000000 bnt=22.384703 bnt=15.980730 bnbnt=0.000000 bnt=8.390787 bnt=0.000000 bnbnt=20000.000000
1 bnt=20000.000000 wbtc=1.250000 eth=101.000000 eth=101.000000 bneth=101.000000 eth=0.000000
2 bnt=20013.993917 link=3336.331433 wbtc=101.000000 wbtc=101.000000 bnwbtc=101.000000 wbtc=0.000000

# Trading and Fees - TKN to TKN¶

Assume now that a trader wishes to exchange 1 ETH for wBTC. From their perspective the process is similar to that described above. A total of 1 ETH tokens are sent into the vault, and the vault sends 0.055712824 wBTC tokens back, and the change in the vault balances agree with the trader’s intuition (as before). However, this situation compounds the effects described in the previous two sections. The changes in the trading liquidity balances, and the accumulation of value to the vortex ledger, can be deduced by considering the two separate legs of the process:

1. Swap 1 ETH for 942.857143 BNT

• Add 7.619047619 BNT to the staking ledger

• Add 1.904761905 BNT to the vortex ledger

2. Swap 942.857143 BNT for 0.055712824 wBTC

• Add 0.000450205 wBTC to the staking ledger

• Add 1.973681795 BNT to the vortex ledger

v3.trade(tkn_amt=1, source_token='eth',  target_token='wbtc', user_name='Trader', timestamp=0)

v3.describe(decimals=4)

Trading Liquidity Vault Staking ERC20 Contracts Vortex External Protection Protocol WalletState
0 bnt=19055.2381 eth=21.0000 bnt=22.3847 bnt=23.5998 bnbnt=0.0000 bnt=12.2692 bnt=0.0000 bnbnt=20000.0000
1 bnt=20940.8835 wbtc=1.1943 eth=102.0000 eth=101.0000 bneth=101.0000 eth=0.0000
2 bnt=20013.9939 link=3336.3314 wbtc=100.9443 wbtc=101.0005 bnwbtc=101.0000 wbtc=0.0000

It is important to realize that there is no BNT transfer, despite both pools reporting a change to the BNT trading liquidity. A virtual trade has been performed, where BNT is still used as numeraire, and which allows for the relative value of ETH and wBTC to be known. Since the liquidity pools are virtual, their relative balance of BNT can be adjusted as though the tokens were sent, when in fact the BNT remains where it was in the vault. Thus, a quasi-single hop trade is achieved.

Therefore, during the trade the following components of the system were changed:

1. The vault balances. The change in the vault is always in agreement with the trader’s intuition. In this case, the trader sent 1 ETH into the vault, and received 0.055712824 wBTC from it. Therefore, the vault balance of ETH must have increased by 1 ETH, and decreased by 0.055712824 wBTC.

2. The staking ledger. Trading fees are always taken from the target asset, in this case there are two:

3. The first virtual trade to BNT, resulting in a 7.619047619 increase to the BNT staked balance.

4. The second virtual trade, resulting in a 0.000450205 increase to the wBTC staked balance.

Therefore, the value of the bnBNT pool token, and wBTC pool token must be appreciated by 80% of the fee apparent to the trader (i.e. the total fee - vortex rate).

1. The vortex ledger. Both virtual trades have an apparent effect on the vortex ledger. In the first virtual trade to BNT, one fifth of the fee paid by the trader is collected by the vortex directly; in the second virtual trade, one fifth of the fee in wBTC is swapped back to BNT. Both are added to the BNT balance of the vortex ledger.

2. The trading liquidity. The changes to the trading liquidities on both pools can be understood after accounting for the effect of the collectionby the vortex.

The change in the BNT, ETH, and wBTC trading liquidity can be expressed as follows: