[ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [ { "internalType": "address", "name": "target", "type": "address" } ], "name": "AddressEmptyCode", "type": "error" }, { "inputs": [], "name": "AlreadyLiquidated", "type": "error" }, { "inputs": [], "name": "AssetMismatch", "type": "error" }, { "inputs": [], "name": "BadDebtNotSettled", "type": "error" }, { "inputs": [], "name": "CallerNotAdmin", "type": "error" }, { "inputs": [], "name": "CallerNotCollateralVault", "type": "error" }, { "inputs": [], "name": "CallerNotOwnerOrCollateralVaultFactory", "type": "error" }, { "inputs": [], "name": "CallerNotOwnerOrPauseGuardian", "type": "error" }, { "inputs": [], "name": "CannotRebalance", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "implementation", "type": "address" } ], "name": "ERC1967InvalidImplementation", "type": "error" }, { "inputs": [], "name": "ERC1967NonPayable", "type": "error" }, { "inputs": [], "name": "E_EmptyError", "type": "error" }, { "inputs": [], "name": "ExternalPositionUnhealthy", "type": "error" }, { "inputs": [], "name": "ExternallyLiquidated", "type": "error" }, { "inputs": [], "name": "FailedCall", "type": "error" }, { "inputs": [], "name": "HealthyNotLiquidatable", "type": "error" }, { "inputs": [], "name": "IncorrectIndex", "type": "error" }, { "inputs": [], "name": "IntermediateVaultAlreadySet", "type": "error" }, { "inputs": [], "name": "IntermediateVaultNotSet", "type": "error" }, { "inputs": [], "name": "InvalidInitialization", "type": "error" }, { "inputs": [], "name": "NoLiquidationForZeroReserve", "type": "error" }, { "inputs": [], "name": "NotCollateralVault", "type": "error" }, { "inputs": [], "name": "NotExternallyLiquidated", "type": "error" }, { "inputs": [], "name": "NotInitializing", "type": "error" }, { "inputs": [], "name": "NotIntermediateVault", "type": "error" }, { "inputs": [], "name": "OnlyWETH", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "OwnableInvalidOwner", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "OwnableUnauthorizedAccount", "type": "error" }, { "inputs": [], "name": "ReceiverNotBorrower", "type": "error" }, { "inputs": [], "name": "Reentrancy", "type": "error" }, { "inputs": [], "name": "RepayingMoreThanMax", "type": "error" }, { "inputs": [], "name": "SelfLiquidation", "type": "error" }, { "inputs": [], "name": "SnapshotNotTaken", "type": "error" }, { "inputs": [], "name": "SubAccountBlocked", "type": "error" }, { "inputs": [], "name": "T_BorrowExceedsMaxLTV", "type": "error" }, { "inputs": [], "name": "T_CV_OperationDisabled", "type": "error" }, { "inputs": [], "name": "T_CallerNotBorrower", "type": "error" }, { "inputs": [], "name": "T_CallerNotMorpho", "type": "error" }, { "inputs": [], "name": "T_CallerNotSelf", "type": "error" }, { "inputs": [], "name": "T_DeadlineExpired", "type": "error" }, { "inputs": [], "name": "T_DebtMoreThanMax", "type": "error" }, { "inputs": [], "name": "T_FeedDecimalsNotCorrect", "type": "error" }, { "inputs": [], "name": "T_InputIsUnderlying", "type": "error" }, { "inputs": [], "name": "T_InvalidCollateralVault", "type": "error" }, { "inputs": [], "name": "T_InvalidWrapper", "type": "error" }, { "inputs": [], "name": "T_MinAmountOut", "type": "error" }, { "inputs": [], "name": "T_MorphoNotImplemented", "type": "error" }, { "inputs": [], "name": "T_NotUnderlying", "type": "error" }, { "inputs": [], "name": "T_OperationDisabled", "type": "error" }, { "inputs": [], "name": "T_QuoteNotUSD", "type": "error" }, { "inputs": [], "name": "T_SlippageCheckFailed", "type": "error" }, { "inputs": [], "name": "T_StakeFailed", "type": "error" }, { "inputs": [], "name": "T_WithdrawMoreThanMax", "type": "error" }, { "inputs": [], "name": "UUPSUnauthorizedCallContext", "type": "error" }, { "inputs": [ { "internalType": "bytes32", "name": "slot", "type": "bytes32" } ], "name": "UUPSUnsupportedProxiableUUID", "type": "error" }, { "inputs": [], "name": "UnitOfAccountMismatch", "type": "error" }, { "inputs": [], "name": "ValueOutOfRange", "type": "error" }, { "inputs": [], "name": "VaultStatusLiquidatable", "type": "error" }, { "inputs": [], "name": "ViolatorNotCollateralVault", "type": "error" }, { "inputs": [], "name": "ZeroAddress", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "version", "type": "uint64" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "intermediateVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "targetVault", "type": "address" } ], "name": "T_AddAllowedTargetVault", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "intermediateVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "targetVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "targetAsset", "type": "address" } ], "name": "T_AddAllowedTargetVaultAsset", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": true, "internalType": "address", "name": "destination", "type": "address" }, { "indexed": false, "internalType": "address", "name": "tokenIn", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "amountOut", "type": "uint256" } ], "name": "T_AssetZap", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "targetAmount", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" } ], "name": "T_Borrow", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "targetVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "collateral", "type": "address" }, { "indexed": true, "internalType": "address", "name": "debt", "type": "address" }, { "indexed": false, "internalType": "uint8", "name": "categoryId", "type": "uint8" } ], "name": "T_CategoryIdSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "vault", "type": "address" } ], "name": "T_CollateralVaultCreated", "type": "event" }, { "anonymous": false, "inputs": [], "name": "T_CollateralVaultInitialized", "type": "event" }, { "anonymous": false, "inputs": [], "name": "T_ControllerDisabled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "T_Deposit", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }, { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "T_DoCall", "type": "event" }, { "anonymous": false, "inputs": [], "name": "T_HandleExternalLiquidation", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "collateralVault", "type": "address" } ], "name": "T_LeverageDownExecuted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "collateralVault", "type": "address" } ], "name": "T_LeverageUpExecuted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "newState", "type": "uint8" } ], "name": "T_PauseStateChanged", "type": "event" }, { "anonymous": false, "inputs": [], "name": "T_Rebalance", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" } ], "name": "T_RedeemUnderlying", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "repayAmount", "type": "uint256" } ], "name": "T_Repay", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "admin", "type": "address" } ], "name": "T_SetAdmin", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "targetVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "intermediateVault", "type": "address" }, { "indexed": true, "internalType": "bytes32", "name": "marketId", "type": "bytes32" }, { "indexed": false, "internalType": "bool", "name": "set", "type": "bool" } ], "name": "T_SetAllowedMorphoMarket", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "targetVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "beacon", "type": "address" } ], "name": "T_SetBeacon", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "intermediateVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "targetAsset", "type": "address" }, { "indexed": false, "internalType": "uint16", "name": "borrowBuffer", "type": "uint16" } ], "name": "T_SetBorrowBuffer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "factory", "type": "address" } ], "name": "T_SetCollateralVaultFactory", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "collateralVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "liquidator", "type": "address" } ], "name": "T_SetCollateralVaultLiquidated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "intermediateVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "targetAsset", "type": "address" }, { "indexed": false, "internalType": "uint16", "name": "liqBuffer", "type": "uint16" }, { "indexed": false, "internalType": "uint32", "name": "rampDuration", "type": "uint32" } ], "name": "T_SetExternalLiqBuffer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "intermediateVault", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "value", "type": "bool" } ], "name": "T_SetIntermediateVault", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "intermediateVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "collateralVault", "type": "address" }, { "indexed": false, "internalType": "uint16", "name": "borrowLimit", "type": "uint16" }, { "indexed": false, "internalType": "uint16", "name": "liquidationLimit", "type": "uint16" }, { "indexed": false, "internalType": "uint32", "name": "rampDuration", "type": "uint32" } ], "name": "T_SetLTV", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "intermediateVault", "type": "address" }, { "indexed": true, "internalType": "address", "name": "targetAsset", "type": "address" }, { "indexed": false, "internalType": "uint16", "name": "ltv", "type": "uint16" }, { "indexed": false, "internalType": "uint32", "name": "rampDuration", "type": "uint32" } ], "name": "T_SetMaxLiqLTV", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "collateralAddress", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "allow", "type": "bool" } ], "name": "T_SetOracleResolvedVault", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "oracleRouter", "type": "address" }, { "indexed": true, "internalType": "address", "name": "collateralAddress", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "allow", "type": "bool" } ], "name": "T_SetOracleResolvedVault", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "newOracleRouter", "type": "address" } ], "name": "T_SetOracleRouter", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "pauseGuardian", "type": "address" } ], "name": "T_SetPauseGuardian", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "ltv", "type": "uint256" } ], "name": "T_SetTwyneLiqLTV", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "vaultManager", "type": "address" } ], "name": "T_SetVaultManager", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "T_Skim", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "toDeposit", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "toBorrow", "type": "uint256" } ], "name": "T_Teleport", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" } ], "name": "T_Withdraw", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "implementation", "type": "address" } ], "name": "Upgraded", "type": "event" }, { "inputs": [], "name": "UPGRADE_INTERFACE_VERSION", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "admin", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "intermediateVault", "type": "address" }, { "internalType": "address", "name": "targetAsset", "type": "address" } ], "name": "borrowBuffer", "outputs": [ { "internalType": "uint16", "name": "maxBorrowBuffer", "type": "uint16" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "collateralVaultFactory", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "doCall", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_targetAsset", "type": "address" } ], "name": "externalLiqBufferFull", "outputs": [ { "internalType": "uint16", "name": "", "type": "uint16" }, { "internalType": "uint16", "name": "", "type": "uint16" }, { "internalType": "uint48", "name": "", "type": "uint48" }, { "internalType": "uint32", "name": "", "type": "uint32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_targetAsset", "type": "address" } ], "name": "externalLiqBuffers", "outputs": [ { "internalType": "uint16", "name": "", "type": "uint16" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "address", "name": "_factory", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "targetVault", "type": "address" }, { "internalType": "address", "name": "intermediateVault", "type": "address" }, { "internalType": "Id", "name": "marketId", "type": "bytes32" } ], "name": "isAllowedMorphoMarket", "outputs": [ { "internalType": "bool", "name": "isSupported", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "intermediateVault", "type": "address" }, { "internalType": "address", "name": "targetVault", "type": "address" }, { "internalType": "address", "name": "targetAsset", "type": "address" } ], "name": "isAllowedTargetAssets", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "intermediateVault", "type": "address" }, { "internalType": "address", "name": "targetVault", "type": "address" } ], "name": "isAllowedTargetVault", "outputs": [ { "internalType": "bool", "name": "allowed", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "intermediateVault", "type": "address" } ], "name": "isIntermediateVault", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_targetAsset", "type": "address" } ], "name": "liqParams", "outputs": [ { "internalType": "uint16", "name": "", "type": "uint16" }, { "internalType": "uint16", "name": "", "type": "uint16" }, { "internalType": "uint16", "name": "", "type": "uint16" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_targetAsset", "type": "address" } ], "name": "maxTwyneLTVFull", "outputs": [ { "internalType": "uint16", "name": "", "type": "uint16" }, { "internalType": "uint16", "name": "", "type": "uint16" }, { "internalType": "uint48", "name": "", "type": "uint48" }, { "internalType": "uint32", "name": "", "type": "uint32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_targetAsset", "type": "address" } ], "name": "maxTwyneLTVs", "outputs": [ { "internalType": "uint16", "name": "", "type": "uint16" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_admin", "type": "address" } ], "name": "setAdmin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_targetVault", "type": "address" }, { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "Id", "name": "_marketId", "type": "bytes32" }, { "internalType": "bool", "name": "_value", "type": "bool" } ], "name": "setAllowedMorphoMarket", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_targetVault", "type": "address" }, { "internalType": "address", "name": "_targetAsset", "type": "address" } ], "name": "setAllowedTargetAsset", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_targetVault", "type": "address" } ], "name": "setAllowedTargetVault", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_targetAsset", "type": "address" }, { "internalType": "uint16", "name": "_borrowBuffer", "type": "uint16" } ], "name": "setBorrowBuffer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_factory", "type": "address" } ], "name": "setCollateralVaultFactory", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_targetAsset", "type": "address" }, { "internalType": "uint16", "name": "_liqBuffer", "type": "uint16" }, { "internalType": "uint32", "name": "_rampDuration", "type": "uint32" } ], "name": "setExternalLiqBuffer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IEVault", "name": "_intermediateVault", "type": "address" }, { "internalType": "bool", "name": "_value", "type": "bool" } ], "name": "setIntermediateVault", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "contract IEVault", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_collateralVault", "type": "address" }, { "internalType": "uint16", "name": "_borrowLimit", "type": "uint16" }, { "internalType": "uint16", "name": "_liquidationLimit", "type": "uint16" }, { "internalType": "uint32", "name": "_rampDuration", "type": "uint32" } ], "name": "setLTV", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_intermediateVault", "type": "address" }, { "internalType": "address", "name": "_targetAsset", "type": "address" }, { "internalType": "uint16", "name": "_ltv", "type": "uint16" }, { "internalType": "uint32", "name": "_rampDuration", "type": "uint32" } ], "name": "setMaxLiquidationLTV", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_oracleRouter", "type": "address" }, { "internalType": "address", "name": "_vault", "type": "address" }, { "internalType": "bool", "name": "_allow", "type": "bool" } ], "name": "setOracleResolvedVault", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newImplementation", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "upgradeToAndCall", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "version", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "stateMutability": "payable", "type": "receive" } ]