Skip to content
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

Implement Black-Scholes in the AMM for better pricing #59

Open
zareth-san opened this issue Aug 13, 2021 · 0 comments
Open

Implement Black-Scholes in the AMM for better pricing #59

zareth-san opened this issue Aug 13, 2021 · 0 comments

Comments

@zareth-san
Copy link
Contributor

One immediate improvement we can do on the AMM even before we figure out dynamic pricing is to start using full black-scholes. We can totally do it on Polygon / L2. Here are solidity implementation examples:

https://github.com/pods-finance/contracts/blob/develop/contracts/amm/BlackScholes.sol
https://github.com/keep3r-network/keep3r.network/blob/master/contracts/Keep3rV1Volatility.sol

Some rough steps to take for completing this task:

  1. Decide whether we want to use these contracts as inspiration to write our own from scratch, or do we treat these more or less as a black box and copy + paste them into our protocol in place of our current MinterAmm.calcPrice? For now it'd probably be better to treat it as a black box, but learn enough about these implementations to know what the arguments are used for
  2. Create a PR with tests which replaces calcPrice with the necessary contracts here
  3. Update the deploy_singleton.ts scripts to correctly deploy the Black-Scholes contracts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant