Skip to content
Merged
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: 2 additions & 2 deletions cadence/contracts/FlowALPModels.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -2253,14 +2253,14 @@ access(all) contract FlowALPModels {
/// Borrows an authorized internal position reference.
access(EPosition) view fun borrowPosition(pid: UInt64): auth(EImplementation) &{InternalPosition}

/// Deposits funds to a position and optionally pushes excess to draw-down sink.
/// Deposits funds to a position. If `pushToDrawDownSink` is true, always rebalances to targetHealth.
access(EPosition) fun depositAndPush(
pid: UInt64,
from: @{FungibleToken.Vault},
pushToDrawDownSink: Bool
)

/// Withdraws funds from a position and optionally pulls deficit from top-up source.
/// Withdraws funds from a position. If `pullFromTopUpSource` is true, always rebalances to targetHealth.
access(EPosition) fun withdrawAndPull(
pid: UInt64,
type: Type,
Expand Down
8 changes: 4 additions & 4 deletions cadence/contracts/FlowALPPositionResources.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ access(all) contract FlowALPPositionResources {
)
}

/// Deposits funds to the Position enabling the caller to configure whether excess value
/// should be pushed to the drawDownSink if the deposit puts the Position above its maximum health
/// Deposits funds to the Position. If `pushToDrawDownSink` is true, a rebalance is always
/// triggered at deposit time, pushing excess value to the drawDownSink to restore targetHealth.
/// NOTE: Anyone is allowed to deposit to any position.
access(all) fun depositAndPush(
from: @{FungibleToken.Vault},
Expand All @@ -143,8 +143,8 @@ access(all) contract FlowALPPositionResources {
)
}

/// Withdraws funds from the Position enabling the caller to configure whether insufficient value
/// should be pulled from the topUpSource if the withdrawal puts the Position below its minimum health
/// Withdraws funds from the Position. If `pullFromTopUpSource` is true, a rebalance is always
/// triggered at withdrawal time, pulling value from the topUpSource to restore targetHealth.
access(FungibleToken.Withdraw) fun withdrawAndPull(
type: Type,
amount: UFix64,
Expand Down
Loading
Loading