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

Fix misleading _A argument description #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

markolazic01
Copy link

Current description of _A does not comply to invariant math used in contract. Typo is present in multiple pool contracts, I'm pushing this as an example fix.

What I did

Fixed one of the present typos which provide misleading interpretation of _A argument.
This fix as an example of how this description should be adapted through the codebase, as it is widely present.

Related issue: #
_A argument should be described as "amplification coefficient multiplied by n ** (n-1)"
instead of "amplification coefficient multiplied by n * (n-1)".
(the diff is only one "*")

How I did it

I reviewed the Ann computation and concluded that for A = ac * n * (n-1), A * n != Ann
but for A = ac * n ** (n-1), A * n == Ann
// ac == amplification coefficient

How to verify it

Check Ann computation within pools that are based on stable-swap invariant

Current description of _A does not comply to invariant math used in contract.
Typo is present in multiple pool contracts, I'm pushing this just as an example typo fix.
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

Successfully merging this pull request may close these issues.

1 participant