dOrgTech / OpenRaise

Bonding Curves For DAOs
MIT License
76 stars 26 forks source link

Curve simulations (test accuracy of bancor math) #54

Open tspoff opened 4 years ago

tspoff commented 4 years ago

We want to understand & visualize precision and see if there are any errors.

BenSchZA commented 4 years ago

@tspoff I followed a similar process for our Molecule linear bonding curve, here's the Python Jupyter notebook: https://gitlab.com/linumlabs/molecule-system-modelling/blob/master/jupyter-lab-environment/workspace/uint256-precision.ipynb

I emulated the Solidity uint256 data type precision in Python, and recreated the Solidity functions in Python using these data types. Could give that a try for the BC-DAO implementation, but I think it would be a lot more complex.

tspoff commented 4 years ago

Hey Ben,

Thanks for the link - this looks like an excellent reference point for what we're aiming to do here. The immediate focus is just on sanity-checking the math, though we're definitely interested in what blockscience is doing with cadCAD for evaluating the system more holistically.

BenSchZA commented 4 years ago

No problem :) That's exactly what we used the code for, some sanity checking - ended up setting the specific upper bound limits as requirements in the Solidity code after testing them in Python. I've also done a few cadCAD models for our projects and others - definitely more involved.