diff --git a/cadence/contracts/FlowALPv0.cdc b/cadence/contracts/FlowALPv0.cdc index 3ef686cc..2d90f4ef 100644 --- a/cadence/contracts/FlowALPv0.cdc +++ b/cadence/contracts/FlowALPv0.cdc @@ -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" @@ -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" @@ -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, 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, @@ -3813,6 +3818,7 @@ access(all) contract FlowALPv0 { amount: uintSinkAmount, tokenState: tokenState ) + assert(sinkType != Type, message: "MOET operations disabled for v0") if sinkType == Type<@MOET.Vault>() { let sinkVault <- FlowALPv0._borrowMOETMinter().mintTokens(amount: sinkAmount) emit Rebalanced(