-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contribute Bancors Power Function #1246
Conversation
7493458
to
c1f3199
Compare
@tarrencev: It provides an optimized version of One may configure these specific ranges in this file, and then regenerate the contract by running the scripts in this folder. It is worth noting that the Not designated, because (as documented in the code) instead of calculating Not used, because each one of its callers (functions Thanks |
@barakman thank you for taking a look and providing feedback. I will migrate this over to the new version. In that case, perhaps we should assert that |
@tarrencev: The reason why I refrained from adding this assertion, is the fact that for the specific purposes of the If you detach it from this contract into a standalone contract (or library), then such Side note: Thanks |
Thanks again @barakman. I've merged the latest Bancor implementation of the power function, including the additional Please let me know if you have any further feedback. |
Well, for once, it might be worth adding all the relevant Python scripts used for auto-generating different parts of the code. Each such file is mentioned in a comment above the relevant code snippet in the contract, and they are all located here (probably best to add the entire folder). Additionally, you may as well replace Thanks |
@barakman: I've addressed the feedback re: assert. As for adding the Python scripts, I am happy to do that if the maintainers are OK with introducing Python. I agree it makes sense to do so. |
Another thing... If memory serves correctly, the initial motivation for this thread derives from a different thread, aiming at adding Bonding Curve support in OpenZeppelin infrastructure, based on the two formulas in Bancor's white-paper. I do not know whether or not these two threads are still related in any manner, but please note that those formulas are implemented in functions Thanks |
I've realized that changing the You can fix that in either one of the following ways:
If you're not relying on BancorFormula.js for testing, then you can just go ahead and replace the remaining Thanks |
I've recently extended the documentation of the exponentiation infrastructure (more specifically, functions Again, it is currently available at branch 0.4.4, which AFAIK is supposed to be released relatively soon. As I mentioned before, this branch also includes the replacement of Thanks |
Closing due to staleness. |
Contributes toward #819, addressed feedback in #827
🚀 Description
Adding Bancors Power function created by @barakman, which is necessary for the implementation of bonding curves, particularly logarithmic functions.
This PR extracts from logic from #827, contributed by @balasan, as per the feedback in that PR.
npm run lint:all:fix
).Tagging reviewers of previous PR: @balasan @shrugs @oed @okwme @barakman @nventuro