Skip to content
Draft
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
6 changes: 6 additions & 0 deletions cadence/contracts/FlowALPv0.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -2778,6 +2778,8 @@ access(all) contract FlowALPv0 {
pre {
!self.isPaused(): "Withdrawal, deposits, and liquidations are paused by governance"
self.positionLock[pid] == true: "Position is not locked"
// Temporarily disabling MOET operations on v0 as a precaution.
from.getType() != Type<@MOET.Vault>: "MOET operations disabled"
}
post {
self.positionLock[pid] == true: "Position is not locked"
Expand Down Expand Up @@ -2944,6 +2946,8 @@ access(all) contract FlowALPv0 {
"Invalid position ID \(pid) - could not find an InternalPosition with the requested ID in the Pool"
self.globalLedger[type] != nil:
"Invalid token type \(type.identifier) - not supported by this Pool"
// Temporarily disabling MOET operations on v0 as a precaution.
from.getType() != Type<@MOET.Vault>: "MOET operations disabled"
}
post {
self.positionLock[pid] == nil: "Position is not unlocked"
Expand Down Expand Up @@ -2983,6 +2987,7 @@ access(all) contract FlowALPv0 {
} else if pullFromTopUpSource {
// We need more funds to service this withdrawal, see if they are available from the top up source
if let topUpSource = topUpSource {
assert(topUpSource.getType() != Type<MOET.Vault>, message: "MOET operations disabled for v0")
// If we have to rebalance, let's try to rebalance to the target health, not just the minimum
let idealDeposit = self.fundsRequiredForTargetHealthAfterWithdrawing(
pid: pid,
Expand Down Expand Up @@ -3813,6 +3818,7 @@ access(all) contract FlowALPv0 {
amount: uintSinkAmount,
tokenState: tokenState
)
assert(sinkType != Type<MOET.Vault>, message: "MOET operations disabled for v0")
if sinkType == Type<@MOET.Vault>() {
let sinkVault <- FlowALPv0._borrowMOETMinter().mintTokens(amount: sinkAmount)
emit Rebalanced(
Expand Down
Loading