Skip to content

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