Skip to content

Comments

feat: Implement rebalance allocation logic and add related error hand…#1

Merged
paul-devv merged 2 commits intomainfrom
feat/rebalance-calculate
Feb 3, 2026
Merged

feat: Implement rebalance allocation logic and add related error hand…#1
paul-devv merged 2 commits intomainfrom
feat/rebalance-calculate

Conversation

@paul-devv
Copy link
Contributor

…ling

  • Introduced BuildRebalanceAllocations function to calculate allocations based on tick ranges, total amount, and slippage tolerance.
  • Added new error types for better validation of input parameters, including invalid tick ranges, weights, total amounts, and slippage.
  • Created unit tests for the rebalance allocation logic to ensure correctness and handle various edge cases.
  • Updated go.mod and go.sum to include the shopspring/decimal dependency for precise decimal arithmetic.

…ling

- Introduced `BuildRebalanceAllocations` function to calculate allocations based on tick ranges, total amount, and slippage tolerance.
- Added new error types for better validation of input parameters, including invalid tick ranges, weights, total amounts, and slippage.
- Created unit tests for the rebalance allocation logic to ensure correctness and handle various edge cases.
- Updated `go.mod` and `go.sum` to include the `shopspring/decimal` dependency for precise decimal arithmetic.
- Eliminated slippage tolerance parameter from `BuildRebalanceAllocations` function and related tests to simplify allocation calculations.
- Updated error handling to focus on tick ranges, weights, and total amounts without slippage considerations.
- Adjusted unit tests to reflect the removal of slippage, ensuring correctness in allocation logic.
@paul-devv paul-devv merged commit 88abcb2 into main Feb 3, 2026
1 of 4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants