Skip to content

[NF-01] Multi-Position Support Per Tier Vault (True Laddering) - #131

Merged
wumibals merged 2 commits into
LadderMine:mainfrom
mftee:feat/nf-01-multi-position-support
Jul 21, 2026
Merged

[NF-01] Multi-Position Support Per Tier Vault (True Laddering)#131
wumibals merged 2 commits into
LadderMine:mainfrom
mftee:feat/nf-01-multi-position-support

Conversation

@mftee

@mftee mftee commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Add PositionCount and Position storage keys to vault_l3, vault_l6, vault_l12
  • Create Position struct with principal, shares, lock_until, checkpoint
  • Modify deposit to create new position instead of merging (returns position_id)
  • Add position_id parameter to withdraw and early_exit
  • Add positions(user) function to return all user positions
  • Keep balance(user) and shares(user) as aggregate sums for backward compatibility
  • Update VaultRouter to pass position_id through

Acceptance Criteria

  • A user can hold 2+ concurrent positions in the same tier vault with independent lock_until values
  • A second deposit does not alter the maturity of any prior position
  • withdraw/early_exit require a position_id and only affect that position
  • positions(user) returns all open positions with correct principal/shares/lock_until per entry
  • balance(user)/shares(user) aggregate correctly across all open positions

closes #76

@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

@yusuftomilola is attempting to deploy a commit to the wumibals' projects Team on Vercel.

A member of the Team first needs to authorize it.

- Add PositionCount and Position storage keys to vault_l3, vault_l6, vault_l12
- Create Position struct with principal, shares, lock_until, checkpoint
- Modify deposit to create new position instead of merging
- Add position_id parameter to withdraw and early_exit
- Add positions(user) function to return all user positions
- Keep balance(user) and shares(user) as aggregate sums for backward compatibility
- Update VaultRouter to pass position_id through
@mftee
mftee force-pushed the feat/nf-01-multi-position-support branch from e2668b8 to 21ea2e4 Compare July 16, 2026 17:40
Resolve merge conflicts in vault_l3, vault_l6, vault_l12, and vault_router.
Adopt main's amount-based single-position model with emergency unlock,
TVL caps, and relock features from both branches.
@wumibals
wumibals merged commit 1d99afd into LadderMine:main Jul 21, 2026
3 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.

[NF-01] [CONTRACT] Multi-Position Support Per Tier Vault (True Laddering)

2 participants