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

Pool keeps track of it's reserve #21

Open
Neylix opened this issue Nov 13, 2023 · 0 comments
Open

Pool keeps track of it's reserve #21

Neylix opened this issue Nov 13, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Neylix
Copy link
Member

Neylix commented Nov 13, 2023

Describe the problem you discovered

Currently the implementation means that the number of token in a pool + the number of token in its reserve address is exactly the amount that have been created on Archethic.
However if someone send tokens directly to the pool or the reserve address, then we cannot rely on there balance to ensure the 1:1 ratio of the bridge.

Describe the solution you'd like

To ease the calculation of this ration, the pool can have a new public variable "reserve" that must be update every time a swap is finished. So this variable should always be the exact amount that as been bridged

Epic

No response

@Neylix Neylix added the bug Something isn't working label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant