[Feature] Add drift-based rebalancing to ComposedStrategy
Maintainers usually reply within 2 days
Assessment
This issue has not been assessed yet.
Description
Summary
Let a ComposedStrategy correct drift between member values and their target weights.
Motivation
Member weights are used only to allocate initial capital. Rebalancing forwards member orders without comparing current member values to target weights, so a composition drifts away from its intended allocation as members gain or lose value.
Proposed Solution
- Add target-weight drift policies: a threshold policy, a calendar policy, or both.
- Generate cross-member transfer orders to restore weights.
- Enforce aggregate exposure and cash-buffer constraints after rebalancing.
- Document tie-breaking when several members drift at once.
Scope
| Field | Value |
|---|---|
| Area | Strategies |
| Protocol affected | None |
| Network | testnet and mainnet |
| Breaking change? | No |
Alternatives Considered
- Rebalance every tick. Rejected because it ignores costs and is rarely what an operator wants.
- Leave drift to the caller. Rejected because the composition owns the weights.
Acceptance Criteria
- A composition can configure a drift threshold, a calendar policy, or both.
- Rebalancing restores weights within tolerance.
- Generated orders respect aggregate exposure and cash-buffer constraints.
- Tie-breaking is documented.
- Tests cover no-drift, threshold-triggered, and constraint-blocked cases.
-
pnpm lint,pnpm typecheck, andpnpm testpass.
Additional Context
See packages/strategies/src/composition/index.ts.
- Dominant language
- TypeScript
- Stars
- 17
- Forks
- 129
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 54
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from drydocs/meridian
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
drydocs/meridian#1503 · 1 comment ·
Maintainers usually reply within 2 days
-
[Docs] Add a supported wallet capability matrixPossibly taken @Joeljosef7 claimed this 4 days ago. Opendocs frontend Stellar Wave trivial
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
drydocs/meridian#1349 · 6 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Test] Add cross-language conformance vectors for vault mathPossibly taken @VeronicDev claimed this 3 days ago. Opencontracts medium sdk Stellar Wave testing
drydocs/meridian#1444 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Security] Extend CSP and security headers to landing and docs routesPossibly taken @anietie234 claimed this 3 days ago. Openapi frontend medium security Stellar Wave
drydocs/meridian#1443 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Docs] Establish ADRs and backfill architecture decisionsPossibly taken @Sammydz456 claimed this 3 days ago. Opendocs medium Stellar Wave
drydocs/meridian#1442 · 5 comments · 1 assignee ·
Maintainers usually reply within 2 days
All issues in drydocs/meridian
Similar issues
-
bug
Difficulty 2/5 Half a day Newbie friendliness 62/100
garethgeorge/backrest#1451 ·
Maintainers usually reply within 1 day
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument orderPossibly taken @ManyaS-Git claimed this 1 day ago. Openstatus:in-linear
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
n8n-io/n8n#45027 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 13 days
-
bug
Difficulty 2/5 Half a day Newbie friendliness 68/100
navikt/skjemabygging-formio#2399 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lidofinance/validator-ejector#233 ·
Maintainers usually reply within 1 day