Skip to content

Update queued deposit handling#311

Open
tim-barry wants to merge 15 commits into
mainfrom
tim/117-queued-deposits-health-withdrawal
Open

Update queued deposit handling#311
tim-barry wants to merge 15 commits into
mainfrom
tim/117-queued-deposits-health-withdrawal

Conversation

@tim-barry

@tim-barry tim-barry commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

Closes: #117, #215, #223

Description

This PR significantly updates handling of queued deposits. The main changes are:

  • When a user withdraws from their position, they can now withdraw queued deposits, and will do so before withdrawing from credited deposits of that token
  • Addition of a new health factor ("Queued health") via balance sheet including the queued deposits: this is now used for rebalancing and liquidation checks, to prevent excessive rebalancing or undesired liquidation when deposits get queued
  • The deposit queue does not enable additional borrowing: the queued deposits do not enable withdrawing or pushing out additional debt tokens.
  • Withdrawing tokens will attempt to process any queued deposits before trying to pull a topUp and actually withdrawing, to avoid unnecessary topUps.

See the linked issues for more information.

Comment thread cadence/contracts/FlowALPv0.cdc Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants