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

Is Ann correct? #149

Open
zgfzgf opened this issue Mar 4, 2022 · 4 comments
Open

Is Ann correct? #149

zgfzgf opened this issue Mar 4, 2022 · 4 comments

Comments

@zgfzgf
Copy link

zgfzgf commented Mar 4, 2022

Ann: uint256 = convert(self.A, uint256) * N_COINS

should be:
Ann: uint256 = convert(self.A, uint256) * N_COINS * N_COINS

@klouskingsley
Copy link

same confusion

1 similar comment
@beatriz-web3
Copy link

same confusion

@harry1k
Copy link

harry1k commented Jun 8, 2022

I think it should be changed
convert(self.A, uint256) * (N_COINS ** N_COINS)
not
convert(self.A, uint256) * N_COINS * N_COINS

@SuDo-Chance
Copy link

SuDo-Chance commented Aug 17, 2022

I think this question can be solved by this annotation.
https://github.com/curvefi/curve-contract/blob/master/contracts/pool-templates/base/SwapTemplateBase.vy#L136
The A passed into the contract is "A * (n ** (n - 1))" (there is a typo on it.), not the A shown in the equation. Thus, Ann is correct. Maybe the "self.A" might not be named as "self.A", it will make people confused.

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

5 participants