-
Notifications
You must be signed in to change notification settings - Fork 115
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
Consideration on AMM parameters #4488
Comments
I don't see why not really, some may even want it, but more imporantly, there are lots of edge cases of "problems" with any values, see response here: #4151 (comment)
I think this value also should pretty much be unconstrained.
What is eval function? |
|
Runtime expects the extrinsic caller to specify bot parameter a and b used for the amm price point computation: joystream/runtime-modules/project-token/src/types.rs Lines 575 to 576 in 564e4e0
joystream/runtime-modules/content/src/lib.rs Lines 3721 to 3722 in 564e4e0
During our design meetings however, we established that however there should have been a default value. This can be enforced either: EDIT: One pro of option A (instead of having the value hardcoded in the runtime code in B) is that if the value doesn't work we re-deploy atlas instead of performing a runtime upgrade. Another pro is that we can fetch JOY price if needed |
Goal: emulate Deso curve for CRT circulation ~ CRT USD-price profile: Deso is using the following formulation for its AMM.
namely a This gives the value for Notice how the values for CRT circulation ~ CRT USD-price are similar to the ones provided by deso when the circulating amount is small. To summarise
Given the above observation |
AMM pricing formula:
Considerations
x
= AMM provided liquidity: i.e. only the token minted through the AMM will be taken into account for price computation). This will make the semantics forb
to be "initial unit price". I think that this is way more manageable than using thetoken_total_supply
from a runtime POV.a
. Cana
be zero? I don't think so, otherwise you should issue a sale usabilityb
be zero? I think it should if we allow a sale to havesale_price = 0
.a,b
too high: Numeric overflow in price computation. But the eval function will protect against this.a,b
too low: Supply dilution (which can be view as vulnerability ) thus they should be set by the governancea,b
should be thought as on aThe text was updated successfully, but these errors were encountered: