bitshares / bitshares/bitshares-ui
Estimated liquidity pool staking asset calculated amount wrong?
- Dominant language
- JavaScript
- Stars
- 520
- Forks
- 575
- Avg merge
- 12h 7m
- Merged PRs (30d)
- 5
Description
**Describe the bug**
I tried staking approx 50k BTS and 400 EOS, the estimated share asset amount in return was calculated as around 37 BTWTY.BTSEOSLP
After staking, my balance of this share pool asset is closer to 49.5K BTWTY.BTSEOSLP, significantly more than the 37 quoted earlier.
**To Reproduce**
Stake BTWTY.EOS and BTS in the BTWTY.BTSEOSLP liquidity pool.
Compare estimated pool share amount to actual received pool share amount.
**Expected behavior**
The estimated pool share amount shown in the UI should be correct.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
Windows 11, light client 230907.
**Additional context**
Similar implementation: https://github.com/BTS-CM/astro-ui/blob/main/src/components/PoolStake.jsx#L965
Astro implementation may also be outputing an inaccurate value.
Contributor guide
Research direction
Start with the linked Astro implementation in src/components/PoolStake.jsx around line 965, then reproduce staking BTWTY.EOS and BTS in the BTWTY.BTSEOSLP pool and compare the estimated and received share amounts. Done means the UI estimate matches the actual pool-share asset amount.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100