bonding-curves icon indicating copy to clipboard operation
bonding-curves copied to clipboard

Evaluate the approaches between BancorFormula and PriceCurves

Open lsaether opened this issue 7 years ago • 0 comments

Along my journey of scouring the existing code and documentation surrounding curve bonded tokens I've noticed two differing approaches:

  1. The use of Integral formulas which will calculate the price give the inputs of _totalSupply, _poolBalance, and _amount. This initially cause me much trouble as I was accepting the value returned from these curves as the return amounts. After some testing I found that they were the integrals for the prices instead, which IMO is less than ideal.

  2. The second approach I'm still wrapping my head around. The use of the BancorFormula seems to make it so that the smart contract can synthesize the correct amount of tokens given the input of _amount. I'm skeptical because this is much more complex of an approach and uses Bancor's "proprietary" smart contract. It needs some closer inspection and research. Ultimately I think the opportunity is bright along these lines by creating variation of the BancorFormula, but this is just late night conjecture.

lsaether avatar Oct 14 '18 23:10 lsaether