Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 844 Bytes

NOTES.md

File metadata and controls

17 lines (12 loc) · 844 Bytes

NOTES

While researching different implementations of a bonded curve formula we found that nobody covers the case where the balance = 0.

Current problem

Due to approximation errors, the current implementation can lead to the following:

  • an actor is able to take a bit more than they should and the contract can get to a state where it cannot payout because of balance difference

Useful resources:

Conclusions:

  • bancor formula (the one we try to replicate and use here) is for any polynomial which makes it a bit more complex that it should
  • defining a square root formula with an integer coefficient will be trivial to implement
  • same goes for a linear formula