Bancor 3 Mechanics - #3 Overview of Deficit and Surplus on Bancor 3

Overview of Deficit and Surplus on Bancor 3

So far, our example has focused on a swap between Token A and BNT. In Bancor 3, all TKN pools are paired with the BNT Omnipool, meaning BNT is the bridged asset between any TKN to TKN swaps (e.g. ETH to wBTC). Consider the initial example:

  1. TKN A → BNT

  2. BNT → TKN B

This is probably one of the most common (if not the most common) swaps that happen in Bancor 3 and it affects deficits and surpluses across the entire protocol. Let’s walk through an example of a TKN to TKN swap between two pools that use BNT as the intermediary asset.

On the left hand side, we have a pool that is composed of 3 Token A and 4 BNT. On the right hand side we have a pool that is composed of 5 Token B and 4 BNT. A total of 8 BNT exist in the Omnipool. An outside trader is looking to swap 1 Token A for 1 Token B.

The first swap that occurs is in the Token A pool and 1 Token A is added into the pool while 1 BNT is removed. The state of the Token A pool after the swap is 4 Token A and 3 BNT. This translated to a surplus of 33% on Token A and a deficit of 25% on the BNT side in the Token A pool. Note that internally, the BNT hasn’t left the system and it resides in the omnipool for the next hop of the trade.

The next trade that needs to happen is swapping BNT to Token B. The available BNT is added to the BNT side of the Token B pool and 1 Token B is removed from the Token B pool. This Token B has now left the system and belongs to the trader who initially added 1 Token A to receive 1 Token B token in return.

We now have a deficit of 20% on Token B and a surplus of 25% on the BNT side in the Token B pool.

The overall deficit and surplus of the system is the following:

  1. 33% surplus on Token A in the Token A pool

  2. 25% deficit on the BNT side in the Token A pool

  3. 20% deficit on Token B in the Token B pool

  4. 25% surplus on the BNT side in the Token B pool

Looking at the system as a whole, the BNT Omnipool does not have a surplus or deficit as BNT tokens have just been shuffled around internally. On the TKN side, Token A has ended with a surplus while Token B is in deficit. This example is used to illustrate that deficits and surpluses in Bancor 3 are a result of trades occurring in the network and fluctuate depending on the trades. In a sense, surpluses and deficits are inherent to Bancor 3 and the relative deficit or surplus of Tokens is a direct result of trading activity.

Last updated