[
 {
  "type": "constructor",
  "inputs": [
   {
    "name": "m",
    "type": "tuple",
    "components": [
     {
      "name": "stock",
      "type": "address",
      "internalType": "address"
     },
     {
      "name": "collateral",
      "type": "address",
      "internalType": "address"
     },
     {
      "name": "usdg",
      "type": "address",
      "internalType": "address"
     },
     {
      "name": "oracle",
      "type": "address",
      "internalType": "address"
     },
     {
      "name": "router",
      "type": "address",
      "internalType": "address"
     },
     {
      "name": "poolFee",
      "type": "uint24",
      "internalType": "uint24"
     },
     {
      "name": "collateralFeed",
      "type": "address",
      "internalType": "address"
     },
     {
      "name": "collateralPoolFee",
      "type": "uint24",
      "internalType": "uint24"
     },
     {
      "name": "haircutBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "mmHaircutBps",
      "type": "uint16",
      "internalType": "uint16"
     }
    ],
    "internalType": "struct StockLend.Market"
   },
   {
    "name": "owner_",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "p",
    "type": "tuple",
    "components": [
     {
      "name": "imOpenBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "imClosedBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "mmBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "alphaBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "baseRateBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "closedRateBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "liqBonusBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "buyInBonusBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "protocolBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "maxBuyInSlipBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "slipGrowthBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "slipCapBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "termOpen",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "termClosed",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "reopenGrace",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "borrowCap",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "minBorrow",
      "type": "uint128",
      "internalType": "uint128"
     }
    ],
    "internalType": "struct StockLend.Params"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "name": "BadParams",
  "type": "error",
  "inputs": []
 },
 {
  "name": "CapReached",
  "type": "error",
  "inputs": []
 },
 {
  "name": "CollateralFeedUnhealthy",
  "type": "error",
  "inputs": []
 },
 {
  "name": "CollateralLeft",
  "type": "error",
  "inputs": []
 },
 {
  "name": "EnforcedPause",
  "type": "error",
  "inputs": []
 },
 {
  "name": "ExpectedPause",
  "type": "error",
  "inputs": []
 },
 {
  "name": "FeeTooHigh",
  "type": "error",
  "inputs": [
   {
    "name": "fee",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "max",
    "type": "uint256",
    "internalType": "uint256"
   }
  ]
 },
 {
  "name": "FlashCallbackFailed",
  "type": "error",
  "inputs": []
 },
 {
  "name": "FlashDisabled",
  "type": "error",
  "inputs": []
 },
 {
  "name": "FlashUnsupported",
  "type": "error",
  "inputs": []
 },
 {
  "name": "Insolvent",
  "type": "error",
  "inputs": []
 },
 {
  "name": "NoIdle",
  "type": "error",
  "inputs": []
 },
 {
  "name": "NotBorrower",
  "type": "error",
  "inputs": []
 },
 {
  "name": "NotLiquidatable",
  "type": "error",
  "inputs": []
 },
 {
  "name": "NothingToDo",
  "type": "error",
  "inputs": []
 },
 {
  "name": "OracleMismatch",
  "type": "error",
  "inputs": []
 },
 {
  "name": "OraclePaused",
  "type": "error",
  "inputs": []
 },
 {
  "name": "OwnableInvalidOwner",
  "type": "error",
  "inputs": [
   {
    "name": "owner",
    "type": "address",
    "internalType": "address"
   }
  ]
 },
 {
  "name": "OwnableUnauthorizedAccount",
  "type": "error",
  "inputs": [
   {
    "name": "account",
    "type": "address",
    "internalType": "address"
   }
  ]
 },
 {
  "name": "ReentrancyGuardReentrantCall",
  "type": "error",
  "inputs": []
 },
 {
  "name": "Renounce",
  "type": "error",
  "inputs": []
 },
 {
  "name": "SafeERC20FailedOperation",
  "type": "error",
  "inputs": [
   {
    "name": "token",
    "type": "address",
    "internalType": "address"
   }
  ]
 },
 {
  "name": "TooSmall",
  "type": "error",
  "inputs": []
 },
 {
  "name": "Undercollateralised",
  "type": "error",
  "inputs": [
   {
    "name": "required",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "given",
    "type": "uint256",
    "internalType": "uint256"
   }
  ]
 },
 {
  "name": "Borrow",
  "type": "event",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "indexed": true,
    "internalType": "uint256"
   },
   {
    "name": "borrower",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "collateral",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "feeOpen",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "premiumBps",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "maturity",
    "type": "uint64",
    "indexed": false,
    "internalType": "uint64"
   }
  ],
  "anonymous": false
 },
 {
  "name": "BuyIn",
  "type": "event",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "indexed": true,
    "internalType": "uint256"
   },
   {
    "name": "caller",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "spent",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "bonus",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "Closed",
  "type": "event",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "indexed": true,
    "internalType": "uint256"
   },
   {
    "name": "collateralReturned",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "CollateralAdded",
  "type": "event",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "indexed": true,
    "internalType": "uint256"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "CollateralClaimed",
  "type": "event",
  "inputs": [
   {
    "name": "borrower",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "CollateralFeedSet",
  "type": "event",
  "inputs": [
   {
    "name": "oldFeed",
    "type": "address",
    "indexed": false,
    "internalType": "address"
   },
   {
    "name": "newFeed",
    "type": "address",
    "indexed": false,
    "internalType": "address"
   },
   {
    "name": "oldPx",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "newPx",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "repriced",
    "type": "bool",
    "indexed": false,
    "internalType": "bool"
   }
  ],
  "anonymous": false
 },
 {
  "name": "CollateralRemoved",
  "type": "event",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "indexed": true,
    "internalType": "uint256"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "Deposit",
  "type": "event",
  "inputs": [
   {
    "name": "lender",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "shares",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "FeesClaimed",
  "type": "event",
  "inputs": [
   {
    "name": "lender",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "usdg",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "FlashFeeSet",
  "type": "event",
  "inputs": [
   {
    "name": "bps",
    "type": "uint16",
    "indexed": false,
    "internalType": "uint16"
   }
  ],
  "anonymous": false
 },
 {
  "name": "FlashLoan",
  "type": "event",
  "inputs": [
   {
    "name": "receiver",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "initiator",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "fee",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "HaircutSet",
  "type": "event",
  "inputs": [
   {
    "name": "bps",
    "type": "uint16",
    "indexed": false,
    "internalType": "uint16"
   },
   {
    "name": "mmBps",
    "type": "uint16",
    "indexed": false,
    "internalType": "uint16"
   }
  ],
  "anonymous": false
 },
 {
  "name": "Liquidate",
  "type": "event",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "indexed": true,
    "internalType": "uint256"
   },
   {
    "name": "liquidator",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "seized",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "mark",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "MaturityExtended",
  "type": "event",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "indexed": true,
    "internalType": "uint256"
   },
   {
    "name": "maturity",
    "type": "uint64",
    "indexed": false,
    "internalType": "uint64"
   }
  ],
  "anonymous": false
 },
 {
  "name": "OracleSet",
  "type": "event",
  "inputs": [
   {
    "name": "oracle",
    "type": "address",
    "indexed": false,
    "internalType": "address"
   }
  ],
  "anonymous": false
 },
 {
  "name": "OwnershipTransferStarted",
  "type": "event",
  "inputs": [
   {
    "name": "previousOwner",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "newOwner",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   }
  ],
  "anonymous": false
 },
 {
  "name": "OwnershipTransferred",
  "type": "event",
  "inputs": [
   {
    "name": "previousOwner",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "newOwner",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   }
  ],
  "anonymous": false
 },
 {
  "name": "ParamsSet",
  "type": "event",
  "inputs": [
   {
    "name": "p",
    "type": "tuple",
    "indexed": false,
    "components": [
     {
      "name": "imOpenBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "imClosedBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "mmBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "alphaBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "baseRateBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "closedRateBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "liqBonusBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "buyInBonusBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "protocolBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "maxBuyInSlipBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "slipGrowthBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "slipCapBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "termOpen",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "termClosed",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "reopenGrace",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "borrowCap",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "minBorrow",
      "type": "uint128",
      "internalType": "uint128"
     }
    ],
    "internalType": "struct StockLend.Params"
   }
  ],
  "anonymous": false
 },
 {
  "name": "Paused",
  "type": "event",
  "inputs": [
   {
    "name": "account",
    "type": "address",
    "indexed": false,
    "internalType": "address"
   }
  ],
  "anonymous": false
 },
 {
  "name": "Repay",
  "type": "event",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "indexed": true,
    "internalType": "uint256"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "timeFee",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "Unpaused",
  "type": "event",
  "inputs": [
   {
    "name": "account",
    "type": "address",
    "indexed": false,
    "internalType": "address"
   }
  ],
  "anonymous": false
 },
 {
  "name": "Withdraw",
  "type": "event",
  "inputs": [
   {
    "name": "lender",
    "type": "address",
    "indexed": true,
    "internalType": "address"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "shares",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "WriteOff",
  "type": "event",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "indexed": true,
    "internalType": "uint256"
   },
   {
    "name": "amount",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   },
   {
    "name": "residue",
    "type": "uint256",
    "indexed": false,
    "internalType": "uint256"
   }
  ],
  "anonymous": false
 },
 {
  "name": "FEE_STREAM",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "MATURITY_GRACE",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "MAX_HAIRCUT_BPS",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint16",
    "internalType": "uint16"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "accFeePerShare",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "acceptOwnership",
  "type": "function",
  "inputs": [],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "accruedFee",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "addCollateral",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "assetsOf",
  "type": "function",
  "inputs": [
   {
    "name": "a",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "borrow",
  "type": "function",
  "inputs": [
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "coll",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "maxFeeOpen",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "name": "buyIn",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "maxIn",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "buyInSlipBps",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "claimCollateral",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "out",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "name": "claimFees",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "out",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "name": "collFor",
  "type": "function",
  "inputs": [
   {
    "name": "usdgAmount",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "collPx",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "collValue",
  "type": "function",
  "inputs": [
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "collateral",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "contract IERC20"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "collateralFeed",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "contract IAggregatorV3"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "collateralOwed",
  "type": "function",
  "inputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "collateralPaused",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "bool",
    "internalType": "bool"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "collateralPoolFee",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint24",
    "internalType": "uint24"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "collateralScale",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "collectProtocolFees",
  "type": "function",
  "inputs": [
   {
    "name": "to",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "debtUsdg",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "deposit",
  "type": "function",
  "inputs": [
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "minted",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "name": "extendMaturity",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "maturity",
    "type": "uint64",
    "internalType": "uint64"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "feeDebt",
  "type": "function",
  "inputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "feesOwed",
  "type": "function",
  "inputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "flashFee",
  "type": "function",
  "inputs": [
   {
    "name": "token",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "flashFeeBps",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint16",
    "internalType": "uint16"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "flashLoan",
  "type": "function",
  "inputs": [
   {
    "name": "receiver",
    "type": "address",
    "internalType": "contract IERC3156FlashBorrower"
   },
   {
    "name": "token",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "data",
    "type": "bytes",
    "internalType": "bytes"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "bool",
    "internalType": "bool"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "name": "getParams",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "tuple",
    "components": [
     {
      "name": "imOpenBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "imClosedBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "mmBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "alphaBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "baseRateBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "closedRateBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "liqBonusBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "buyInBonusBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "protocolBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "maxBuyInSlipBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "slipGrowthBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "slipCapBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "termOpen",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "termClosed",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "reopenGrace",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "borrowCap",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "minBorrow",
      "type": "uint128",
      "internalType": "uint128"
     }
    ],
    "internalType": "struct StockLend.Params"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "haircutBps",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint16",
    "internalType": "uint16"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "healthBps",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "idle",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "lastCollPx",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "lentOut",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "liquidatable",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "bool",
    "internalType": "bool"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "liquidate",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "loan",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "tuple",
    "components": [
     {
      "name": "borrower",
      "type": "address",
      "internalType": "address"
     },
     {
      "name": "amount",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "collateral",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "notional",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "openedAt",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "maturity",
      "type": "uint64",
      "internalType": "uint64"
     },
     {
      "name": "rateBps",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "mmBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "liqBonusBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "bandBps",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "haircutBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "mmHaircutBps",
      "type": "uint16",
      "internalType": "uint16"
     }
    ],
    "internalType": "struct StockLend.Loan"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "loanMark",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "loans",
  "type": "function",
  "inputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "borrower",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "amount",
    "type": "uint128",
    "internalType": "uint128"
   },
   {
    "name": "collateral",
    "type": "uint128",
    "internalType": "uint128"
   },
   {
    "name": "notional",
    "type": "uint128",
    "internalType": "uint128"
   },
   {
    "name": "openedAt",
    "type": "uint64",
    "internalType": "uint64"
   },
   {
    "name": "maturity",
    "type": "uint64",
    "internalType": "uint64"
   },
   {
    "name": "rateBps",
    "type": "uint32",
    "internalType": "uint32"
   },
   {
    "name": "mmBps",
    "type": "uint16",
    "internalType": "uint16"
   },
   {
    "name": "liqBonusBps",
    "type": "uint16",
    "internalType": "uint16"
   },
   {
    "name": "bandBps",
    "type": "uint32",
    "internalType": "uint32"
   },
   {
    "name": "haircutBps",
    "type": "uint16",
    "internalType": "uint16"
   },
   {
    "name": "mmHaircutBps",
    "type": "uint16",
    "internalType": "uint16"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "matured",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "bool",
    "internalType": "bool"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "maxFlashLoan",
  "type": "function",
  "inputs": [
   {
    "name": "token",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "mmHaircutBps",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint16",
    "internalType": "uint16"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "nextLoanId",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "oracle",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "contract TwoPriceOracle"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "owner",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "pause",
  "type": "function",
  "inputs": [],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "paused",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "bool",
    "internalType": "bool"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "pendingFees",
  "type": "function",
  "inputs": [
   {
    "name": "a",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "pendingOwner",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "poolFee",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint24",
    "internalType": "uint24"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "protocolFees",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "quote",
  "type": "function",
  "inputs": [
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "requiredCollateral",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "feeOpen",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "premiumBps_",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "closed_",
    "type": "bool",
    "internalType": "bool"
   },
   {
    "name": "maturity",
    "type": "uint64",
    "internalType": "uint64"
   },
   {
    "name": "rateBps",
    "type": "uint32",
    "internalType": "uint32"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "removeCollateral",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "renounceOwnership",
  "type": "function",
  "inputs": [],
  "outputs": [],
  "stateMutability": "view"
 },
 {
  "name": "repay",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "router",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "contract ISwapRouter02"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "setCollateralFeed",
  "type": "function",
  "inputs": [
   {
    "name": "f",
    "type": "address",
    "internalType": "address"
   },
   {
    "name": "acceptRepricing",
    "type": "bool",
    "internalType": "bool"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "setFlashFee",
  "type": "function",
  "inputs": [
   {
    "name": "bps",
    "type": "uint16",
    "internalType": "uint16"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "setHaircut",
  "type": "function",
  "inputs": [
   {
    "name": "bps",
    "type": "uint16",
    "internalType": "uint16"
   },
   {
    "name": "mmBps_",
    "type": "uint16",
    "internalType": "uint16"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "setOracle",
  "type": "function",
  "inputs": [
   {
    "name": "o",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "setParams",
  "type": "function",
  "inputs": [
   {
    "name": "p",
    "type": "tuple",
    "components": [
     {
      "name": "imOpenBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "imClosedBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "mmBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "alphaBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "baseRateBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "closedRateBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "liqBonusBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "buyInBonusBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "protocolBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "maxBuyInSlipBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "slipGrowthBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "slipCapBps",
      "type": "uint16",
      "internalType": "uint16"
     },
     {
      "name": "termOpen",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "termClosed",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "reopenGrace",
      "type": "uint32",
      "internalType": "uint32"
     },
     {
      "name": "borrowCap",
      "type": "uint128",
      "internalType": "uint128"
     },
     {
      "name": "minBorrow",
      "type": "uint128",
      "internalType": "uint128"
     }
    ],
    "internalType": "struct StockLend.Params"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "shares",
  "type": "function",
  "inputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "stock",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "contract IERC20"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "streamEnd",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "streamLast",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "streamRateX18",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "termPrice",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "totalAssets",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "totalShares",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "transferOwnership",
  "type": "function",
  "inputs": [
   {
    "name": "newOwner",
    "type": "address",
    "internalType": "address"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "unpause",
  "type": "function",
  "inputs": [],
  "outputs": [],
  "stateMutability": "nonpayable"
 },
 {
  "name": "unstreamedFees",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "usdg",
  "type": "function",
  "inputs": [],
  "outputs": [
   {
    "name": "",
    "type": "address",
    "internalType": "contract IERC20"
   }
  ],
  "stateMutability": "view"
 },
 {
  "name": "value",
  "type": "function",
  "inputs": [
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   },
   {
    "name": "px",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "pure"
 },
 {
  "name": "withdraw",
  "type": "function",
  "inputs": [
   {
    "name": "burn",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [
   {
    "name": "amount",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "stateMutability": "nonpayable"
 },
 {
  "name": "writeOff",
  "type": "function",
  "inputs": [
   {
    "name": "id",
    "type": "uint256",
    "internalType": "uint256"
   }
  ],
  "outputs": [],
  "stateMutability": "nonpayable"
 }
]
