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

bug: Rewards are not allocated when allocating all balances of the farming pool #134

Closed
hallazzang opened this issue Sep 23, 2021 · 0 comments · Fixed by #135
Closed

bug: Rewards are not allocated when allocating all balances of the farming pool #134

hallazzang opened this issue Sep 23, 2021 · 0 comments · Fixed by #135
Assignees
Labels
bug Something isn't working

Comments

@hallazzang
Copy link
Contributor

Description

When the sum of epoch ratios of all plans that have the same farming pool is 1, rewards will never be allocated at the end of the epoch.

It seems this code causes the bug:

balances := farmingPoolBalances[farmingPool]
if !totalCoins.IsAllLT(balances) {
continue
}

We should use IsAllLTE, not IsAllLT here.

@hallazzang hallazzang added the bug Something isn't working label Sep 23, 2021
@hallazzang hallazzang self-assigned this Sep 23, 2021
hallazzang added a commit to hallazzang/farming that referenced this issue Sep 23, 2021
hallazzang added a commit to hallazzang/farming that referenced this issue Sep 23, 2021
@dongsam dongsam added this to the Farming F1 v1.0 milestone Sep 24, 2021
jaybxyz added a commit to jaybxyz/farming that referenced this issue Sep 24, 2021
…131-fix-update-public-proposal

* commit '85846bac8ea958afc14475ee32b7a5f9ae501bb8':
  docs: update issue, pr template
  docs: add bedges and update issue template
  test: add more test cases for edge case
  test: add test case for tendermint#134
  chore: fix typo
  fix: use IsAllLTE instead of IsAllLT
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

Successfully merging a pull request may close this issue.

2 participants