Skip to content
Merged
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
3 changes: 2 additions & 1 deletion cadence/contracts/FlowALPv0.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,8 @@ access(all) contract FlowALPv0 {
withdrawBal: withdrawBal,
targetHealth: view.minHealth
)
return FlowALPMath.toUFix64Round(uintMax)
// Round down to avoid allowing withdrawal of more than is safe
return FlowALPMath.toUFix64RoundDown(uintMax)
}

/// Returns the health of the given position, which is the ratio of the position's effective collateral
Expand Down
Loading