Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cadence/contracts/FlowALPv0.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,10 @@ access(all) contract FlowALPv0 {

self.lockPosition(pid)

// Attempt to restore position health via topUpSource before evaluating liquidatability.
// This prevents liquidations of positions that have sufficient backup funds configured.
self._rebalancePositionNoLock(pid: pid, force: false)

let positionView = self.buildPositionView(pid: pid)
let balanceSheet = self._getUpdatedBalanceSheet(pid: pid)
let initialHealth = balanceSheet.health
Expand Down
Loading
Loading