{
"kind": "rootNode",
"standard": "codama",
"version": "1.7.0",
"program": {
"kind": "programNode",
"name": "vaults",
"publicKey": "jupr81YtYssSyPt8jbnGuiWon5f6x9TcDEFxYe3Bdzi",
"version": "0.1.5",
"origin": "anchor",
"accounts": [
{
"kind": "accountNode",
"name": "branch",
"size": 47,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "0e3f643219081d05",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "branchId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "status",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "minimaTick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "minimaTickPartials",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtLiquidity",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtFactor",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "connectedBranchId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "connectedMinimaTick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "dex",
"size": 329,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "ec1eb550d1d919a3",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "dexId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "reEntrancy",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "token0",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "token1",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "token0Decimals",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "token1Decimals",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lastToLastStoredPrice",
"type": { "kind": "numberTypeNode", "format": "u128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lastStoredPrice",
"type": { "kind": "numberTypeNode", "format": "u128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "centerPrice",
"type": { "kind": "numberTypeNode", "format": "u128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lastUpdateTimestamp",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lastUpdateSlot",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "isSmartCollateralEnabled",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "isSmartDebtEnabled",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "fee",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "revenueCut",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "percentChangeActive",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "upperPercent",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lowerPercent",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "thresholdChangeActive",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "upperShiftThresholdPercent",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lowerShiftThresholdPercent",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "shiftingTime",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "centerPriceAddress",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "maxCenterPrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "minCenterPrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "token0MaxUtilization",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "token1MaxUtilization",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "isCenterPriceShiftActive",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "swapAndArbitragePaused",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalSupplyShares",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "maxSupplyShares",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalBorrowShares",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "maxBorrowShares",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "rangeOldUpperShift",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "rangeOldLowerShift",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "rangeShiftDuration",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "rangeShiftStartTimestamp",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "thresholdOldUpperShift",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "thresholdOldLowerShift",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "thresholdShiftDuration",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "thresholdShiftStartTimestamp",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "thresholdShiftOldTimestamp",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "centerPriceShiftStartTimestamp",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "centerPriceShiftPercent",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "centerPriceShiftTime",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "reserved",
"type": {
"kind": "fixedSizeTypeNode",
"size": 32,
"type": { "kind": "bytesTypeNode" }
}
},
{
"kind": "structFieldTypeNode",
"name": "bump",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "dexPosition",
"size": 164,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "1e24db4ebdadaa2f",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "dexId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "protocol",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "supplyStatus",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "supplyShares",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "withdrawalLimit",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "supplyLastUpdate",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "supplyExpandPct",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "supplyExpandDuration",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "baseWithdrawalLimit",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowStatus",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowShares",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtCeiling",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowLastUpdate",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowExpandPct",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowExpandDuration",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "baseDebtCeiling",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "maxDebtCeiling",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "reserved",
"type": {
"kind": "fixedSizeTypeNode",
"size": 32,
"type": { "kind": "bytesTypeNode" }
}
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "oracle",
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "8bc283b38cb3e5f4",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "nonce",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "sources",
"type": {
"kind": "arrayTypeNode",
"item": { "kind": "definedTypeLinkNode", "name": "sources" },
"count": {
"kind": "prefixedCountNode",
"prefix": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
}
},
{
"kind": "structFieldTypeNode",
"name": "bump",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "position",
"size": 71,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "aabc8fe47a40f7d0",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "nftId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "positionMint",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "isSupplyOnlyPosition",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "tick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "tickId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "supplyAmount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "dustDebtAmount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "tick",
"size": 40,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "b05e43f785ad0773",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "tick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "isLiquidated",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalIds",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "rawDebt",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "isFullyLiquidated",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidationBranchId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtFactor",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "tickHasDebtArray",
"size": 267,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "5be83c1d7c6731fc",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "index",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "tickHasDebt",
"docs": [
"Each array contains 8 TickHasDebt structs",
"Each TickHasDebt covers 256 ticks",
"Total: 8 * 256 = 2048 ticks per TickHasDebtArray"
],
"type": {
"kind": "arrayTypeNode",
"item": { "kind": "definedTypeLinkNode", "name": "tickHasDebt" },
"count": { "kind": "fixedCountNode", "value": 8 }
}
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "tickIdLiquidation",
"size": 57,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "291cbec544d51fb5",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "tick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "tickMap",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "isFullyLiquidated1",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidationBranchId1",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtFactor1",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "isFullyLiquidated2",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidationBranchId2",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtFactor2",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "isFullyLiquidated3",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidationBranchId3",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtFactor3",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "tokenReserve",
"size": 192,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "15123b8778141f0c",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "mint",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "vault",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowRate",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "feeOnInterest",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lastUtilization",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lastUpdateTimestamp",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "supplyExchangePrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowExchangePrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "maxUtilization",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalSupplyWithInterest",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalSupplyInterestFree",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalBorrowWithInterest",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalBorrowInterestFree",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalClaimAmount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "interactingProtocol",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "interactingTimestamp",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "interactingBalance",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "userBorrowPosition",
"size": 120,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "497e417bdc7ec518",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "protocol",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "mint",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "withInterest",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "amount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtCeiling",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lastUpdate",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "expandPct",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "expandDuration",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "baseDebtCeiling",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "maxDebtCeiling",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "status",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "userSupplyPosition",
"size": 124,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "cadb88763db11592",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "protocol",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "mint",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "withInterest",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "amount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "withdrawalLimit",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "decayAmount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lastUpdate",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "expandPct",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "expandDuration",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "decayDuration",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "baseWithdrawalLimit",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "status",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "vaultAdmin",
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "5861a0756627672c",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "authority",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidityProgram",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "nextVaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "auths",
"type": {
"kind": "arrayTypeNode",
"item": { "kind": "publicKeyTypeNode" },
"count": {
"kind": "prefixedCountNode",
"prefix": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
}
},
{
"kind": "structFieldTypeNode",
"name": "bump",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "vaultConfig",
"size": 219,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "63562bd8b866774d",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "supplyRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "collateralFactor",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidationThreshold",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidationMaxLimit",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "withdrawGap",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidationPenalty",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowFee",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "vaultType",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "oracle",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "rebalancer",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidityProgram",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "oracleProgram",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "supplyToken",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowToken",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "bump",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "vaultMetadata",
"size": 44,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "f8b1f45d43137539",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lookupTable",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "supplyMintDecimals",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowMintDecimals",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "accountNode",
"name": "vaultState",
"size": 127,
"data": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"defaultValue": {
"kind": "bytesValueNode",
"data": "e4c452a562d2eb98",
"encoding": "base16"
}
},
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "branchLiquidated",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "topmostTick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "currentBranchId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalBranchId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalSupply",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalBorrow",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "totalPositions",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "absorbedDebtAmount",
"type": { "kind": "numberTypeNode", "format": "u128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "absorbedColAmount",
"type": { "kind": "numberTypeNode", "format": "u128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "absorbedDustDebt",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquiditySupplyExchangePrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidityBorrowExchangePrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "vaultSupplyExchangePrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "vaultBorrowExchangePrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "nextPositionId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "lastUpdateTimestamp",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
},
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
}
],
"instructions": [
{
"kind": "instructionNode",
"name": "getExchangePrices",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReserves",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReserves",
"isWritable": false,
"isSigner": false,
"isOptional": false
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "ed8053983415e756",
"encoding": "base16"
}
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "initBranch",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "branch",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "pdaValueNode",
"pda": { "kind": "pdaLinkNode", "name": "branch" },
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "vaultId",
"value": { "kind": "argumentValueNode", "name": "vaultId" }
},
{
"kind": "pdaSeedValueNode",
"name": "branchId",
"value": { "kind": "argumentValueNode", "name": "branchId" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "a25b3917e45d6f15",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "branchId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "initPosition",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "position",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "pdaValueNode",
"pda": { "kind": "pdaLinkNode", "name": "position" },
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "vaultId",
"value": { "kind": "argumentValueNode", "name": "vaultId" }
},
{
"kind": "pdaSeedValueNode",
"name": "nextPositionId",
"value": { "kind": "argumentValueNode", "name": "nextPositionId" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "positionMint",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "pdaValueNode",
"pda": { "kind": "pdaLinkNode", "name": "positionMint" },
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "vaultId",
"value": { "kind": "argumentValueNode", "name": "vaultId" }
},
{
"kind": "pdaSeedValueNode",
"name": "nextPositionId",
"value": { "kind": "argumentValueNode", "name": "nextPositionId" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "positionTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "pdaValueNode",
"pda": {
"kind": "pdaNode",
"name": "positionTokenAccount",
"programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"seeds": [
{
"kind": "variablePdaSeedNode",
"name": "signer",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": {
"kind": "bytesValueNode",
"data": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"encoding": "base58"
}
},
{
"kind": "variablePdaSeedNode",
"name": "positionMint",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "signer",
"value": { "kind": "accountValueNode", "name": "signer" }
},
{
"kind": "pdaSeedValueNode",
"name": "positionMint",
"value": { "kind": "accountValueNode", "name": "positionMint" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "metadataAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "pdaValueNode",
"pda": {
"kind": "pdaNode",
"name": "metadataAccount",
"programId": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
"seeds": [
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": {
"kind": "bytesValueNode",
"data": "KJHK1EAZuVA",
"encoding": "base58"
}
},
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": {
"kind": "bytesValueNode",
"data": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
"encoding": "base58"
}
},
{
"kind": "variablePdaSeedNode",
"name": "positionMint",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "positionMint",
"value": { "kind": "accountValueNode", "name": "positionMint" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "tokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"identifier": "splToken"
}
},
{
"kind": "instructionAccountNode",
"name": "associatedTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"identifier": "associatedTokenProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "sysvarInstruction",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "Sysvar1nstructions1111111111111111111111111",
"identifier": "sysvarInstruction"
}
},
{
"kind": "instructionAccountNode",
"name": "metadataProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
"identifier": "metadataProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "rent",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "SysvarRent111111111111111111111111111111111",
"identifier": "rent"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "c5140a0161a0b15b",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "nextPositionId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "initTick",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "tickData",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "160d3e8d4959b21d",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "tick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "initTickHasDebtArray",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "tickHasDebtArray",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "pdaValueNode",
"pda": { "kind": "pdaLinkNode", "name": "tickHasDebtArray" },
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "vaultId",
"value": { "kind": "argumentValueNode", "name": "vaultId" }
},
{
"kind": "pdaSeedValueNode",
"name": "index",
"value": { "kind": "argumentValueNode", "name": "index" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "ce6c92f514008dd0",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "index",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "initTickIdLiquidation",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "tickData",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "tickIdLiquidation",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "386e79a998f156b7",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "tick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "totalIds",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "initVaultAdmin",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "pdaValueNode",
"pda": { "kind": "pdaLinkNode", "name": "vaultAdmin" },
"seeds": []
}
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "168502f47b64f9e6",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "liquidity",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "instructionArgumentNode",
"name": "authority",
"type": { "kind": "publicKeyTypeNode" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "initVaultConfig",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": true,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "pdaValueNode",
"pda": { "kind": "pdaLinkNode", "name": "vaultConfig" },
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "vaultId",
"value": { "kind": "argumentValueNode", "name": "vaultId" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "vaultMetadata",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "pdaValueNode",
"pda": { "kind": "pdaLinkNode", "name": "vaultMetadata" },
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "vaultId",
"value": { "kind": "argumentValueNode", "name": "vaultId" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "oracle",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDex",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDex",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "29c245fec4f6e2c3",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "supplyRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "borrowRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "collateralFactor",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "liquidationThreshold",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "liquidationMaxLimit",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "withdrawGap",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "liquidationPenalty",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "borrowFee",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "vaultType",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "rebalancer",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "instructionArgumentNode",
"name": "liquidityProgram",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "instructionArgumentNode",
"name": "oracleProgram",
"type": { "kind": "publicKeyTypeNode" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "initVaultState",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": true,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "pdaValueNode",
"pda": { "kind": "pdaLinkNode", "name": "vaultState" },
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "vaultId",
"value": { "kind": "argumentValueNode", "name": "vaultId" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "60781764990b0da5",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "liquidate",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "signerTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "to",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "toTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": [
"@dev mut because this PDA signs the CPI to liquidity program",
"@dev verification inside instruction logic"
]
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "oracle",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "newBranch",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenClaimAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "liquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidityProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "associatedTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"identifier": "associatedTokenProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "oracleProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "dfb3e27d302e274a",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "debtAmt",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "colPerUnitDebt",
"type": { "kind": "numberTypeNode", "format": "u128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "absorb",
"type": {
"kind": "booleanTypeNode",
"size": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "transferType",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "transferType" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "remainingAccountsIndices",
"type": {
"kind": "sizePrefixTypeNode",
"type": { "kind": "bytesTypeNode" },
"prefix": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "liquidateDex",
"docs": [
"Typed vault imperfect liquidation (T2 / T3 / T4).",
"",
"- T2 (smart col, normal debt): supply `debt_amt` + `col_amounts`.",
"- T3 (normal col, smart debt): supply `debt_amounts` (pre-fund vault's borrow-DEX",
"user token accounts in the same tx).",
"- T4 (smart col + smart debt): supply both `debt_amounts` and `col_amounts`.",
"",
"Returns `(actual_debt, actual_col, token0_col, token1_col)`."
],
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "signerTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4 (smart debt pays at DEX)"]
},
{
"kind": "instructionAccountNode",
"name": "to",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": [
"",
"NOTE (Solana vs EVM): non-smart-leg collateral goes to `to_token_account`.",
"Smart-col collateral seized via the DEX CPI also follows `to` (EVM `to_`",
"parity) — but only when the supply leg's `dex_recipient_token0/1_account`",
"are supplied; without them the DEX credits the liquidator *signer*'s",
"pool token accounts. Smart-debt paybacks always pull from the signer."
]
},
{
"kind": "instructionAccountNode",
"name": "toTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4 (smart col withdraws at DEX)"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev mut because this PDA signs CPIs to the DEX and liquidity programs"]
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4"]
},
{
"kind": "instructionAccountNode",
"name": "oracle",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "newBranch",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4"]
},
{
"kind": "instructionAccountNode",
"name": "supplyRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenClaimAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "liquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidityProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "oracleProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
},
{
"kind": "instructionAccountNode",
"name": "dexProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "dexOracleProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "1c81fd7df3340ba2",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "debtAmt",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "debtAmounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "liquidateDexDebtAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "colPerUnitDebt",
"type": { "kind": "numberTypeNode", "format": "u128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "colAmounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "liquidateDexColAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "absorb",
"type": {
"kind": "booleanTypeNode",
"size": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "transferType",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "transferType" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "remainingAccountsIndices",
"type": {
"kind": "sizePrefixTypeNode",
"type": { "kind": "bytesTypeNode" },
"prefix": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "liquidatePerfectDex",
"docs": [
"Typed vault perfect liquidation (T2 / T3 / T4).",
"",
"- T2 (smart col, normal debt): supply `debt_amt` + `col_amounts`",
"(`debt_perfect_amounts` = `None`).",
"- T3 (normal col, smart debt): supply `debt_amt` = DEX debt shares +",
"`debt_perfect_amounts` (pre-fund vault's borrow-DEX user token accounts).",
"- T4 (smart col + smart debt): supply all three.",
"",
"Returns `(actual_debt, token0_debt, token1_debt, actual_col, token0_col, token1_col)`."
],
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "signerTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4 (smart debt pays at DEX)"]
},
{
"kind": "instructionAccountNode",
"name": "to",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": [
"",
"NOTE (Solana vs EVM): non-smart-leg collateral goes to `to_token_account`.",
"Smart-col collateral seized via the DEX CPI also follows `to` (EVM `to_`",
"parity) — but only when the supply leg's `dex_recipient_token0/1_account`",
"are supplied; without them the DEX credits the liquidator *signer*'s",
"pool token accounts. Smart-debt paybacks always pull from the signer."
]
},
{
"kind": "instructionAccountNode",
"name": "toTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4 (smart col withdraws at DEX)"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev mut because this PDA signs CPIs to the DEX and liquidity programs"]
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4"]
},
{
"kind": "instructionAccountNode",
"name": "oracle",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "newBranch",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4"]
},
{
"kind": "instructionAccountNode",
"name": "supplyRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenClaimAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "liquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidityProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "oracleProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
},
{
"kind": "instructionAccountNode",
"name": "dexProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "dexOracleProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "1a717432f783d005",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "debtAmt",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "debtPerfectAmounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "liquidatePerfectDexDebtAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "colPerUnitDebt",
"type": { "kind": "numberTypeNode", "format": "u128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "colAmounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "liquidateDexColAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "absorb",
"type": {
"kind": "booleanTypeNode",
"size": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "transferType",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "transferType" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "remainingAccountsIndices",
"type": {
"kind": "sizePrefixTypeNode",
"type": { "kind": "bytesTypeNode" },
"prefix": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "operate",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "signerSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "signerBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "recipient",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "recipientBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "recipientSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": [
"@dev mut because this PDA signs the CPI to liquidity program",
"@dev verification inside instruction logic"
]
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "oracle",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "position",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "positionTokenAccount",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "currentPositionTick",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "finalPositionTick",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "currentPositionTickId",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "finalPositionTickId",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "newBranch",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenClaimAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenClaimAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "liquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidityProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "oracleProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "associatedTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"identifier": "associatedTokenProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "d96ad06374972a87",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "newCol",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "newDebt",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "transferType",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "transferType" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "remainingAccountsIndices",
"type": {
"kind": "sizePrefixTypeNode",
"type": { "kind": "bytesTypeNode" },
"prefix": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "operateDex",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "signerSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "signerBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "recipient",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": [
"",
"NOTE (Solana vs EVM): normal (Liquidity-layer) leg outputs go to the",
"recipient's ATAs. Smart DEX leg OUTPUTS also follow `recipient` (EVM",
"`to_` parity) — but only when the leg's `dex_recipient_token0/1_account`",
"are supplied on the corresponding `DexAccount` group; without them the",
"DEX defaults smart-leg outputs to the *signer*'s pool token accounts.",
"Smart-leg INPUTS (deposit/payback pulls) always come from the signer."
]
},
{
"kind": "instructionAccountNode",
"name": "recipientBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "recipientSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev mut because this PDA signs CPIs to the DEX and liquidity programs"]
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "oracle",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "position",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "positionTokenAccount",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "currentPositionTick",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "finalPositionTick",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "currentPositionTickId",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "finalPositionTickId",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "newBranch",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "supplyRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "liquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidityProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "oracleProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
},
{
"kind": "instructionAccountNode",
"name": "dexProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@audit verify dex program in instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "df7adfb585847421",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "colAmounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "operateDexColAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "debtAmounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "operateDexDebtAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "transferType",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "transferType" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "remainingAccountsIndices",
"type": {
"kind": "sizePrefixTypeNode",
"type": { "kind": "bytesTypeNode" },
"prefix": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "operatePerfectDex",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "signerSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "signerBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "recipient",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": [
"",
"NOTE (Solana vs EVM): normal (Liquidity-layer) leg outputs go to the",
"recipient's ATAs. Smart DEX leg OUTPUTS also follow `recipient` (EVM",
"`to_` parity) — but only when the leg's `dex_recipient_token0/1_account`",
"are supplied on the corresponding `DexAccount` group; without them the",
"DEX defaults smart-leg outputs to the *signer*'s pool token accounts.",
"Smart-leg INPUTS (deposit/payback pulls) always come from the signer."
]
},
{
"kind": "instructionAccountNode",
"name": "recipientBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "recipientSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev mut because this PDA signs CPIs to the DEX and liquidity programs"]
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "oracle",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "position",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "positionTokenAccount",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "currentPositionTick",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "finalPositionTick",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "currentPositionTickId",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "finalPositionTickId",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "newBranch",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "supplyRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "liquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidityProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "oracleProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T2, T4"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"docs": ["@dev possible that this account is not required for vault like T3, T4"]
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
},
{
"kind": "instructionAccountNode",
"name": "dexProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@audit verify dex program in instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "5822b44d98baa6a2",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "colAmounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "operatePerfectDexColAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "debtAmounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "operatePerfectDexDebtAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "transferType",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "transferType" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "remainingAccountsIndices",
"type": {
"kind": "sizePrefixTypeNode",
"type": { "kind": "bytesTypeNode" },
"prefix": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "rebalance",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "rebalancer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "rebalancerSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "rebalancerBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": [
"@dev mut because this PDA signs the CPI to liquidity program",
"@dev verification inside instruction logic"
]
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidityProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "associatedTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"identifier": "associatedTokenProgram"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "6c9e4d09d234583e",
"encoding": "base16"
}
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "rebalanceDex",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "rebalancer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "rebalancerSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4 (smart collateral)"],
"defaultValue": {
"kind": "pdaValueNode",
"pda": {
"kind": "pdaNode",
"name": "rebalancerSupplyTokenAccount",
"programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"seeds": [
{
"kind": "variablePdaSeedNode",
"name": "rebalancer",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "variablePdaSeedNode",
"name": "supplyTokenProgram",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "variablePdaSeedNode",
"name": "supplyToken",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "rebalancer",
"value": { "kind": "accountValueNode", "name": "rebalancer" }
},
{
"kind": "pdaSeedValueNode",
"name": "supplyTokenProgram",
"value": { "kind": "accountValueNode", "name": "supplyTokenProgram" }
},
{
"kind": "pdaSeedValueNode",
"name": "supplyToken",
"value": { "kind": "accountValueNode", "name": "supplyToken" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "rebalancerBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4 (smart debt)"],
"defaultValue": {
"kind": "pdaValueNode",
"pda": {
"kind": "pdaNode",
"name": "rebalancerBorrowTokenAccount",
"programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"seeds": [
{
"kind": "variablePdaSeedNode",
"name": "rebalancer",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "variablePdaSeedNode",
"name": "borrowTokenProgram",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "variablePdaSeedNode",
"name": "borrowToken",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "rebalancer",
"value": { "kind": "accountValueNode", "name": "rebalancer" }
},
{
"kind": "pdaSeedValueNode",
"name": "borrowTokenProgram",
"value": { "kind": "accountValueNode", "name": "borrowTokenProgram" }
},
{
"kind": "pdaSeedValueNode",
"name": "borrowToken",
"value": { "kind": "accountValueNode", "name": "borrowToken" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev not required for T2/T4 (smart collateral)"]
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev not required for T3/T4 (smart debt)"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4 (smart collateral)"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4 (smart debt)"]
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4 (smart collateral)"]
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4 (smart debt)"]
},
{
"kind": "instructionAccountNode",
"name": "supplyRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "liquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidityProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "associatedTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"identifier": "associatedTokenProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "dexProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "dexOracleProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "47b21392fe2f6d7e",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "colToken0MinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "colToken1MinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "debtToken0MinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "debtToken1MinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "rebalanceDexWithAmounts",
"docs": [
"Rebalance a typed (T2-T4 / DEX) vault by a custom (capped) amount per leg.",
"`supply_amount`/`borrow_amount` are unsigned magnitudes; `None` rebalances",
"the full imbalance for that leg, `Some(n)` clamps it to `n`. Direction is",
"driven by the imbalance sign; the `*_min_max` slippage bounds behave as in",
"[`Self::rebalance_dex`]."
],
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "rebalancer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "rebalancerSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4 (smart collateral)"],
"defaultValue": {
"kind": "pdaValueNode",
"pda": {
"kind": "pdaNode",
"name": "rebalancerSupplyTokenAccount",
"programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"seeds": [
{
"kind": "variablePdaSeedNode",
"name": "rebalancer",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "variablePdaSeedNode",
"name": "supplyTokenProgram",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "variablePdaSeedNode",
"name": "supplyToken",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "rebalancer",
"value": { "kind": "accountValueNode", "name": "rebalancer" }
},
{
"kind": "pdaSeedValueNode",
"name": "supplyTokenProgram",
"value": { "kind": "accountValueNode", "name": "supplyTokenProgram" }
},
{
"kind": "pdaSeedValueNode",
"name": "supplyToken",
"value": { "kind": "accountValueNode", "name": "supplyToken" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "rebalancerBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4 (smart debt)"],
"defaultValue": {
"kind": "pdaValueNode",
"pda": {
"kind": "pdaNode",
"name": "rebalancerBorrowTokenAccount",
"programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"seeds": [
{
"kind": "variablePdaSeedNode",
"name": "rebalancer",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "variablePdaSeedNode",
"name": "borrowTokenProgram",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "variablePdaSeedNode",
"name": "borrowToken",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"seeds": [
{
"kind": "pdaSeedValueNode",
"name": "rebalancer",
"value": { "kind": "accountValueNode", "name": "rebalancer" }
},
{
"kind": "pdaSeedValueNode",
"name": "borrowTokenProgram",
"value": { "kind": "accountValueNode", "name": "borrowTokenProgram" }
},
{
"kind": "pdaSeedValueNode",
"name": "borrowToken",
"value": { "kind": "accountValueNode", "name": "borrowToken" }
}
]
}
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev not required for T2/T4 (smart collateral)"]
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev not required for T3/T4 (smart debt)"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4 (smart collateral)"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4 (smart debt)"]
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T2/T4 (smart collateral)"]
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev not required for T3/T4 (smart debt)"]
},
{
"kind": "instructionAccountNode",
"name": "supplyRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "liquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidityProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "associatedTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"identifier": "associatedTokenProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "dexProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "dexOracleProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "supplyDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDex",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexPosition",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token0 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexUserToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Signer's token1 account"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Reserve",
"isWritable": true,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1RateModel",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token0"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Vault",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["@dev this is Liquidity layer vault token account for token1"]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token0 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexSupplyPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **supply** position for token1 (smart-col side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken0",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token0 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexBorrowPosToken1",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["This pool's own LL **borrow** position for token1 (smart-debt side)."]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken0Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexToken1Program",
"isWritable": false,
"isSigner": false,
"isOptional": true
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken0Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": [
"Recipient's token0 account for this leg's withdraw/borrow OUTPUTS.",
"Optional: outputs default to the signer's `dex_user_token0_account`."
]
},
{
"kind": "instructionAccountNode",
"name": "borrowDexDexRecipientToken1Account",
"isWritable": true,
"isSigner": false,
"isOptional": true,
"docs": ["Recipient's token1 account for this leg's withdraw/borrow OUTPUTS."]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "f07f26a6637d337c",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "supplyAmount",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "numberTypeNode", "format": "u128", "endian": "le" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "borrowAmount",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "numberTypeNode", "format": "u128", "endian": "le" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "colToken0MinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "colToken1MinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "debtToken0MinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "debtToken1MinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "rebalanceWithAmounts",
"docs": [
"Rebalance a T1 vault by a custom (capped) amount per leg.",
"`supply_amount`/`borrow_amount` are unsigned magnitudes; `None` rebalances",
"the full imbalance for that leg, `Some(n)` clamps it to `n`. Direction",
"(deposit vs withdraw / borrow vs payback) is driven by the imbalance sign."
],
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "rebalancer",
"isWritable": true,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "rebalancerSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "rebalancerBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": [
"@dev mut because this PDA signs the CPI to liquidity program",
"@dev verification inside instruction logic"
]
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyToken",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowToken",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowPositionOnLiquidity",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowRateModel",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "liquidityProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultSupplyTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultBorrowTokenAccount",
"isWritable": true,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "systemProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "11111111111111111111111111111111",
"identifier": "systemProgram"
}
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "associatedTokenProgram",
"isWritable": false,
"isSigner": false,
"isOptional": true,
"defaultValue": {
"kind": "publicKeyValueNode",
"publicKey": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"identifier": "associatedTokenProgram"
}
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "be2190b656048d49",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "supplyAmount",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "numberTypeNode", "format": "u128", "endian": "le" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "instructionArgumentNode",
"name": "borrowAmount",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "numberTypeNode", "format": "u128", "endian": "le" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateAuthority",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": false,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": true,
"isSigner": false,
"isOptional": false
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "202e401c954bf358",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "newAuthority",
"type": { "kind": "publicKeyTypeNode" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateAuths",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "signer",
"isWritable": false,
"isSigner": true,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": true,
"isSigner": false,
"isOptional": false
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "5d60b29c3975fdd1",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "authStatus",
"type": {
"kind": "arrayTypeNode",
"item": { "kind": "definedTypeLinkNode", "name": "addressBool" },
"count": {
"kind": "prefixedCountNode",
"prefix": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
}
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateBorrowFee",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "fb7c2394caa79d41",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "borrowFee",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateBorrowRateMagnifier",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "4bfa1bb09c351a70",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "borrowRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateCollateralFactor",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "f453e3d7dc52c9dd",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "collateralFactor",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateCoreSettings",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "6554090b3c6895ea",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "supplyRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "borrowRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "collateralFactor",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "liquidationThreshold",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "liquidationMaxLimit",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "withdrawGap",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "liquidationPenalty",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "borrowFee",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateExchangePrices",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "d10ebc5ff21477c4",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateLiquidationMaxLimit",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "b7f29896b02841a1",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "liquidationMaxLimit",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateLiquidationPenalty",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "15a8a7ce62ce4520",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "liquidationPenalty",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateLiquidationThreshold",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "35b957f38a0b4f1c",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "liquidationThreshold",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateLookupTable",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultMetadata",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "dd3b1ef66adf8937",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "lookupTable",
"type": { "kind": "publicKeyTypeNode" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateOracle",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "newOracle",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "7029d112f8e2fcbc",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateRebalancer",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "cebb36e49108cb6f",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "newRebalancer",
"type": { "kind": "publicKeyTypeNode" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateSupplyRateMagnifier",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "af3b75c4d3aa160c",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "supplyRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
},
{
"kind": "instructionNode",
"name": "updateWithdrawGap",
"optionalAccountStrategy": "programId",
"accounts": [
{
"kind": "instructionAccountNode",
"name": "authority",
"isWritable": false,
"isSigner": true,
"isOptional": false,
"defaultValue": { "kind": "identityValueNode" }
},
{
"kind": "instructionAccountNode",
"name": "vaultAdmin",
"isWritable": false,
"isSigner": false,
"isOptional": false
},
{
"kind": "instructionAccountNode",
"name": "vaultState",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "vaultConfig",
"isWritable": true,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "supplyTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
},
{
"kind": "instructionAccountNode",
"name": "borrowTokenReservesLiquidity",
"isWritable": false,
"isSigner": false,
"isOptional": false,
"docs": ["@dev Verification inside instruction logic"]
}
],
"arguments": [
{
"kind": "instructionArgumentNode",
"name": "discriminator",
"defaultValueStrategy": "omitted",
"type": { "kind": "fixedSizeTypeNode", "size": 8, "type": { "kind": "bytesTypeNode" } },
"defaultValue": {
"kind": "bytesValueNode",
"data": "e5a34c1552d719e9",
"encoding": "base16"
}
},
{
"kind": "instructionArgumentNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "instructionArgumentNode",
"name": "withdrawGap",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
],
"discriminators": [
{ "kind": "fieldDiscriminatorNode", "name": "discriminator", "offset": 0 }
]
}
],
"definedTypes": [
{
"kind": "definedTypeNode",
"name": "addressBool",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "addr",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "value",
"type": {
"kind": "booleanTypeNode",
"size": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
}
]
}
},
{
"kind": "definedTypeNode",
"name": "liquidateDexColAmounts",
"docs": [
"T2/T4 smart collateral: minimum token amounts per WHOLE collateral share",
"(1e9 precision — Solana DEX shares are 9-decimal, unlike Solidity's 1e18).",
"After the core liquidation, the vault calls DEX `withdraw_perfect` (or",
"`withdraw_perfect_in_one_token`) with per-share slippage bounds computed as",
"`token_per_unit_shares * actual_col_shares / 1e9` (see `SHARES_PRECISION`).",
"Set a field to `0` to receive the full withdrawal in the *other* token only."
],
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "token0PerUnitShares",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "token1PerUnitShares",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
}
},
{
"kind": "definedTypeNode",
"name": "liquidateDexDebtAmounts",
"docs": [
"T3/T4 smart debt: liquidator-supplied token amounts + minimum shares to burn.",
"The vault calls DEX `payback(token0, token1, shares_min)`; tokens are debited from",
"the liquidator's DEX pool token accounts (signer-owned ATAs for token0/token1)."
],
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "token0",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "token1",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "sharesMin",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
}
},
{
"kind": "definedTypeNode",
"name": "liquidatePerfectDexDebtAmounts",
"docs": [
"T3/T4 smart debt: maximum token amounts per WHOLE debt share for `payback_perfect`",
"(1e9 precision — Solana DEX shares are 9-decimal, unlike Solidity's 1e18).",
"After the core liquidation, the vault calls DEX `payback_perfect` with",
"`token_per_unit_shares * actual_debt_shares / 1e9` as the per-token max",
"(see `SHARES_PRECISION`).",
"Set a field to `0` to pay back entirely in the *other* token only."
],
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "token0PerUnitShares",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "token1PerUnitShares",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
}
},
{
"kind": "definedTypeNode",
"name": "operateDexAmounts",
"docs": [
"Smart-side amounts for one imperfect DEX operate leg.",
"`token0` / `token1` — primary token amounts (positive = deposit/borrow, negative = withdraw/payback).",
"`shares_min_max` — slippage: min shares to receive (deposit/borrow) or max shares to burn (withdraw/payback)."
],
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "token0",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "token1",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "sharesMinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
}
]
}
},
{
"kind": "definedTypeNode",
"name": "operateDexColAmounts",
"docs": [
"Collateral leg for `operate_dex` (imperfect).",
"`amounts` — DEX amounts for smart col (T2/T4).",
"`new_col` — token delta for non-smart col (T1/T3)."
],
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "amounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "operateDexAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "structFieldTypeNode",
"name": "newCol",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "numberTypeNode", "format": "i128", "endian": "le" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
}
]
}
},
{
"kind": "definedTypeNode",
"name": "operateDexDebtAmounts",
"docs": [
"Debt leg for `operate_dex` (imperfect).",
"`amounts` — DEX amounts for smart debt (T3/T4).",
"`new_debt` — token delta for non-smart debt (T1/T2)."
],
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "amounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "operateDexAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "structFieldTypeNode",
"name": "newDebt",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "numberTypeNode", "format": "i128", "endian": "le" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
}
]
}
},
{
"kind": "definedTypeNode",
"name": "operatePerfectDexAmounts",
"docs": ["Pass the minimum i128 value to request max-withdrawal / max-payback."],
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "perfectShares",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "token0MinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "token1MinMax",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
}
]
}
},
{
"kind": "definedTypeNode",
"name": "operatePerfectDexColAmounts",
"docs": [
"Collateral leg for `operate_perfect_dex`.",
"`amounts` — perfect DEX amounts for smart col (T2/T4).",
"`new_col` — token delta for non-smart col (T1/T3)."
],
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "amounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "operatePerfectDexAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "structFieldTypeNode",
"name": "newCol",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "numberTypeNode", "format": "i128", "endian": "le" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
}
]
}
},
{
"kind": "definedTypeNode",
"name": "operatePerfectDexDebtAmounts",
"docs": [
"Debt leg for `operate_perfect_dex`.",
"`amounts` — perfect DEX amounts for smart debt (T3/T4).",
"`new_debt` — token delta for non-smart debt (T1/T2)."
],
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "amounts",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "definedTypeLinkNode", "name": "operatePerfectDexAmounts" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "structFieldTypeNode",
"name": "newDebt",
"type": {
"kind": "optionTypeNode",
"fixed": false,
"item": { "kind": "numberTypeNode", "format": "i128", "endian": "le" },
"prefix": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
}
]
}
},
{
"kind": "definedTypeNode",
"name": "sourceType",
"type": {
"kind": "enumTypeNode",
"variants": [
{ "kind": "enumEmptyVariantTypeNode", "name": "pyth" },
{ "kind": "enumEmptyVariantTypeNode", "name": "stakePool" },
{ "kind": "enumEmptyVariantTypeNode", "name": "msolPool" },
{ "kind": "enumEmptyVariantTypeNode", "name": "redstone" },
{ "kind": "enumEmptyVariantTypeNode", "name": "chainlink" },
{ "kind": "enumEmptyVariantTypeNode", "name": "singlePool" },
{ "kind": "enumEmptyVariantTypeNode", "name": "jupLend" },
{ "kind": "enumEmptyVariantTypeNode", "name": "chainlinkDataStreams" },
{ "kind": "enumEmptyVariantTypeNode", "name": "pstPool" },
{ "kind": "enumEmptyVariantTypeNode", "name": "dexSmartColPegOracle" },
{ "kind": "enumEmptyVariantTypeNode", "name": "dexSmartDebtPegOracle" }
],
"size": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "definedTypeNode",
"name": "sources",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "source",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "invert",
"type": {
"kind": "booleanTypeNode",
"size": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
},
{
"kind": "structFieldTypeNode",
"name": "multiplier",
"type": { "kind": "numberTypeNode", "format": "u128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "divisor",
"type": { "kind": "numberTypeNode", "format": "u128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "sourceType",
"type": { "kind": "definedTypeLinkNode", "name": "sourceType" }
}
]
}
},
{
"kind": "definedTypeNode",
"name": "tickHasDebt",
"docs": [
"Tick has debt structure",
"Each TickHasDebt can track 8 * 256 = 2048 ticks",
"children_bits has 32 bytes = 256 bits total",
"Each map within the array covers 256 ticks"
],
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "childrenBits",
"type": {
"kind": "fixedSizeTypeNode",
"size": 32,
"type": { "kind": "bytesTypeNode" }
}
}
]
}
},
{
"kind": "definedTypeNode",
"name": "transferType",
"type": {
"kind": "enumTypeNode",
"variants": [
{ "kind": "enumEmptyVariantTypeNode", "name": "sKIP" },
{ "kind": "enumEmptyVariantTypeNode", "name": "dIRECT" },
{ "kind": "enumEmptyVariantTypeNode", "name": "cLAIM" }
],
"size": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
}
],
"pdas": [
{
"kind": "pdaNode",
"name": "branch",
"seeds": [
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": { "kind": "bytesValueNode", "data": "r2NVdhsu", "encoding": "base58" }
},
{
"kind": "variablePdaSeedNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "variablePdaSeedNode",
"name": "branchId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
]
},
{
"kind": "pdaNode",
"name": "position",
"seeds": [
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": { "kind": "bytesValueNode", "data": "KomJNP1FXRP", "encoding": "base58" }
},
{
"kind": "variablePdaSeedNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "variablePdaSeedNode",
"name": "nextPositionId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
]
},
{
"kind": "pdaNode",
"name": "positionMint",
"seeds": [
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": {
"kind": "bytesValueNode",
"data": "ANAmrhybppWGDGk2kj",
"encoding": "base58"
}
},
{
"kind": "variablePdaSeedNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "variablePdaSeedNode",
"name": "nextPositionId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
]
},
{
"kind": "pdaNode",
"name": "tickHasDebtArray",
"seeds": [
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": {
"kind": "bytesValueNode",
"data": "AhNv8wXjJoPaR7uGCT",
"encoding": "base58"
}
},
{
"kind": "variablePdaSeedNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "variablePdaSeedNode",
"name": "index",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
]
},
{
"kind": "pdaNode",
"name": "vaultAdmin",
"seeds": [
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": { "kind": "bytesValueNode", "data": "WMciCyXSS7cATfK", "encoding": "base58" }
}
]
},
{
"kind": "pdaNode",
"name": "vaultConfig",
"seeds": [
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": { "kind": "bytesValueNode", "data": "3EZzcsrVMGsAZDmCz", "encoding": "base58" }
},
{
"kind": "variablePdaSeedNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
]
},
{
"kind": "pdaNode",
"name": "vaultMetadata",
"seeds": [
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": {
"kind": "bytesValueNode",
"data": "kXCsJ1HfwhL42B1RKqz",
"encoding": "base58"
}
},
{
"kind": "variablePdaSeedNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
]
},
{
"kind": "pdaNode",
"name": "vaultState",
"seeds": [
{
"kind": "constantPdaSeedNode",
"type": { "kind": "bytesTypeNode" },
"value": { "kind": "bytesValueNode", "data": "WMciCyXSU9oPBo2", "encoding": "base58" }
},
{
"kind": "variablePdaSeedNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
]
}
],
"events": [
{
"kind": "eventNode",
"name": "logAbsorb",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "colAmount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtAmount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "b1778f89b83fc5d7",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "b1778f89b83fc5d7",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logClosePosition",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "signer",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "positionId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "positionMint",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "e19c0d24bd5faa5c",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "e19c0d24bd5faa5c",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logInitBranch",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "branch",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "branchId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "7fb6d3db8cbdc165",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "7fb6d3db8cbdc165",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logInitTick",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "tick",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "38b6234ff97209af",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "38b6234ff97209af",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logInitTickHasDebtArray",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "tickHasDebtArray",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "0f867102fbce1e81",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "0f867102fbce1e81",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logInitTickIdLiquidation",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "tickIdLiquidation",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "tick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "ac40aaee2799b9e1",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "ac40aaee2799b9e1",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logInitVaultConfig",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "vaultConfig",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "c29e2337b330ae2e",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "c29e2337b330ae2e",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logInitVaultState",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "vaultState",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "8c6c4126801ac21c",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "8c6c4126801ac21c",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logLiquidate",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "signer",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "colAmount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtAmount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "to",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "9a80ca9341e9c349",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "9a80ca9341e9c349",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logLiquidateInfo",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "startTick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "endTick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "a9962e2ab2596253",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "a9962e2ab2596253",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logLiquidationRoundingDiff",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "actualDebtAmt",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "debtAmount",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "diff",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "23bdb35ada336880",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "23bdb35ada336880",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logOperate",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "signer",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "nftId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "newCol",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "newDebt",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "to",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "b40851471384ad08",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "b40851471384ad08",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logRebalance",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "supplyAmt",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowAmt",
"type": { "kind": "numberTypeNode", "format": "i128", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "5a43db29b5768409",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "5a43db29b5768409",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateAuthority",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "newAuthority",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "96989d8f0687c165",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "96989d8f0687c165",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateAuths",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "authStatus",
"type": {
"kind": "arrayTypeNode",
"item": { "kind": "definedTypeLinkNode", "name": "addressBool" },
"count": {
"kind": "prefixedCountNode",
"prefix": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
}
}
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "58506d306fcb4cfb",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "58506d306fcb4cfb",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateBorrowFee",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "borrowFee",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "21862a4210a777c4",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "21862a4210a777c4",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateBorrowRateMagnifier",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "borrowRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "ba172e75396f6b33",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "ba172e75396f6b33",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateCollateralFactor",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "collateralFactor",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "8e5900e7a4a4e652",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "8e5900e7a4a4e652",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateCoreSettings",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "supplyRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "collateralFactor",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidationThreshold",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidationMaxLimit",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "withdrawGap",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidationPenalty",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrowFee",
"type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "e9412007e6737ac5",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "e9412007e6737ac5",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateExchangePrices",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "vaultSupplyExchangePrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "vaultBorrowExchangePrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquiditySupplyExchangePrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "liquidityBorrowExchangePrice",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "bec245cc1e56b5a3",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "bec245cc1e56b5a3",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateLiquidationMaxLimit",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "liquidationMaxLimit",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "49203100ea56965e",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "49203100ea56965e",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateLiquidationPenalty",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "liquidationPenalty",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "2a844330d1854d53",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "2a844330d1854d53",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateLiquidationThreshold",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "liquidationThreshold",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "d347d7ef9fee47db",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "d347d7ef9fee47db",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateLookupTable",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "lookupTable",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "2df87e6fb9296705",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "2df87e6fb9296705",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateOracle",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "newOracle",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "fba3db391e98b10a",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "fba3db391e98b10a",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateRebalancer",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "newRebalancer",
"type": { "kind": "publicKeyTypeNode" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "424f90cc1ad999e1",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "424f90cc1ad999e1",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateSupplyRateMagnifier",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "supplyRateMagnifier",
"type": { "kind": "numberTypeNode", "format": "i16", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "c671b8d5ef12fd38",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "c671b8d5ef12fd38",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUpdateWithdrawGap",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "withdrawGap",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "b6f8302f089f1523",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "b6f8302f089f1523",
"encoding": "base16"
}
}
}
]
},
{
"kind": "eventNode",
"name": "logUserPosition",
"data": {
"kind": "hiddenPrefixTypeNode",
"type": {
"kind": "structTypeNode",
"fields": [
{
"kind": "structFieldTypeNode",
"name": "user",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "nftId",
"type": { "kind": "numberTypeNode", "format": "u32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "vaultId",
"type": { "kind": "numberTypeNode", "format": "u16", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "positionMint",
"type": { "kind": "publicKeyTypeNode" }
},
{
"kind": "structFieldTypeNode",
"name": "tick",
"type": { "kind": "numberTypeNode", "format": "i32", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "col",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
},
{
"kind": "structFieldTypeNode",
"name": "borrow",
"type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }
}
]
},
"prefix": [
{
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "2e2cd52a373bbe85",
"encoding": "base16"
}
}
]
},
"discriminators": [
{
"kind": "constantDiscriminatorNode",
"offset": 0,
"constant": {
"kind": "constantValueNode",
"type": {
"kind": "fixedSizeTypeNode",
"size": 8,
"type": { "kind": "bytesTypeNode" }
},
"value": {
"kind": "bytesValueNode",
"data": "2e2cd52a373bbe85",
"encoding": "base16"
}
}
}
]
}
],
"errors": [
{
"kind": "errorNode",
"name": "vaultNextTickNotFound",
"code": 6000,
"message": "VAULT_NEXT_TICK_NOT_FOUND",
"docs": ["VaultNextTickNotFound: VAULT_NEXT_TICK_NOT_FOUND"]
},
{
"kind": "errorNode",
"name": "vaultInvalidPositionMint",
"code": 6001,
"message": "VAULT_INVALID_POSITION_MINT",
"docs": ["VaultInvalidPositionMint: VAULT_INVALID_POSITION_MINT"]
},
{
"kind": "errorNode",
"name": "vaultTickIdLiquidationMismatch",
"code": 6002,
"message": "VAULT_TICK_ID_LIQUIDATION_MISMATCH",
"docs": ["VaultTickIdLiquidationMismatch: VAULT_TICK_ID_LIQUIDATION_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultInvalidPositionTokenAmount",
"code": 6003,
"message": "VAULT_INVALID_POSITION_TOKEN_AMOUNT",
"docs": ["VaultInvalidPositionTokenAmount: VAULT_INVALID_POSITION_TOKEN_AMOUNT"]
},
{
"kind": "errorNode",
"name": "vaultInvalidRemainingAccountsIndices",
"code": 6004,
"message": "VAULT_INVALID_REMAINING_ACCOUNTS_INDICES",
"docs": ["VaultInvalidRemainingAccountsIndices: VAULT_INVALID_REMAINING_ACCOUNTS_INDICES"]
},
{
"kind": "errorNode",
"name": "vaultTickHasDebtVaultIdMismatch",
"code": 6005,
"message": "VAULT_TICK_HAS_DEBT_VAULT_ID_MISMATCH",
"docs": ["VaultTickHasDebtVaultIdMismatch: VAULT_TICK_HAS_DEBT_VAULT_ID_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultBranchVaultIdMismatch",
"code": 6006,
"message": "VAULT_BRANCH_VAULT_ID_MISMATCH",
"docs": ["VaultBranchVaultIdMismatch: VAULT_BRANCH_VAULT_ID_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultTickVaultIdMismatch",
"code": 6007,
"message": "VAULT_TICK_VAULT_ID_MISMATCH",
"docs": ["VaultTickVaultIdMismatch: VAULT_TICK_VAULT_ID_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultInvalidDecimals",
"code": 6008,
"message": "VAULT_INVALID_DECIMALS",
"docs": ["VaultInvalidDecimals: VAULT_INVALID_DECIMALS"]
},
{
"kind": "errorNode",
"name": "vaultInvalidOperateAmount",
"code": 6009,
"message": "VAULT_INVALID_OPERATE_AMOUNT",
"docs": ["VaultInvalidOperateAmount: VAULT_INVALID_OPERATE_AMOUNT"]
},
{
"kind": "errorNode",
"name": "vaultTickIsEmpty",
"code": 6010,
"message": "VAULT_TICK_IS_EMPTY",
"docs": ["VaultTickIsEmpty: VAULT_TICK_IS_EMPTY"]
},
{
"kind": "errorNode",
"name": "vaultPositionAboveCF",
"code": 6011,
"message": "VAULT_POSITION_ABOVE_CF",
"docs": ["VaultPositionAboveCF: VAULT_POSITION_ABOVE_CF"]
},
{
"kind": "errorNode",
"name": "vaultTopTickDoesNotExist",
"code": 6012,
"message": "VAULT_TOP_TICK_DOES_NOT_EXIST",
"docs": ["VaultTopTickDoesNotExist: VAULT_TOP_TICK_DOES_NOT_EXIST"]
},
{
"kind": "errorNode",
"name": "vaultExcessSlippageLiquidation",
"code": 6013,
"message": "VAULT_EXCESS_SLIPPAGE_LIQUIDATION",
"docs": ["VaultExcessSlippageLiquidation: VAULT_EXCESS_SLIPPAGE_LIQUIDATION"]
},
{
"kind": "errorNode",
"name": "vaultNotRebalancer",
"code": 6014,
"message": "VAULT_NOT_REBALANCER",
"docs": ["VaultNotRebalancer: VAULT_NOT_REBALANCER"]
},
{
"kind": "errorNode",
"name": "vaultTokenNotInitialized",
"code": 6015,
"message": "VAULT_TOKEN_NOT_INITIALIZED",
"docs": ["VaultTokenNotInitialized: VAULT_TOKEN_NOT_INITIALIZED"]
},
{
"kind": "errorNode",
"name": "vaultUserCollateralDebtExceed",
"code": 6016,
"message": "VAULT_USER_COLLATERAL_DEBT_EXCEED",
"docs": ["VaultUserCollateralDebtExceed: VAULT_USER_COLLATERAL_DEBT_EXCEED"]
},
{
"kind": "errorNode",
"name": "vaultExcessCollateralWithdrawal",
"code": 6017,
"message": "VAULT_EXCESS_COLLATERAL_WITHDRAWAL",
"docs": ["VaultExcessCollateralWithdrawal: VAULT_EXCESS_COLLATERAL_WITHDRAWAL"]
},
{
"kind": "errorNode",
"name": "vaultExcessDebtPayback",
"code": 6018,
"message": "VAULT_EXCESS_DEBT_PAYBACK",
"docs": ["VaultExcessDebtPayback: VAULT_EXCESS_DEBT_PAYBACK"]
},
{
"kind": "errorNode",
"name": "vaultWithdrawMoreThanOperateLimit",
"code": 6019,
"message": "VAULT_WITHDRAW_MORE_THAN_OPERATE_LIMIT",
"docs": ["VaultWithdrawMoreThanOperateLimit: VAULT_WITHDRAW_MORE_THAN_OPERATE_LIMIT"]
},
{
"kind": "errorNode",
"name": "vaultInvalidLiquidationAmt",
"code": 6020,
"message": "VAULT_INVALID_LIQUIDATION_AMT",
"docs": ["VaultInvalidLiquidationAmt: VAULT_INVALID_LIQUIDATION_AMT"]
},
{
"kind": "errorNode",
"name": "vaultLiquidationResult",
"code": 6021,
"message": "VAULT_LIQUIDATION_RESULT",
"docs": ["VaultLiquidationResult: VAULT_LIQUIDATION_RESULT"]
},
{
"kind": "errorNode",
"name": "vaultBranchDebtTooLow",
"code": 6022,
"message": "VAULT_BRANCH_DEBT_TOO_LOW",
"docs": ["VaultBranchDebtTooLow: VAULT_BRANCH_DEBT_TOO_LOW"]
},
{
"kind": "errorNode",
"name": "vaultTickDebtTooLow",
"code": 6023,
"message": "VAULT_TICK_DEBT_TOO_LOW",
"docs": ["VaultTickDebtTooLow: VAULT_TICK_DEBT_TOO_LOW"]
},
{
"kind": "errorNode",
"name": "vaultLiquidityExchangePriceUnexpected",
"code": 6024,
"message": "VAULT_LIQUIDITY_EXCHANGE_PRICE_UNEXPECTED",
"docs": ["VaultLiquidityExchangePriceUnexpected: VAULT_LIQUIDITY_EXCHANGE_PRICE_UNEXPECTED"]
},
{
"kind": "errorNode",
"name": "vaultUserDebtTooLow",
"code": 6025,
"message": "VAULT_USER_DEBT_TOO_LOW",
"docs": ["VaultUserDebtTooLow: VAULT_USER_DEBT_TOO_LOW"]
},
{
"kind": "errorNode",
"name": "vaultInvalidPaybackOrDeposit",
"code": 6026,
"message": "VAULT_INVALID_PAYBACK_OR_DEPOSIT",
"docs": ["VaultInvalidPaybackOrDeposit: VAULT_INVALID_PAYBACK_OR_DEPOSIT"]
},
{
"kind": "errorNode",
"name": "vaultInvalidLiquidation",
"code": 6027,
"message": "VAULT_INVALID_LIQUIDATION",
"docs": ["VaultInvalidLiquidation: VAULT_INVALID_LIQUIDATION"]
},
{
"kind": "errorNode",
"name": "vaultNothingToRebalance",
"code": 6028,
"message": "VAULT_NOTHING_TO_REBALANCE",
"docs": ["VaultNothingToRebalance: VAULT_NOTHING_TO_REBALANCE"]
},
{
"kind": "errorNode",
"name": "vaultInvalidRebalanceMinMax",
"code": 6029,
"message": "VAULT_INVALID_REBALANCE_MIN_MAX",
"docs": ["VaultInvalidRebalanceMinMax: VAULT_INVALID_REBALANCE_MIN_MAX"]
},
{
"kind": "errorNode",
"name": "vaultLiquidationReverts",
"code": 6030,
"message": "VAULT_LIQUIDATION_REVERTS",
"docs": ["VaultLiquidationReverts: VAULT_LIQUIDATION_REVERTS"]
},
{
"kind": "errorNode",
"name": "vaultInvalidOraclePrice",
"code": 6031,
"message": "VAULT_INVALID_ORACLE_PRICE",
"docs": ["VaultInvalidOraclePrice: VAULT_INVALID_ORACLE_PRICE"]
},
{
"kind": "errorNode",
"name": "vaultBranchNotFound",
"code": 6032,
"message": "VAULT_BRANCH_NOT_FOUND",
"docs": ["VaultBranchNotFound: VAULT_BRANCH_NOT_FOUND"]
},
{
"kind": "errorNode",
"name": "vaultTickNotFound",
"code": 6033,
"message": "VAULT_TICK_NOT_FOUND",
"docs": ["VaultTickNotFound: VAULT_TICK_NOT_FOUND"]
},
{
"kind": "errorNode",
"name": "vaultTickHasDebtNotFound",
"code": 6034,
"message": "VAULT_TICK_HAS_DEBT_NOT_FOUND",
"docs": ["VaultTickHasDebtNotFound: VAULT_TICK_HAS_DEBT_NOT_FOUND"]
},
{
"kind": "errorNode",
"name": "vaultTickMismatch",
"code": 6035,
"message": "VAULT_TICK_MISMATCH",
"docs": ["VaultTickMismatch: VAULT_TICK_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultInvalidVaultId",
"code": 6036,
"message": "VAULT_INVALID_VAULT_ID",
"docs": ["VaultInvalidVaultId: VAULT_INVALID_VAULT_ID"]
},
{
"kind": "errorNode",
"name": "vaultInvalidNextPositionId",
"code": 6037,
"message": "VAULT_INVALID_NEXT_POSITION_ID",
"docs": ["VaultInvalidNextPositionId: VAULT_INVALID_NEXT_POSITION_ID"]
},
{
"kind": "errorNode",
"name": "vaultInvalidPositionId",
"code": 6038,
"message": "VAULT_INVALID_POSITION_ID",
"docs": ["VaultInvalidPositionId: VAULT_INVALID_POSITION_ID"]
},
{
"kind": "errorNode",
"name": "vaultPositionNotEmpty",
"code": 6039,
"message": "VAULT_POSITION_NOT_EMPTY",
"docs": ["VaultPositionNotEmpty: VAULT_POSITION_NOT_EMPTY"]
},
{
"kind": "errorNode",
"name": "vaultInvalidSupplyMint",
"code": 6040,
"message": "VAULT_INVALID_SUPPLY_MINT",
"docs": ["VaultInvalidSupplyMint: VAULT_INVALID_SUPPLY_MINT"]
},
{
"kind": "errorNode",
"name": "vaultInvalidBorrowMint",
"code": 6041,
"message": "VAULT_INVALID_BORROW_MINT",
"docs": ["VaultInvalidBorrowMint: VAULT_INVALID_BORROW_MINT"]
},
{
"kind": "errorNode",
"name": "vaultInvalidOracle",
"code": 6042,
"message": "VAULT_INVALID_ORACLE",
"docs": ["VaultInvalidOracle: VAULT_INVALID_ORACLE"]
},
{
"kind": "errorNode",
"name": "vaultInvalidTick",
"code": 6043,
"message": "VAULT_INVALID_TICK",
"docs": ["VaultInvalidTick: VAULT_INVALID_TICK"]
},
{
"kind": "errorNode",
"name": "vaultInvalidLiquidityProgram",
"code": 6044,
"message": "VAULT_INVALID_LIQUIDITY_PROGRAM",
"docs": ["VaultInvalidLiquidityProgram: VAULT_INVALID_LIQUIDITY_PROGRAM"]
},
{
"kind": "errorNode",
"name": "vaultInvalidPositionAuthority",
"code": 6045,
"message": "VAULT_INVALID_POSITION_AUTHORITY",
"docs": ["VaultInvalidPositionAuthority: VAULT_INVALID_POSITION_AUTHORITY"]
},
{
"kind": "errorNode",
"name": "vaultOracleNotValid",
"code": 6046,
"message": "VAULT_ORACLE_NOT_VALID",
"docs": ["VaultOracleNotValid: VAULT_ORACLE_NOT_VALID"]
},
{
"kind": "errorNode",
"name": "vaultBranchOwnerNotValid",
"code": 6047,
"message": "VAULT_BRANCH_OWNER_NOT_VALID",
"docs": ["VaultBranchOwnerNotValid: VAULT_BRANCH_OWNER_NOT_VALID"]
},
{
"kind": "errorNode",
"name": "vaultTickHasDebtOwnerNotValid",
"code": 6048,
"message": "VAULT_TICK_HAS_DEBT_OWNER_NOT_VALID",
"docs": ["VaultTickHasDebtOwnerNotValid: VAULT_TICK_HAS_DEBT_OWNER_NOT_VALID"]
},
{
"kind": "errorNode",
"name": "vaultTickOwnerNotValid",
"code": 6049,
"message": "VAULT_TICK_DATA_OWNER_NOT_VALID",
"docs": ["VaultTickOwnerNotValid: VAULT_TICK_DATA_OWNER_NOT_VALID"]
},
{
"kind": "errorNode",
"name": "vaultLiquidateRemainingAccountsTooShort",
"code": 6050,
"message": "VAULT_LIQUIDATE_REMAINING_ACCOUNTS_TOO_SHORT",
"docs": [
"VaultLiquidateRemainingAccountsTooShort: VAULT_LIQUIDATE_REMAINING_ACCOUNTS_TOO_SHORT"
]
},
{
"kind": "errorNode",
"name": "vaultOperateRemainingAccountsTooShort",
"code": 6051,
"message": "VAULT_OPERATE_REMAINING_ACCOUNTS_TOO_SHORT",
"docs": [
"VaultOperateRemainingAccountsTooShort: VAULT_OPERATE_REMAINING_ACCOUNTS_TOO_SHORT"
]
},
{
"kind": "errorNode",
"name": "vaultInvalidZerothBranch",
"code": 6052,
"message": "VAULT_INVALID_ZEROTH_BRANCH",
"docs": ["VaultInvalidZerothBranch: VAULT_INVALID_ZEROTH_BRANCH"]
},
{
"kind": "errorNode",
"name": "vaultCpiToLiquidityFailed",
"code": 6053,
"message": "VAULT_CPI_TO_LIQUIDITY_FAILED",
"docs": ["VaultCpiToLiquidityFailed: VAULT_CPI_TO_LIQUIDITY_FAILED"]
},
{
"kind": "errorNode",
"name": "vaultCpiToOracleFailed",
"code": 6054,
"message": "VAULT_CPI_TO_ORACLE_FAILED",
"docs": ["VaultCpiToOracleFailed: VAULT_CPI_TO_ORACLE_FAILED"]
},
{
"kind": "errorNode",
"name": "vaultOnlyAuthority",
"code": 6055,
"message": "VAULT_ONLY_AUTHORITY",
"docs": ["VaultOnlyAuthority: VAULT_ONLY_AUTHORITY"]
},
{
"kind": "errorNode",
"name": "vaultNewBranchInvalid",
"code": 6056,
"message": "VAULT_NEW_BRANCH_INVALID",
"docs": ["VaultNewBranchInvalid: VAULT_NEW_BRANCH_INVALID"]
},
{
"kind": "errorNode",
"name": "vaultTickHasDebtIndexMismatch",
"code": 6057,
"message": "VAULT_TICK_HAS_DEBT_INDEX_MISMATCH",
"docs": ["VaultTickHasDebtIndexMismatch: VAULT_TICK_HAS_DEBT_INDEX_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultTickHasDebtOutOfRange",
"code": 6058,
"message": "VAULT_TICK_HAS_DEBT_OUT_OF_RANGE",
"docs": ["VaultTickHasDebtOutOfRange: VAULT_TICK_HAS_DEBT_OUT_OF_RANGE"]
},
{
"kind": "errorNode",
"name": "vaultUserSupplyPositionRequired",
"code": 6059,
"message": "VAULT_USER_SUPPLY_POSITION_REQUIRED",
"docs": ["VaultUserSupplyPositionRequired: VAULT_USER_SUPPLY_POSITION_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultClaimAccountRequired",
"code": 6060,
"message": "VAULT_CLAIM_ACCOUNT_REQUIRED",
"docs": ["VaultClaimAccountRequired: VAULT_CLAIM_ACCOUNT_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultRecipientWithdrawAccountRequired",
"code": 6061,
"message": "VAULT_RECIPIENT_WITHDRAW_ACCOUNT_REQUIRED",
"docs": ["VaultRecipientWithdrawAccountRequired: VAULT_RECIPIENT_WITHDRAW_ACCOUNT_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultRecipientBorrowAccountRequired",
"code": 6062,
"message": "VAULT_RECIPIENT_BORROW_ACCOUNT_REQUIRED",
"docs": ["VaultRecipientBorrowAccountRequired: VAULT_RECIPIENT_BORROW_ACCOUNT_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultPositionAboveLiquidationThreshold",
"code": 6063,
"message": "VAULT_POSITION_ABOVE_LIQUIDATION_THRESHOLD",
"docs": [
"VaultPositionAboveLiquidationThreshold: VAULT_POSITION_ABOVE_LIQUIDATION_THRESHOLD"
]
},
{
"kind": "errorNode",
"name": "vaultAdminValueAboveLimit",
"code": 6064,
"message": "VAULT_ADMIN_VALUE_ABOVE_LIMIT",
"docs": ["VaultAdminValueAboveLimit: VAULT_ADMIN_VALUE_ABOVE_LIMIT"]
},
{
"kind": "errorNode",
"name": "vaultAdminOnlyAuths",
"code": 6065,
"message": "VAULT_ADMIN_ONLY_AUTH_ACCOUNTS",
"docs": ["VaultAdminOnlyAuths: VAULT_ADMIN_ONLY_AUTH_ACCOUNTS"]
},
{
"kind": "errorNode",
"name": "vaultAdminAddressZeroNotAllowed",
"code": 6066,
"message": "VAULT_ADMIN_ADDRESS_ZERO_NOT_ALLOWED",
"docs": ["VaultAdminAddressZeroNotAllowed: VAULT_ADMIN_ADDRESS_ZERO_NOT_ALLOWED"]
},
{
"kind": "errorNode",
"name": "vaultAdminVaultIdMismatch",
"code": 6067,
"message": "VAULT_ADMIN_VAULT_ID_MISMATCH",
"docs": ["VaultAdminVaultIdMismatch: VAULT_ADMIN_VAULT_ID_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultAdminTotalIdsMismatch",
"code": 6068,
"message": "VAULT_ADMIN_TOTAL_IDS_MISMATCH",
"docs": ["VaultAdminTotalIdsMismatch: VAULT_ADMIN_TOTAL_IDS_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultAdminTickMismatch",
"code": 6069,
"message": "VAULT_ADMIN_TICK_MISMATCH",
"docs": ["VaultAdminTickMismatch: VAULT_ADMIN_TICK_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultAdminLiquidityProgramMismatch",
"code": 6070,
"message": "VAULT_ADMIN_LIQUIDITY_PROGRAM_MISMATCH",
"docs": ["VaultAdminLiquidityProgramMismatch: VAULT_ADMIN_LIQUIDITY_PROGRAM_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultAdminMaxAuthCountReached",
"code": 6071,
"message": "VAULT_ADMIN_MAX_AUTH_COUNT_REACHED",
"docs": ["VaultAdminMaxAuthCountReached: VAULT_ADMIN_MAX_AUTH_COUNT_REACHED"]
},
{
"kind": "errorNode",
"name": "vaultAdminInvalidParams",
"code": 6072,
"message": "VAULT_ADMIN_INVALID_PARAMS",
"docs": ["VaultAdminInvalidParams: VAULT_ADMIN_INVALID_PARAMS"]
},
{
"kind": "errorNode",
"name": "vaultAdminOnlyAuthority",
"code": 6073,
"message": "VAULT_ADMIN_ONLY_AUTHORITY",
"docs": ["VaultAdminOnlyAuthority: VAULT_ADMIN_ONLY_AUTHORITY"]
},
{
"kind": "errorNode",
"name": "vaultAdminOracleProgramMismatch",
"code": 6074,
"message": "VAULT_ADMIN_ORACLE_PROGRAM_MISMATCH",
"docs": ["VaultAdminOracleProgramMismatch: VAULT_ADMIN_ORACLE_PROGRAM_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultAdminInvalidVaultType",
"code": 6075,
"message": "VAULT_ADMIN_INVALID_VAULT_TYPE",
"docs": ["VaultAdminInvalidVaultType: VAULT_ADMIN_INVALID_VAULT_TYPE"]
},
{
"kind": "errorNode",
"name": "vaultAdminInvalidDexProgram",
"code": 6076,
"message": "VAULT_ADMIN_INVALID_DEX_PROGRAM",
"docs": ["VaultAdminInvalidDexProgram: VAULT_ADMIN_INVALID_DEX_PROGRAM"]
},
{
"kind": "errorNode",
"name": "vaultAdminInvalidDexPool",
"code": 6077,
"message": "VAULT_ADMIN_INVALID_DEX_POOL",
"docs": ["VaultAdminInvalidDexPool: VAULT_ADMIN_INVALID_DEX_POOL"]
},
{
"kind": "errorNode",
"name": "vaultCpiToDexFailed",
"code": 6078,
"message": "VAULT_CPI_TO_DEX_FAILED",
"docs": ["VaultCpiToDexFailed: VAULT_CPI_TO_DEX_FAILED"]
},
{
"kind": "errorNode",
"name": "vaultDexAccountsRequired",
"code": 6079,
"message": "VAULT_DEX_ACCOUNTS_REQUIRED",
"docs": ["VaultDexAccountsRequired: VAULT_DEX_ACCOUNTS_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultInvalidDexPool",
"code": 6080,
"message": "VAULT_INVALID_DEX_POOL",
"docs": ["VaultInvalidDexPool: VAULT_INVALID_DEX_POOL"]
},
{
"kind": "errorNode",
"name": "vaultInvalidVaultTypeForDex",
"code": 6081,
"message": "VAULT_INVALID_VAULT_TYPE_FOR_DEX",
"docs": ["VaultInvalidVaultTypeForDex: VAULT_INVALID_VAULT_TYPE_FOR_DEX"]
},
{
"kind": "errorNode",
"name": "vaultOperateDexImperfectMaxUsePerfect",
"code": 6082,
"message": "VAULT_OPERATE_DEX_IMPERFECT_MAX_USE_PERFECT",
"docs": [
"VaultOperateDexImperfectMaxUsePerfect: VAULT_OPERATE_DEX_IMPERFECT_MAX_USE_PERFECT"
]
},
{
"kind": "errorNode",
"name": "vaultOperateDexNftIdMismatch",
"code": 6083,
"message": "VAULT_OPERATE_DEX_NFT_ID_MISMATCH",
"docs": ["VaultOperateDexNftIdMismatch: VAULT_OPERATE_DEX_NFT_ID_MISMATCH"]
},
{
"kind": "errorNode",
"name": "vaultAdminSupplyTokenRequired",
"code": 6084,
"message": "VAULT_ADMIN_SUPPLY_TOKEN_REQUIRED",
"docs": ["VaultAdminSupplyTokenRequired: VAULT_ADMIN_SUPPLY_TOKEN_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultAdminBorrowTokenRequired",
"code": 6085,
"message": "VAULT_ADMIN_BORROW_TOKEN_REQUIRED",
"docs": ["VaultAdminBorrowTokenRequired: VAULT_ADMIN_BORROW_TOKEN_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultAdminRateMagnifierNotAllowedForSmartLeg",
"code": 6086,
"message": "VAULT_ADMIN_RATE_MAGNIFIER_NOT_ALLOWED_FOR_SMART_LEG",
"docs": [
"VaultAdminRateMagnifierNotAllowedForSmartLeg: VAULT_ADMIN_RATE_MAGNIFIER_NOT_ALLOWED_FOR_SMART_LEG"
]
},
{
"kind": "errorNode",
"name": "vaultDexDebtSharesPaidMoreThanAvailableLiquidation",
"code": 6087,
"message": "VAULT_DEX_DEBT_SHARES_PAID_MORE_THAN_AVAILABLE_LIQUIDATION",
"docs": [
"VaultDexDebtSharesPaidMoreThanAvailableLiquidation: VAULT_DEX_DEBT_SHARES_PAID_MORE_THAN_AVAILABLE_LIQUIDATION"
]
},
{
"kind": "errorNode",
"name": "vaultSignerSupplyTokenAccountRequired",
"code": 6088,
"message": "VAULT_SIGNER_SUPPLY_TOKEN_ACCOUNT_REQUIRED",
"docs": [
"VaultSignerSupplyTokenAccountRequired: VAULT_SIGNER_SUPPLY_TOKEN_ACCOUNT_REQUIRED"
]
},
{
"kind": "errorNode",
"name": "vaultSignerBorrowTokenAccountRequired",
"code": 6089,
"message": "VAULT_SIGNER_BORROW_TOKEN_ACCOUNT_REQUIRED",
"docs": [
"VaultSignerBorrowTokenAccountRequired: VAULT_SIGNER_BORROW_TOKEN_ACCOUNT_REQUIRED"
]
},
{
"kind": "errorNode",
"name": "vaultInvalidVaultTypeForOperate",
"code": 6090,
"message": "VAULT_INVALID_VAULT_TYPE_FOR_OPERATE",
"docs": ["VaultInvalidVaultTypeForOperate: VAULT_INVALID_VAULT_TYPE_FOR_OPERATE"]
},
{
"kind": "errorNode",
"name": "vaultSupplyTokenRequired",
"code": 6091,
"message": "VAULT_SUPPLY_TOKEN_REQUIRED",
"docs": ["VaultSupplyTokenRequired: VAULT_SUPPLY_TOKEN_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultBorrowTokenRequired",
"code": 6092,
"message": "VAULT_BORROW_TOKEN_REQUIRED",
"docs": ["VaultBorrowTokenRequired: VAULT_BORROW_TOKEN_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultSupplyReservesRequired",
"code": 6093,
"message": "VAULT_SUPPLY_RESERVES_REQUIRED",
"docs": ["VaultSupplyReservesRequired: VAULT_SUPPLY_RESERVES_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultBorrowReservesRequired",
"code": 6094,
"message": "VAULT_BORROW_RESERVES_REQUIRED",
"docs": ["VaultBorrowReservesRequired: VAULT_BORROW_RESERVES_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultSupplyDexRequired",
"code": 6095,
"message": "VAULT_SUPPLY_DEX_REQUIRED",
"docs": ["VaultSupplyDexRequired: VAULT_SUPPLY_DEX_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultBorrowDexRequired",
"code": 6096,
"message": "VAULT_BORROW_DEX_REQUIRED",
"docs": ["VaultBorrowDexRequired: VAULT_BORROW_DEX_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultSupplyRateModelRequired",
"code": 6097,
"message": "VAULT_SUPPLY_RATE_MODEL_REQUIRED",
"docs": ["VaultSupplyRateModelRequired: VAULT_SUPPLY_RATE_MODEL_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultBorrowRateModelRequired",
"code": 6098,
"message": "VAULT_BORROW_RATE_MODEL_REQUIRED",
"docs": ["VaultBorrowRateModelRequired: VAULT_BORROW_RATE_MODEL_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultSupplyTokenProgramRequired",
"code": 6099,
"message": "VAULT_SUPPLY_TOKEN_PROGRAM_REQUIRED",
"docs": ["VaultSupplyTokenProgramRequired: VAULT_SUPPLY_TOKEN_PROGRAM_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultBorrowTokenProgramRequired",
"code": 6100,
"message": "VAULT_BORROW_TOKEN_PROGRAM_REQUIRED",
"docs": ["VaultBorrowTokenProgramRequired: VAULT_BORROW_TOKEN_PROGRAM_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultSupplyVaultAccountRequired",
"code": 6101,
"message": "VAULT_SUPPLY_VAULT_ACCOUNT_REQUIRED",
"docs": ["VaultSupplyVaultAccountRequired: VAULT_SUPPLY_VAULT_ACCOUNT_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultBorrowVaultAccountRequired",
"code": 6102,
"message": "VAULT_BORROW_VAULT_ACCOUNT_REQUIRED",
"docs": ["VaultBorrowVaultAccountRequired: VAULT_BORROW_VAULT_ACCOUNT_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultUserBorrowPositionRequired",
"code": 6103,
"message": "VAULT_USER_BORROW_POSITION_REQUIRED",
"docs": ["VaultUserBorrowPositionRequired: VAULT_USER_BORROW_POSITION_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultLiquidateColAmountsRequired",
"code": 6104,
"message": "VAULT_LIQUIDATE_COL_AMOUNTS_REQUIRED",
"docs": ["VaultLiquidateColAmountsRequired: VAULT_LIQUIDATE_COL_AMOUNTS_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultLiquidateDebtAmountsRequired",
"code": 6105,
"message": "VAULT_LIQUIDATE_DEBT_AMOUNTS_REQUIRED",
"docs": ["VaultLiquidateDebtAmountsRequired: VAULT_LIQUIDATE_DEBT_AMOUNTS_REQUIRED"]
},
{
"kind": "errorNode",
"name": "vaultInvalidDexOracleProgram",
"code": 6106,
"message": "VAULT_INVALID_DEX_ORACLE_PROGRAM",
"docs": ["VaultInvalidDexOracleProgram: VAULT_INVALID_DEX_ORACLE_PROGRAM"]
}
],
"constants": []
},
"additionalPrograms": []
}