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

Problem with receipt tokens, claiming token percentages incorrect. #8

Open
mattsmithies opened this issue Feb 17, 2021 · 1 comment

Comments

@mattsmithies
Copy link
Contributor

mattsmithies commented Feb 17, 2021

Issue

Claiming a receipt will return the value of tokens with respect to the balance of the holder. If I mint 100 receipts, keep 5 in my inventory, the calculation for returning assets will be based on the 5. For instance "claiming 1 token will return 20% of all assets".

Diagnosis

Calculated based on the amount and the supply left in the pool. This will likely need revisiting.

Something along these lines.

parseInt(this.holding.amount) / parseInt(this.pool.amount)) / 100 * this.percentage

Resolution

Solved for prototype release v0.0.3

@mattsmithies
Copy link
Contributor Author

Changing release expectation, add a slider for a user to withdraw a percentage of their tokens.

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

1 participant