Evaluate the approaches between BancorFormula and PriceCurves
Along my journey of scouring the existing code and documentation surrounding curve bonded tokens I've noticed two differing approaches:
-
The use of Integral formulas which will calculate the
pricegive 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. -
The second approach I'm still wrapping my head around. The use of the
BancorFormulaseems 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 theBancorFormula, but this is just late night conjecture.