You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have observed rounding errors in balancer post-refactor (#1307). There are several balancer pool methods being called from the function in #1307 under the hood that are not unit-tested.
As a result, it is non-trivial to identify the source of the problem. All methods should be covered by unit tests. One of such untested methods is CalcJoinPoolShares
On initial investigation, this method does many things, violating the single responsibility principle in SOLID. As a result, it is difficult to reason about and test.
The person taking on this issue should investigate if it is worth refactoring this method to extract a few others to be called under the hood to mitigate the violation. If any, all newly extracted methods should be unit tested, including CalcJoinPoolShares itself.
Acceptance Criteria
investigate the need for extracting several methods from CalcJoinPoolShares to ease unit testing and improve readability
ensure all logic in CalcJoinPoolShares and newly extracted functions/methods, if any, are covered by unit tests
edge cases are well thought out
all old and new unit tests pass
The text was updated successfully, but these errors were encountered:
Background
We have observed rounding errors in balancer post-refactor (#1307). There are several balancer pool methods being called from the function in #1307 under the hood that are not unit-tested.
As a result, it is non-trivial to identify the source of the problem. All methods should be covered by unit tests. One of such untested methods is
CalcJoinPoolShares
On initial investigation, this method does many things, violating the single responsibility principle in SOLID. As a result, it is difficult to reason about and test.
The person taking on this issue should investigate if it is worth refactoring this method to extract a few others to be called under the hood to mitigate the violation. If any, all newly extracted methods should be unit tested, including
CalcJoinPoolShares
itself.Acceptance Criteria
CalcJoinPoolShares
to ease unit testing and improve readabilityCalcJoinPoolShares
and newly extracted functions/methods, if any, are covered by unit testsThe text was updated successfully, but these errors were encountered: