Bancor Formula: The Magic of The Maths

Copre Dam
4 min readNov 27, 2017

--

The magic is in the math, with a simple formula balancing buys and sells so that every token in the network maintains a formulaic relationship to others. The result is continuous liquidity regardless of trade volume or exchange listings.

Math allows us to see the hidden structures underneath the messy and chaotic surface of our world. It has the ability to take parameters, numbers, and signs, and turn them into a function, a function that can predict the future (or the risks ahead). It is something so valuable in having a better understanding of the way things work.

When using math to analyze a real-world situation, there is always some level of assumption at hand. You can’t always guarantee the parameters within which your expectations and mathematical model will go to work. This means that even the most advanced model relies somewhat on hope, or that things will act as expected.

In statistics, the correlation coefficient measures the dependence of two variables. The correlation coefficient ranges between (+1) to (-1), where +1 indicates that two variables move in lockstep, while (-1) represents two variables that move in the exact opposite direction. The investment theories that were developed in the 20th century rely heavily on correlation assumption. Portfolio Diversification reduces the risk by reducing asset’s correlation.

While math can’t help anyone to beat the stock market but it is certainly valuable to create a powerful financial platform that can adapt strategies of their own accord like what Bancor Protocol™ does in the cryptocurrency world.

The Bancor Protocol™ is a technical revolution allowing tokens to be converted without matching two parties with opposite wants. The magic is in the math, with a simple formula balancing buys and sells so that every token in the network maintains a formulaic relationship to others. The result is continuous liquidity regardless of trade volume or exchange listings. It is an upgraded functionality standard for Ethereum tokens which allows smart contracts to be their own market makers. These Smart Tokens™ hold “Connector” tokens which plug them into a decentralized liquidity network.

What is unique about Smart Tokens™ is the Bancor Formula coupled with the Smart Token’s™ ability to create new tokens when a purchase is made through the contract, and to destroy tokens when a sale is made through the contract, resulting in a token supply which is adaptable to demand.

Smart Tokens™ utilize a novel method for determining the price at which they can be converted to/from their Connectors, the Bancor Formula. The formula is driven by a constant called the “Weight,” and which must be greater than 0 and less than or equal to 100%. The Weight is set by the Smart Token’s™ creator, for each Connector, and used in price calculation, along with the Smart Token’s™ current supply and the balance of the held Connector, in the following way:

This calculation ensures that a constant ratio is kept between the Connector balance and the Smart Token’s™ Total Token Value (“TTV”), which is equal to the outstanding supply of the Smart Token™ times its price. Dividing the TTV by the supply produces the price according to which the Smart Token™ can be purchased and sold through the Smart Token’s™ smart contract. The Smart Token’s™ price is denominated in the Connector and readjusted by the Smart Token’s™ smart contract per each purchase or sale, which increases or decreases the balance of the Connector held by the contract and the Smart Token™ supply (and thus the price). When Smart Tokens™ are purchased from the Smart Token’s™ smart contract (in exchange for any of their Connectors) the payment for the purchase is added to the balance of the Connector held by the contract, and based on the calculated price, new Smart Tokens™ are created and added to the buyer’s balance. Due to the calculation above, a purchase of a Smart Token™ with a less than 100% total Connector Weight will cause its price to increase, since both the Connector balance and the total supply of the Smart Token™ are increasing, while the latter is multiplied by a fraction.

This formula ensures a fair market standard since it can not be played by “pump or dump” scheme or other manipulation activities because when a purchase or sale is executed, the effective price is calculated as a function of the transaction size. The calculation can be described as if every conversion is broken up into infinitely small increments, where each increment is changing the Smart Token’s™ supply, Connector balance, and thus its price, proportionally. So even if a whale trying to manipulate the market, he will end up with nothing since the price will always changing whenever he buys or sells.

In the future, Bancor intends to implement Smart Tokens™ on other smart contract-based blockchains.

Knowing the math is not enough. We need to be able to apply those tools creatively to the problems we will encounter. The ability to marshall all of our knowledge to solve a problem is incredibly important, and if we are able to answer questions which no one else can answer, that makes it more important.

--

--