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

Incorrect budget validation may reject valid overlapping budget plans #109

Closed
4 tasks
dongsam opened this issue Mar 6, 2022 · 0 comments · Fixed by #110
Closed
4 tasks

Incorrect budget validation may reject valid overlapping budget plans #109

dongsam opened this issue Mar 6, 2022 · 0 comments · Fixed by #110
Assignees
Labels
bug Something isn't working

Comments

@dongsam
Copy link
Contributor

dongsam commented Mar 6, 2022

Summary of Bug

The implemented logic is too restrictive though since it aggregates all budgets that overlap at any time, even if they are sequential.
To illustrate this, imagine a budget A in date range 1-4, budget B in 1-2, and budget C in 3-4, all using the same source. The

current implementation sums up the rate for all those budgets, even though B and C never overlap.

This leads to rejection of budgets even if the overlaps would at no point cause the rate to go over 1.

Tasks

  • enhancing the logic to only consider overlapping budgets when calculating the total rate for each time slot.

References

  • No.5 of Audit Report Budget and Farming Cosmos SDK Modules v0.1

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
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.

1 participant