Skip to content

feat: add per-deposit lock-up period to liquidity pool#773

Merged
Mathews-25 merged 1 commit into
AgesEmpire:mainfrom
nelly439:feat/liquidity-pool-lockup
Jul 1, 2026
Merged

feat: add per-deposit lock-up period to liquidity pool#773
Mathews-25 merged 1 commit into
AgesEmpire:mainfrom
nelly439:feat/liquidity-pool-lockup

Conversation

@nelly439

Copy link
Copy Markdown
Contributor
  • Add DepositRecord struct to track each deposit's shares and timestamp
  • Add DataKey::DepositRecords and DataKey::LockupConfig storage keys
  • Add PoolError::DepositLocked typed error
  • Add set_lockup_duration / get_lockup_duration admin entrypoints
  • Record per-deposit timestamp in create_pool and add_liquidity (FIFO list)
  • Enforce FIFO lock-up check in remove_liquidity, additive to existing minimum-liquidity threshold guard
  • Add unit tests: reject before expiry, allow at expiry, partial withdrawal spanning locked and unlocked deposits, lockup config round-trip, no-lockup bypass closes liquidity_pool: Implement minimum lock-up period for newly deposited liquidity #741

- Add DepositRecord struct to track each deposit's shares and timestamp
- Add DataKey::DepositRecords and DataKey::LockupConfig storage keys
- Add PoolError::DepositLocked typed error
- Add set_lockup_duration / get_lockup_duration admin entrypoints
- Record per-deposit timestamp in create_pool and add_liquidity (FIFO list)
- Enforce FIFO lock-up check in remove_liquidity, additive to existing
  minimum-liquidity threshold guard
- Add unit tests: reject before expiry, allow at expiry, partial withdrawal
  spanning locked and unlocked deposits, lockup config round-trip, no-lockup bypass
@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@nelly439 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nelly439

Copy link
Copy Markdown
Contributor Author

done and pushed

@Mathews-25 Mathews-25 merged commit 062081b into AgesEmpire:main Jul 1, 2026
0 of 2 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.

liquidity_pool: Implement minimum lock-up period for newly deposited liquidity

2 participants