{
  "address": "HxbLPNuQD7KKDVQoSQgY1cLMLrsaoseT65Xoczh7zHQW",
  "metadata": {
    "name": "nest_core",
    "version": "0.1.0",
    "spec": "0.1.0"
  },
  "instructions": [
    {
      "name": "absorb_staking_loss",
      "discriminator": [
        153,
        137,
        94,
        132,
        218,
        212,
        48,
        49
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "staking_state",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "accrue_fee",
      "discriminator": [
        195,
        95,
        246,
        102,
        250,
        61,
        187,
        28
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true,
          "relations": [
            "vault"
          ]
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "owner"
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "owner",
          "signer": true,
          "relations": [
            "vault"
          ]
        }
      ],
      "args": []
    },
    {
      "name": "add_collateral",
      "discriminator": [
        127,
        82,
        121,
        42,
        161,
        176,
        249,
        206
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "collateral_config",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  99,
                  111,
                  108,
                  108,
                  97,
                  116,
                  101,
                  114,
                  97,
                  108
                ]
              },
              {
                "kind": "arg",
                "path": "params.collateral_mint"
              }
            ]
          }
        },
        {
          "name": "collateral_mint"
        },
        {
          "name": "collateral_vault",
          "writable": true
        },
        {
          "name": "insurance_collateral_vault",
          "writable": true
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "collateral_token_program"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "AddCollateralParams"
            }
          }
        }
      ]
    },
    {
      "name": "checkpoint_staker_target_revenue",
      "discriminator": [
        165,
        175,
        206,
        178,
        241,
        167,
        30,
        192
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "staking_state",
          "signer": true
        }
      ],
      "args": []
    },
    {
      "name": "consume_staker_revenue",
      "discriminator": [
        145,
        76,
        222,
        195,
        55,
        197,
        162,
        189
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "staking_state",
          "signer": true
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "cover_bad_debt",
      "discriminator": [
        137,
        228,
        6,
        238,
        18,
        142,
        153,
        232
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "usdc_mint"
        },
        {
          "name": "psm_usdc_vault",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        },
        {
          "name": "usdc_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "deposit",
      "discriminator": [
        242,
        35,
        198,
        137,
        82,
        225,
        242,
        182
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true,
          "relations": [
            "vault"
          ]
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "owner"
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "collateral_mint"
        },
        {
          "name": "owner_collateral_account",
          "writable": true
        },
        {
          "name": "collateral_vault",
          "writable": true
        },
        {
          "name": "owner",
          "signer": true,
          "relations": [
            "vault"
          ]
        },
        {
          "name": "collateral_token_program"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "deposit_protocol_revenue",
      "discriminator": [
        41,
        50,
        194,
        174,
        236,
        255,
        174,
        22
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "staking_state"
        },
        {
          "name": "nusd_mint",
          "writable": true
        },
        {
          "name": "source_nusd_account",
          "writable": true
        },
        {
          "name": "insurance_nusd_vault",
          "writable": true
        },
        {
          "name": "staker_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "protocol_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "source",
          "signer": true
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "initialize_protocol",
      "discriminator": [
        188,
        233,
        252,
        106,
        134,
        146,
        202,
        91
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "nusd_mint"
        },
        {
          "name": "usdc_mint"
        },
        {
          "name": "psm_usdc_vault",
          "writable": true
        },
        {
          "name": "insurance_nusd_vault",
          "writable": true
        },
        {
          "name": "staker_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "protocol_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "staker_revenue_authority"
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "program",
          "address": "HxbLPNuQD7KKDVQoSQgY1cLMLrsaoseT65Xoczh7zHQW"
        },
        {
          "name": "program_data"
        },
        {
          "name": "usdc_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "params",
          "type": {
            "defined": {
              "name": "InitializeProtocolParams"
            }
          }
        }
      ]
    },
    {
      "name": "initialize_staker_revenue_accounting",
      "discriminator": [
        76,
        69,
        122,
        203,
        172,
        46,
        136,
        85
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "nusd_mint"
        },
        {
          "name": "staker_revenue_nusd_vault"
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "outstanding_revenue",
          "type": "u64"
        }
      ]
    },
    {
      "name": "initialize_vault",
      "discriminator": [
        48,
        191,
        163,
        44,
        71,
        129,
        63,
        164
      ],
      "accounts": [
        {
          "name": "collateral_config"
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "owner"
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "owner",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "liquidate_with_oracle",
      "discriminator": [
        127,
        63,
        108,
        77,
        180,
        44,
        165,
        63
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config",
            "oracle"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true,
          "relations": [
            "vault",
            "oracle"
          ]
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "vault.owner",
                "account": "Vault"
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "oracle",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  114,
                  97,
                  99,
                  108,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "collateral_mint"
        },
        {
          "name": "collateral_vault",
          "writable": true
        },
        {
          "name": "liquidator_collateral_account",
          "writable": true
        },
        {
          "name": "insurance_collateral_account",
          "writable": true
        },
        {
          "name": "nusd_mint",
          "writable": true
        },
        {
          "name": "liquidator_nusd_account",
          "writable": true
        },
        {
          "name": "insurance_nusd_vault",
          "writable": true
        },
        {
          "name": "staker_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "protocol_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "staking_state"
        },
        {
          "name": "liquidator",
          "signer": true
        },
        {
          "name": "collateral_token_program"
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "requested_repay",
          "type": "u64"
        }
      ]
    },
    {
      "name": "mint_nusd_with_oracle",
      "discriminator": [
        62,
        49,
        123,
        106,
        240,
        208,
        176,
        231
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config",
            "oracle"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true,
          "relations": [
            "vault",
            "oracle"
          ]
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "owner"
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "oracle",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  114,
                  97,
                  99,
                  108,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "collateral_mint"
        },
        {
          "name": "collateral_vault",
          "writable": true
        },
        {
          "name": "nusd_mint",
          "writable": true
        },
        {
          "name": "owner_nusd_account",
          "writable": true
        },
        {
          "name": "owner",
          "signer": true,
          "relations": [
            "vault"
          ]
        },
        {
          "name": "collateral_token_program"
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "psm_swap_in",
      "discriminator": [
        98,
        125,
        252,
        177,
        244,
        104,
        28,
        198
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "usdc_mint",
          "writable": true
        },
        {
          "name": "nusd_mint",
          "writable": true
        },
        {
          "name": "user_usdc_account",
          "writable": true
        },
        {
          "name": "psm_usdc_vault",
          "writable": true
        },
        {
          "name": "user_nusd_account",
          "writable": true
        },
        {
          "name": "user",
          "signer": true
        },
        {
          "name": "usdc_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "psm_swap_out",
      "discriminator": [
        45,
        203,
        200,
        53,
        79,
        212,
        227,
        111
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "usdc_mint",
          "writable": true
        },
        {
          "name": "nusd_mint",
          "writable": true
        },
        {
          "name": "user_nusd_account",
          "writable": true
        },
        {
          "name": "psm_usdc_vault",
          "writable": true
        },
        {
          "name": "user_usdc_account",
          "writable": true
        },
        {
          "name": "user",
          "signer": true
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "usdc_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "realize_psm_kamino_yield",
      "discriminator": [
        93,
        239,
        99,
        196,
        239,
        107,
        206,
        187
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "usdc_mint",
          "writable": true
        },
        {
          "name": "nusd_mint",
          "writable": true
        },
        {
          "name": "psm_usdc_vault",
          "writable": true
        },
        {
          "name": "insurance_nusd_vault",
          "writable": true
        },
        {
          "name": "staker_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "protocol_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "staking_state"
        },
        {
          "name": "reserve_collateral_mint",
          "writable": true
        },
        {
          "name": "protocol_kamino_collateral_vault",
          "writable": true
        },
        {
          "name": "reserve",
          "writable": true
        },
        {
          "name": "lending_market"
        },
        {
          "name": "lending_market_authority"
        },
        {
          "name": "reserve_liquidity_supply",
          "writable": true
        },
        {
          "name": "pyth_oracle"
        },
        {
          "name": "switchboard_price_oracle"
        },
        {
          "name": "switchboard_twap_oracle"
        },
        {
          "name": "scope_prices"
        },
        {
          "name": "kamino_program"
        },
        {
          "name": "usdc_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "instructions_sysvar",
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "collateral_amount",
          "type": "u64"
        },
        {
          "name": "min_yield",
          "type": "u64"
        }
      ]
    },
    {
      "name": "realize_psm_yield",
      "discriminator": [
        102,
        43,
        61,
        227,
        135,
        26,
        22,
        255
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        },
        {
          "name": "usdc_mint"
        },
        {
          "name": "nusd_mint",
          "writable": true
        },
        {
          "name": "psm_usdc_vault",
          "writable": true
        },
        {
          "name": "insurance_nusd_vault",
          "writable": true
        },
        {
          "name": "staker_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "protocol_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "staking_state"
        },
        {
          "name": "usdc_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "rebalance_psm_usdc_to_kamino",
      "discriminator": [
        137,
        87,
        80,
        104,
        244,
        4,
        137,
        231
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "usdc_mint",
          "writable": true
        },
        {
          "name": "psm_usdc_vault",
          "writable": true
        },
        {
          "name": "reserve_collateral_mint",
          "writable": true
        },
        {
          "name": "protocol_kamino_collateral_vault",
          "writable": true
        },
        {
          "name": "reserve",
          "writable": true
        },
        {
          "name": "lending_market"
        },
        {
          "name": "lending_market_authority"
        },
        {
          "name": "reserve_liquidity_supply",
          "writable": true
        },
        {
          "name": "pyth_oracle"
        },
        {
          "name": "switchboard_price_oracle"
        },
        {
          "name": "switchboard_twap_oracle"
        },
        {
          "name": "scope_prices"
        },
        {
          "name": "kamino_program"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "instructions_sysvar",
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "max_amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "redeem_psm_usdc_from_kamino",
      "discriminator": [
        176,
        239,
        110,
        177,
        243,
        136,
        154,
        198
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true
        },
        {
          "name": "usdc_mint",
          "writable": true
        },
        {
          "name": "psm_usdc_vault",
          "writable": true
        },
        {
          "name": "reserve_collateral_mint",
          "writable": true
        },
        {
          "name": "protocol_kamino_collateral_vault",
          "writable": true
        },
        {
          "name": "reserve",
          "writable": true
        },
        {
          "name": "lending_market"
        },
        {
          "name": "lending_market_authority"
        },
        {
          "name": "reserve_liquidity_supply",
          "writable": true
        },
        {
          "name": "pyth_oracle"
        },
        {
          "name": "switchboard_price_oracle"
        },
        {
          "name": "switchboard_twap_oracle"
        },
        {
          "name": "scope_prices"
        },
        {
          "name": "kamino_program"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "instructions_sysvar",
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "collateral_amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "refresh_lazer_oracle",
      "discriminator": [
        34,
        110,
        193,
        85,
        108,
        145,
        68,
        174
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config"
        },
        {
          "name": "oracle",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  114,
                  97,
                  99,
                  108,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "pyth_lazer_program",
          "address": "pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt"
        },
        {
          "name": "pyth_lazer_storage",
          "address": "3rdJbqfnagQ4yx9HXJViD4zc4xpiSqmFsKpPuSCQVyQL"
        },
        {
          "name": "pyth_lazer_treasury",
          "writable": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "instructions_sysvar",
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "message_data",
          "type": "bytes"
        },
        {
          "name": "ed25519_instruction_index",
          "type": "u16"
        },
        {
          "name": "signature_index",
          "type": "u8"
        }
      ]
    },
    {
      "name": "refresh_signed_oracle",
      "discriminator": [
        14,
        131,
        238,
        44,
        16,
        211,
        43,
        143
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config",
            "nest_price_signer"
          ]
        },
        {
          "name": "collateral_config"
        },
        {
          "name": "nest_price_signer",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  110,
                  101,
                  115,
                  116,
                  95,
                  112,
                  114,
                  105,
                  99,
                  101,
                  95,
                  115,
                  105,
                  103,
                  110,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "protocol"
              }
            ]
          }
        },
        {
          "name": "oracle",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  114,
                  97,
                  99,
                  108,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        },
        {
          "name": "instructions_sysvar",
          "address": "Sysvar1nstructions1111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "payload",
          "type": {
            "defined": {
              "name": "SignedPricePayload"
            }
          }
        },
        {
          "name": "ed25519_instruction_index",
          "type": "u16"
        }
      ]
    },
    {
      "name": "release_buyback_surplus",
      "discriminator": [
        84,
        40,
        169,
        183,
        227,
        149,
        120,
        251
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "usdc_mint"
        },
        {
          "name": "nusd_mint",
          "writable": true
        },
        {
          "name": "psm_usdc_vault",
          "writable": true
        },
        {
          "name": "protocol_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "buyback_usdc_account",
          "writable": true
        },
        {
          "name": "buyback_authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        },
        {
          "name": "usdc_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        },
        {
          "name": "min_psm_idle_after",
          "type": "u64"
        }
      ]
    },
    {
      "name": "repay_nusd",
      "discriminator": [
        2,
        57,
        254,
        251,
        125,
        67,
        159,
        186
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true,
          "relations": [
            "vault"
          ]
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "owner"
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "nusd_mint",
          "writable": true
        },
        {
          "name": "owner_nusd_account",
          "writable": true
        },
        {
          "name": "insurance_nusd_vault",
          "writable": true
        },
        {
          "name": "staker_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "protocol_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "staking_state"
        },
        {
          "name": "owner",
          "signer": true,
          "relations": [
            "vault"
          ]
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "set_buyback_config",
      "discriminator": [
        35,
        120,
        206,
        228,
        55,
        58,
        177,
        155
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "usdc_mint"
        },
        {
          "name": "buyback_usdc_account"
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        },
        {
          "name": "usdc_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "buyback_authority",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "set_collateral_caps",
      "discriminator": [
        10,
        8,
        79,
        141,
        154,
        147,
        148,
        35
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        }
      ],
      "args": [
        {
          "name": "per_vault_debt_cap",
          "type": "u128"
        },
        {
          "name": "protocol_debt_cap",
          "type": "u128"
        },
        {
          "name": "deposit_cap_raw",
          "type": "u128"
        }
      ]
    },
    {
      "name": "set_collateral_oracle_params",
      "discriminator": [
        137,
        85,
        64,
        32,
        75,
        184,
        53,
        60
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        }
      ],
      "args": [
        {
          "name": "xstock_usd_feed_id",
          "type": {
            "array": [
              "u8",
              32
            ]
          }
        },
        {
          "name": "max_confidence_bps",
          "type": "u16"
        },
        {
          "name": "max_staleness_seconds",
          "type": "i64"
        }
      ]
    },
    {
      "name": "set_collateral_paused",
      "discriminator": [
        154,
        255,
        89,
        75,
        161,
        160,
        11,
        123
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        }
      ],
      "args": [
        {
          "name": "deposits_paused",
          "type": "bool"
        },
        {
          "name": "borrows_paused",
          "type": "bool"
        },
        {
          "name": "withdraws_paused",
          "type": "bool"
        }
      ]
    },
    {
      "name": "set_collateral_risk_params",
      "discriminator": [
        95,
        176,
        166,
        200,
        85,
        83,
        220,
        100
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        }
      ],
      "args": [
        {
          "name": "borrow_ltv_bps",
          "type": "u16"
        },
        {
          "name": "liquidation_threshold_bps",
          "type": "u16"
        },
        {
          "name": "liquidation_penalty_bps",
          "type": "u16"
        },
        {
          "name": "close_factor_bps",
          "type": "u16"
        }
      ]
    },
    {
      "name": "set_collateral_stability_fee_apr",
      "discriminator": [
        223,
        103,
        148,
        84,
        140,
        107,
        116,
        5
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        }
      ],
      "args": [
        {
          "name": "stability_fee_apr_bps",
          "type": "u16"
        }
      ]
    },
    {
      "name": "set_liquidation_authority",
      "discriminator": [
        144,
        70,
        192,
        108,
        95,
        230,
        166,
        146
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        }
      ],
      "args": [
        {
          "name": "liquidation_authority",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "set_nest_price_signer",
      "discriminator": [
        212,
        84,
        18,
        249,
        9,
        27,
        52,
        169
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "nest_price_signer",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  110,
                  101,
                  115,
                  116,
                  95,
                  112,
                  114,
                  105,
                  99,
                  101,
                  95,
                  115,
                  105,
                  103,
                  110,
                  101,
                  114
                ]
              },
              {
                "kind": "account",
                "path": "protocol"
              }
            ]
          }
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true,
          "relations": [
            "protocol"
          ]
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "signer",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "set_paused",
      "discriminator": [
        91,
        60,
        125,
        192,
        176,
        225,
        166,
        218
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        }
      ],
      "args": [
        {
          "name": "paused",
          "type": "bool"
        }
      ]
    },
    {
      "name": "set_protocol_authority",
      "discriminator": [
        96,
        162,
        46,
        152,
        72,
        147,
        175,
        176
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        }
      ],
      "args": [
        {
          "name": "authority",
          "type": "pubkey"
        }
      ]
    },
    {
      "name": "set_psm_kamino_collateral_vault",
      "discriminator": [
        13,
        232,
        228,
        229,
        184,
        161,
        49,
        172
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "protocol_kamino_collateral_vault"
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": []
    },
    {
      "name": "set_psm_outflow_circuit_breaker",
      "discriminator": [
        12,
        161,
        18,
        168,
        201,
        97,
        98,
        83
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        }
      ],
      "args": [
        {
          "name": "enabled",
          "type": "bool"
        },
        {
          "name": "limit_usdc",
          "type": "u128"
        },
        {
          "name": "limit_bps",
          "type": "u16"
        },
        {
          "name": "window_seconds",
          "type": "i64"
        }
      ]
    },
    {
      "name": "set_staker_yield_params",
      "discriminator": [
        248,
        100,
        44,
        20,
        139,
        127,
        138,
        235
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          }
        },
        {
          "name": "staking_state"
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        }
      ],
      "args": [
        {
          "name": "staker_target_apr_bps",
          "type": "u64"
        },
        {
          "name": "staker_capacity_kamino_apr_bps",
          "type": "u64"
        }
      ]
    },
    {
      "name": "settle_liquidation_proceeds",
      "discriminator": [
        24,
        111,
        133,
        141,
        189,
        31,
        175,
        154
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "liquidation_receipt"
          ]
        },
        {
          "name": "liquidation_receipt",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  108,
                  105,
                  113,
                  117,
                  105,
                  100,
                  97,
                  116,
                  105,
                  111,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "liquidation_receipt.vault",
                "account": "LiquidationReceipt"
              }
            ]
          }
        },
        {
          "name": "vault"
        },
        {
          "name": "usdc_mint"
        },
        {
          "name": "nusd_mint",
          "writable": true
        },
        {
          "name": "liquidator_usdc_account",
          "writable": true
        },
        {
          "name": "psm_usdc_vault",
          "writable": true
        },
        {
          "name": "borrower_nusd_account",
          "writable": true
        },
        {
          "name": "insurance_nusd_vault",
          "writable": true
        },
        {
          "name": "staker_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "protocol_revenue_nusd_vault",
          "writable": true
        },
        {
          "name": "staking_state"
        },
        {
          "name": "liquidator",
          "writable": true,
          "signer": true
        },
        {
          "name": "usdc_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "nusd_token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        }
      ],
      "args": [
        {
          "name": "sale_proceeds_usdc",
          "type": "u64"
        }
      ]
    },
    {
      "name": "start_liquidation_with_oracle",
      "discriminator": [
        144,
        96,
        55,
        128,
        128,
        60,
        52,
        74
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config",
            "oracle"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true,
          "relations": [
            "vault",
            "oracle"
          ]
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "vault.owner",
                "account": "Vault"
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "oracle",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  114,
                  97,
                  99,
                  108,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "collateral_mint"
        },
        {
          "name": "collateral_vault",
          "writable": true
        },
        {
          "name": "liquidator_collateral_account",
          "writable": true
        },
        {
          "name": "liquidation_receipt",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  108,
                  105,
                  113,
                  117,
                  105,
                  100,
                  97,
                  116,
                  105,
                  111,
                  110
                ]
              },
              {
                "kind": "account",
                "path": "vault"
              }
            ]
          }
        },
        {
          "name": "liquidator",
          "writable": true,
          "signer": true
        },
        {
          "name": "collateral_token_program"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "trip_collateral_emergency_breaker",
      "discriminator": [
        2,
        143,
        25,
        42,
        194,
        46,
        166,
        247
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true
        },
        {
          "name": "liquidator",
          "signer": true
        }
      ],
      "args": []
    },
    {
      "name": "trip_collateral_vault_coverage_breaker",
      "discriminator": [
        212,
        192,
        140,
        228,
        183,
        5,
        204,
        205
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true
        },
        {
          "name": "collateral_mint"
        },
        {
          "name": "collateral_vault"
        },
        {
          "name": "collateral_token_program"
        }
      ],
      "args": []
    },
    {
      "name": "withdraw_insurance_collateral",
      "discriminator": [
        194,
        237,
        161,
        175,
        40,
        147,
        76,
        157
      ],
      "accounts": [
        {
          "name": "protocol",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config"
          ]
        },
        {
          "name": "collateral_config"
        },
        {
          "name": "collateral_mint"
        },
        {
          "name": "insurance_collateral_vault",
          "writable": true
        },
        {
          "name": "authority_collateral_account",
          "writable": true
        },
        {
          "name": "authority",
          "signer": true,
          "relations": [
            "protocol"
          ]
        },
        {
          "name": "collateral_token_program"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    },
    {
      "name": "withdraw_with_oracle",
      "discriminator": [
        32,
        51,
        70,
        239,
        169,
        97,
        210,
        120
      ],
      "accounts": [
        {
          "name": "protocol",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  112,
                  114,
                  111,
                  116,
                  111,
                  99,
                  111,
                  108
                ]
              }
            ]
          },
          "relations": [
            "collateral_config",
            "oracle"
          ]
        },
        {
          "name": "collateral_config",
          "writable": true,
          "relations": [
            "vault",
            "oracle"
          ]
        },
        {
          "name": "vault",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  118,
                  97,
                  117,
                  108,
                  116
                ]
              },
              {
                "kind": "account",
                "path": "owner"
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "oracle",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  111,
                  114,
                  97,
                  99,
                  108,
                  101
                ]
              },
              {
                "kind": "account",
                "path": "collateral_config"
              }
            ]
          }
        },
        {
          "name": "collateral_mint"
        },
        {
          "name": "collateral_vault",
          "writable": true
        },
        {
          "name": "owner_collateral_account",
          "writable": true
        },
        {
          "name": "owner",
          "signer": true,
          "relations": [
            "vault"
          ]
        },
        {
          "name": "collateral_token_program"
        }
      ],
      "args": [
        {
          "name": "amount",
          "type": "u64"
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "CollateralConfig",
      "discriminator": [
        150,
        147,
        210,
        201,
        79,
        202,
        93,
        49
      ]
    },
    {
      "name": "LiquidationReceipt",
      "discriminator": [
        74,
        164,
        77,
        86,
        42,
        241,
        13,
        206
      ]
    },
    {
      "name": "NestPriceSignerConfig",
      "discriminator": [
        206,
        89,
        193,
        130,
        196,
        142,
        35,
        209
      ]
    },
    {
      "name": "OracleSnapshot",
      "discriminator": [
        203,
        14,
        167,
        223,
        1,
        158,
        56,
        127
      ]
    },
    {
      "name": "Protocol",
      "discriminator": [
        45,
        39,
        101,
        43,
        115,
        72,
        131,
        40
      ]
    },
    {
      "name": "Storage",
      "discriminator": [
        209,
        117,
        255,
        185,
        196,
        175,
        68,
        9
      ]
    },
    {
      "name": "Vault",
      "discriminator": [
        211,
        8,
        232,
        43,
        2,
        152,
        117,
        119
      ]
    }
  ],
  "events": [
    {
      "name": "ProtocolRevenueDeposited",
      "discriminator": [
        168,
        240,
        238,
        100,
        58,
        7,
        109,
        198
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "InvalidParameter",
      "msg": "invalid parameter"
    },
    {
      "code": 6001,
      "name": "MathOverflow",
      "msg": "math overflow"
    },
    {
      "code": 6002,
      "name": "Paused",
      "msg": "protocol is paused"
    },
    {
      "code": 6003,
      "name": "Unauthorized",
      "msg": "unauthorized"
    },
    {
      "code": 6004,
      "name": "CollateralPaused",
      "msg": "collateral is paused"
    },
    {
      "code": 6005,
      "name": "BorrowPaused",
      "msg": "borrow is paused"
    },
    {
      "code": 6006,
      "name": "WithdrawPaused",
      "msg": "withdraw is paused"
    },
    {
      "code": 6007,
      "name": "DepositCapExceeded",
      "msg": "deposit cap exceeded"
    },
    {
      "code": 6008,
      "name": "DebtCapExceeded",
      "msg": "debt cap exceeded"
    },
    {
      "code": 6009,
      "name": "VaultDebtCapExceeded",
      "msg": "vault debt cap exceeded"
    },
    {
      "code": 6010,
      "name": "InsufficientCollateral",
      "msg": "insufficient collateral"
    },
    {
      "code": 6011,
      "name": "VaultHealthy",
      "msg": "vault is healthy"
    },
    {
      "code": 6012,
      "name": "OracleError",
      "msg": "oracle error"
    },
    {
      "code": 6013,
      "name": "PsmCapExceeded",
      "msg": "psm cap exceeded"
    },
    {
      "code": 6014,
      "name": "PsmInsufficientLiquidity",
      "msg": "psm has insufficient idle liquidity"
    },
    {
      "code": 6015,
      "name": "PsmNoSurplus",
      "msg": "psm has no realized surplus usdc to route"
    },
    {
      "code": 6016,
      "name": "PsmKaminoTargetReached",
      "msg": "psm kamino deployment target is already reached"
    },
    {
      "code": 6017,
      "name": "PsmKaminoPrincipalNotCovered",
      "msg": "remaining Kamino cTokens do not cover tracked PSM principal"
    },
    {
      "code": 6018,
      "name": "AmountOverflow",
      "msg": "amount does not fit in SPL token u64 amount"
    },
    {
      "code": 6019,
      "name": "TransferFeeNotSupported",
      "msg": "token transfer fee or hook reduced received amount"
    },
    {
      "code": 6020,
      "name": "BadDebtOutstanding",
      "msg": "bad debt must be covered before routing psm surplus as yield"
    },
    {
      "code": 6021,
      "name": "InsufficientProtocolRevenue",
      "msg": "insufficient protocol revenue"
    },
    {
      "code": 6022,
      "name": "InsufficientLiquidationProceeds",
      "msg": "liquidation sale proceeds do not cover seized vault principal"
    },
    {
      "code": 6023,
      "name": "InvalidPsmOutflowCircuitBreaker",
      "msg": "psm outflow circuit breaker configuration is invalid"
    },
    {
      "code": 6024,
      "name": "PsmOutflowLimitExceeded",
      "msg": "psm outflow circuit breaker limit exceeded"
    },
    {
      "code": 6025,
      "name": "StakerRevenueAccountingNotInitialized",
      "msg": "staker revenue accounting must be initialized"
    },
    {
      "code": 6026,
      "name": "StakerRevenueAccountingAlreadyInitialized",
      "msg": "staker revenue accounting is already initialized"
    },
    {
      "code": 6027,
      "name": "ProtocolMustBePaused",
      "msg": "protocol must be paused for this operation"
    },
    {
      "code": 6028,
      "name": "CollateralCustodyFrozen",
      "msg": "collateral custody account is frozen"
    }
  ],
  "types": [
    {
      "name": "AddCollateralParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "collateral_mint",
            "type": "pubkey"
          },
          {
            "name": "token_program",
            "type": "pubkey"
          },
          {
            "name": "symbol",
            "type": {
              "array": [
                "u8",
                16
              ]
            }
          },
          {
            "name": "collateral_decimals",
            "type": "u8"
          },
          {
            "name": "xstock_usd_feed_id",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "borrow_ltv_bps",
            "type": "u16"
          },
          {
            "name": "liquidation_threshold_bps",
            "type": "u16"
          },
          {
            "name": "liquidation_penalty_bps",
            "type": "u16"
          },
          {
            "name": "close_factor_bps",
            "type": "u16"
          },
          {
            "name": "max_confidence_bps",
            "type": "u16"
          },
          {
            "name": "max_staleness_seconds",
            "type": "i64"
          },
          {
            "name": "per_vault_debt_cap",
            "type": "u128"
          },
          {
            "name": "protocol_debt_cap",
            "type": "u128"
          },
          {
            "name": "deposit_cap_raw",
            "type": "u128"
          }
        ]
      }
    },
    {
      "name": "CollateralConfig",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "protocol",
            "type": "pubkey"
          },
          {
            "name": "collateral_mint",
            "type": "pubkey"
          },
          {
            "name": "collateral_vault",
            "type": "pubkey"
          },
          {
            "name": "insurance_collateral_vault",
            "type": "pubkey"
          },
          {
            "name": "token_program",
            "type": "pubkey"
          },
          {
            "name": "symbol",
            "type": {
              "array": [
                "u8",
                16
              ]
            }
          },
          {
            "name": "collateral_decimals",
            "type": "u8"
          },
          {
            "name": "xstock_usd_feed_id",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "reserved_underlying_usd_feed_id",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "stability_fee_state",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "borrow_ltv_bps",
            "type": "u16"
          },
          {
            "name": "liquidation_threshold_bps",
            "type": "u16"
          },
          {
            "name": "liquidation_penalty_bps",
            "type": "u16"
          },
          {
            "name": "close_factor_bps",
            "type": "u16"
          },
          {
            "name": "max_confidence_bps",
            "type": "u16"
          },
          {
            "name": "max_staleness_seconds",
            "type": "i64"
          },
          {
            "name": "stability_fee_activation_ts",
            "type": "i64"
          },
          {
            "name": "stability_fee_last_update_ts",
            "type": "i64"
          },
          {
            "name": "stability_fee_apr_bps",
            "type": "u16"
          },
          {
            "name": "per_vault_debt_cap",
            "type": "u128"
          },
          {
            "name": "protocol_debt_cap",
            "type": "u128"
          },
          {
            "name": "deposit_cap_raw",
            "type": "u128"
          },
          {
            "name": "total_debt",
            "type": "u128"
          },
          {
            "name": "total_deposits_raw",
            "type": "u128"
          },
          {
            "name": "deposits_paused",
            "type": "bool"
          },
          {
            "name": "borrows_paused",
            "type": "bool"
          },
          {
            "name": "withdraws_paused",
            "type": "bool"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "InitializeProtocolParams",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "psm_cap",
            "type": "u128"
          },
          {
            "name": "protocol_debt_cap",
            "type": "u128"
          },
          {
            "name": "stability_fee_apr_bps",
            "type": "u64"
          },
          {
            "name": "psm_swap_in_fee_bps",
            "type": "u16"
          },
          {
            "name": "psm_swap_out_fee_bps",
            "type": "u16"
          },
          {
            "name": "kamino_program_id",
            "type": "pubkey"
          },
          {
            "name": "staker_target_apr_bps",
            "type": "u64"
          },
          {
            "name": "staker_capacity_kamino_apr_bps",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "LiquidationReceipt",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "protocol",
            "type": "pubkey"
          },
          {
            "name": "collateral_config",
            "type": "pubkey"
          },
          {
            "name": "vault",
            "type": "pubkey"
          },
          {
            "name": "liquidator",
            "type": "pubkey"
          },
          {
            "name": "collateral_mint",
            "type": "pubkey"
          },
          {
            "name": "collateral_raw",
            "type": "u128"
          },
          {
            "name": "min_settlement_usdc",
            "type": "u128"
          },
          {
            "name": "target_settlement_usdc",
            "type": "u128"
          },
          {
            "name": "principal_debt",
            "type": "u128"
          },
          {
            "name": "accrued_fee",
            "type": "u128"
          },
          {
            "name": "started_at_ts",
            "type": "i64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "MarketStateAccount",
      "type": {
        "kind": "enum",
        "variants": [
          {
            "name": "Regular"
          },
          {
            "name": "Extended"
          },
          {
            "name": "Closed"
          }
        ]
      }
    },
    {
      "name": "NestPriceSignerConfig",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "protocol",
            "type": "pubkey"
          },
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "signer",
            "type": "pubkey"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "OraclePriceAccount",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "feed_id",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "price_e8",
            "type": "u64"
          },
          {
            "name": "confidence_e8",
            "type": "u64"
          },
          {
            "name": "publish_time",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "OracleSnapshot",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "protocol",
            "type": "pubkey"
          },
          {
            "name": "collateral_config",
            "type": "pubkey"
          },
          {
            "name": "xstock_usd",
            "type": {
              "defined": {
                "name": "OraclePriceAccount"
              }
            }
          },
          {
            "name": "reserved_underlying_usd",
            "type": {
              "defined": {
                "name": "OraclePriceAccount"
              }
            }
          },
          {
            "name": "reserved_redemption_rate",
            "type": {
              "defined": {
                "name": "OraclePriceAccount"
              }
            }
          },
          {
            "name": "reserved_market_state",
            "type": {
              "defined": {
                "name": "MarketStateAccount"
              }
            }
          },
          {
            "name": "source_publish_time_us",
            "type": "i64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "Protocol",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "liquidation_authority",
            "type": "pubkey"
          },
          {
            "name": "nusd_mint",
            "type": "pubkey"
          },
          {
            "name": "usdc_mint",
            "type": "pubkey"
          },
          {
            "name": "psm_usdc_vault",
            "type": "pubkey"
          },
          {
            "name": "insurance_nusd_vault",
            "type": "pubkey"
          },
          {
            "name": "staker_revenue_nusd_vault",
            "type": "pubkey"
          },
          {
            "name": "staker_revenue_authority",
            "type": "pubkey"
          },
          {
            "name": "total_debt",
            "type": "u128"
          },
          {
            "name": "total_uncollected_fees",
            "type": "u128"
          },
          {
            "name": "realized_revenue_for_stakers",
            "docs": [
              "Revenue routed to stakers that has not yet been harvested."
            ],
            "type": "u128"
          },
          {
            "name": "insurance_fund_nusd",
            "type": "u128"
          },
          {
            "name": "bad_debt_nusd",
            "type": "u128"
          },
          {
            "name": "psm_usdc_liabilities",
            "type": "u128"
          },
          {
            "name": "psm_nusd_supply",
            "type": "u128"
          },
          {
            "name": "psm_idle_usdc",
            "type": "u128"
          },
          {
            "name": "psm_kamino_deployed_usdc",
            "type": "u128"
          },
          {
            "name": "psm_kamino_collateral_vault",
            "type": "pubkey"
          },
          {
            "name": "psm_cap",
            "type": "u128"
          },
          {
            "name": "protocol_debt_cap",
            "type": "u128"
          },
          {
            "name": "stability_fee_apr_bps",
            "type": "u64"
          },
          {
            "name": "psm_swap_in_fee_bps",
            "type": "u16"
          },
          {
            "name": "psm_swap_out_fee_bps",
            "type": "u16"
          },
          {
            "name": "kamino_program_id",
            "type": "pubkey"
          },
          {
            "name": "insurance_target_bps",
            "type": "u16"
          },
          {
            "name": "insurance_fee_share_bps",
            "type": "u16"
          },
          {
            "name": "staker_revenue_accounting_initialized",
            "docs": [
              "Reuses the deployed reserved byte. Legacy accounts must be reconciled once."
            ],
            "type": "bool"
          },
          {
            "name": "paused",
            "type": "bool"
          },
          {
            "name": "bump",
            "type": "u8"
          },
          {
            "name": "protocol_revenue_nusd_vault",
            "type": "pubkey"
          },
          {
            "name": "realized_revenue_for_protocol",
            "type": "u128"
          },
          {
            "name": "staker_target_revenue_due",
            "type": "u128"
          },
          {
            "name": "staker_target_last_accrual_ts",
            "type": "i64"
          },
          {
            "name": "staker_target_apr_bps",
            "type": "u64"
          },
          {
            "name": "staker_capacity_kamino_apr_bps",
            "type": "u64"
          },
          {
            "name": "pending_liquidation_principal",
            "type": "u128"
          },
          {
            "name": "pending_liquidation_fees",
            "type": "u128"
          },
          {
            "name": "psm_outflow_window_start_ts",
            "type": "i64"
          },
          {
            "name": "psm_outflow_window_usdc",
            "type": "u128"
          },
          {
            "name": "psm_outflow_limit_usdc",
            "type": "u128"
          },
          {
            "name": "psm_outflow_limit_bps",
            "type": "u16"
          },
          {
            "name": "psm_outflow_window_seconds",
            "type": "i64"
          },
          {
            "name": "psm_outflow_circuit_breaker_enabled",
            "type": "bool"
          },
          {
            "name": "psm_outflow_window_basis_usdc",
            "type": "u128"
          },
          {
            "name": "buyback_authority",
            "type": "pubkey"
          },
          {
            "name": "buyback_usdc_account",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "ProtocolRevenueDeposited",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "protocol",
            "type": "pubkey"
          },
          {
            "name": "source",
            "type": "pubkey"
          },
          {
            "name": "source_nusd_account",
            "type": "pubkey"
          },
          {
            "name": "amount_nusd",
            "type": "u64"
          },
          {
            "name": "bad_debt_repaid_nusd",
            "type": "u64"
          },
          {
            "name": "insurance_nusd",
            "type": "u64"
          },
          {
            "name": "staker_nusd",
            "type": "u64"
          },
          {
            "name": "protocol_nusd",
            "type": "u64"
          }
        ]
      }
    },
    {
      "name": "SignedPricePayload",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "magic",
            "type": {
              "array": [
                "u8",
                8
              ]
            }
          },
          {
            "name": "version",
            "type": "u8"
          },
          {
            "name": "feed_id",
            "type": {
              "array": [
                "u8",
                32
              ]
            }
          },
          {
            "name": "price_e8",
            "type": "u64"
          },
          {
            "name": "confidence_e8",
            "type": "u64"
          },
          {
            "name": "publish_time",
            "type": "i64"
          },
          {
            "name": "expires_at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Storage",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "top_authority",
            "type": "pubkey"
          },
          {
            "name": "treasury",
            "type": "pubkey"
          },
          {
            "name": "single_update_fee_in_lamports",
            "type": "u64"
          },
          {
            "name": "num_trusted_signers",
            "type": "u8"
          },
          {
            "name": "trusted_signers",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "TrustedSignerInfo",
                    "generics": [
                      {
                        "kind": "type",
                        "type": "pubkey"
                      }
                    ]
                  }
                },
                5
              ]
            }
          },
          {
            "name": "num_trusted_ecdsa_signers",
            "type": "u8"
          },
          {
            "name": "trusted_ecdsa_signers",
            "type": {
              "array": [
                {
                  "defined": {
                    "name": "TrustedSignerInfo",
                    "generics": [
                      {
                        "kind": "type",
                        "type": {
                          "array": [
                            "u8",
                            20
                          ]
                        }
                      }
                    ]
                  }
                },
                2
              ]
            }
          },
          {
            "name": "_extra_space",
            "type": {
              "array": [
                "u8",
                43
              ]
            }
          }
        ]
      }
    },
    {
      "name": "TrustedSignerInfo",
      "generics": [
        {
          "kind": "type",
          "name": "T"
        }
      ],
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "pubkey",
            "type": {
              "generic": "T"
            }
          },
          {
            "name": "expires_at",
            "type": "i64"
          }
        ]
      }
    },
    {
      "name": "Vault",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "owner",
            "type": "pubkey"
          },
          {
            "name": "collateral_config",
            "type": "pubkey"
          },
          {
            "name": "collateral_raw",
            "type": "u128"
          },
          {
            "name": "principal_debt",
            "type": "u128"
          },
          {
            "name": "accrued_fee",
            "type": "u128"
          },
          {
            "name": "last_accrual_ts",
            "type": "i64"
          },
          {
            "name": "bump",
            "type": "u8"
          }
        ]
      }
    }
  ]
}
