Skip to content

feat: add dynamic caps, per-user limits, pool registry, and isolated pool factory#410

Merged
Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
Dev-sandy1:feature/cross-asset-dynamic-caps-pool-registry
May 27, 2026
Merged

feat: add dynamic caps, per-user limits, pool registry, and isolated pool factory#410
Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
Dev-sandy1:feature/cross-asset-dynamic-caps-pool-registry

Conversation

@Dev-sandy1
Copy link
Copy Markdown
Contributor

@Dev-sandy1 Dev-sandy1 commented May 27, 2026

Summary

  • Dynamic supply caps: calculate_dynamic_supply_cap adjusts caps based on utilization vs 75% target
  • Dynamic borrow caps: calculate_dynamic_borrow_cap adjusts based on available liquidity
  • Per-user supply limits: each user capped at 20% of global supply cap by default
  • Pool registry: get_pool_registry / get_pool_info for read-only pool metadata
  • Isolated pool factory: create_isolated_pool with sensible default params
  • Bug fixes: removed duplicate DataKey enum in storage.rs, fixed LendingError::from error conversions in lib.rs
  • Test utilities: test_utils.rs with helpers for test setup

Related Issues

Closes #335 — Implement supply and borrowing caps with dynamic adjustment
Closes #322 — Implement cross-asset collateral and borrowing with automated rebalancing
Closes #321 — Build debt token contract for fungible position representation
Closes #320 — Implement isolated lending pools with configurable risk parameters

…pool factory

Add dynamic supply/borrow cap calculation based on utilization and liquidity.
Add per-user supply limit enforcement (20% of global cap).
Add pool registry (PoolInfo, get_pool_registry, get_pool_info).
Add create_isolated_pool factory with sensible defaults.
Fix duplicate DataKey enum in storage.rs and incorrect error conversions in lib.rs.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

@Ebuka321 is attempting to deploy a commit to the smartdevs17's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@Dev-sandy1 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

@Smartdevs17 Smartdevs17 merged commit c7778c5 into Smartdevs17:main May 27, 2026
1 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

3 participants