creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "AjnaPoker/src/AjnaPoker.sol": {
        "content": "// SPDX-License-Identifier: MIT\nimport {IPool} from \"./interfaces/IPool.sol\";\nimport {IPoolLenderActions} from \"./interfaces/IPoolLenderActions.sol\";\nimport {IOpsProxy} from \"./interfaces/IOpsProxy.sol\";\n\npragma solidity 0.8.23;\n\ncontract AjnaPoker {\n    /// @notice internal function of checker\n    /// @param _pool Address of pool, this is unchecked by contract!\n    /// @return canExec tell Gelato to execute or not\n    /// @return data calldata to execute\n    function _checker(address _pool) internal returns (bool canExec, bytes memory data) {\n        IPool pool = IPool(_pool);\n        (uint256 debt_,,,) = pool.debtInfo();\n        if (debt_ == 0) {\n            return (false, \"unused pool\");\n        }\n        (uint256 interestRateBefore ,uint256 interestRateTimestamp) = pool.interestRateInfo();\n        if (block.timestamp > interestRateTimestamp + 12 hours) {\n            pool.updateInterest();\n            (uint256 interestRateAfter,) = pool.interestRateInfo();\n            if(interestRateBefore != interestRateAfter) {\n                return (true, abi.encodeCall(pool.updateInterest, ()));\n            }\n            else {\n                return (false, \"no change in interest rate\");\n            }\n        } else {\n            return (false, \"Pool is poked <12 hours ago\");\n        }\n    }\n\n    /// @notice check pool to see if it's more than 12 hours since last poke\n    /// @dev the contract doesn't check to see if it's valid pool, at worst it gonna drain your gelato balance\n    /// @param _pool Address of pool, this is unchecked by contract!\n    /// @return canExec tell Gelato to execute or not\n    /// @return data calldata to execute\n    function checker(address _pool) public returns (bool canExec, bytes memory data) {\n        (canExec, data) = _checker(_pool);\n    }\n\n    /// @notice check pool to see if it's more than 12 hours since last poke\n    /// @dev the contract doesn't check to see if it's valid pool, at worst it gonna drain your gelato balance\n    /// @param _pool Address of pool, this is unchecked by contract!\n    /// @param _txPrice gas price threshold\n    /// @return canExec tell Gelato to execute or not\n    /// @return data calldata to execute\n    function checkerWithTxPrice(address _pool, uint256 _txPrice)\n        public\n        returns (bool canExec, bytes memory data)\n    {\n        if (tx.gasprice > _txPrice) {\n            return (false, \"gas too high\");\n        }\n        (canExec, data) = _checker(_pool);\n    }\n\n    /// @notice internal function of checkers with array of pools\n    /// @param _pools an array of pools address\n    /// @return canExec tell gelato to execute\n    /// @return data calldata to execute (batchExecuteCall(address[],bytes[] memory,uint256[]))\n    function _checker(address[] memory _pools) internal returns (bool canExec, bytes memory data) {\n        uint256 length = _pools.length;\n        uint256 counts = 0;\n        address[] memory targets = new address[](length);\n        for (uint256 i = 0; i < length; i++) {\n            address pool = _pools[i];\n            (uint256 debt_,,,) = IPool(pool).debtInfo();\n            if (debt_ == 0) {\n                continue;\n            }\n            (uint256 interestRateBefore ,uint256 interestRateTimestamp) = IPool(pool).interestRateInfo();\n            if (block.timestamp > interestRateTimestamp + 12 hours) {\n                IPool(pool).updateInterest();\n                (uint256 interestRateAfter,) = IPool(pool).interestRateInfo();\n                if(interestRateBefore != interestRateAfter) {\n                    targets[counts] = _pools[i];\n                    counts += 1;\n                }\n                else {\n                    continue;\n                }\n            }\n            else {\n                continue;\n            }\n        }\n        if (counts == 0) {\n            return (false, \"no pools need to poke\");\n        }\n        assembly {\n            mstore(targets, counts)\n        }\n        uint256[] memory values = new uint256[](counts);\n        bytes[] memory payloads = new bytes[](counts);\n        for (uint256 i = 0; i < counts; i++) {\n            // values[i] = 0;\n            payloads[i] = abi.encodeCall(IPoolLenderActions.updateInterest, ());\n        }\n        canExec = true;\n        data = abi.encodeCall(IOpsProxy.batchExecuteCall, (targets, payloads, values));\n    }\n\n    /// @notice external function of checkers with array of pools\n    /// @param _pools an array of pools address\n    /// @return canExec tell gelato to execute\n    /// @return data calldata to execute (batchExecuteCall(address[],bytes[] memory,uint256[]))\n    function checker(address[] calldata _pools) external returns (bool canExec, bytes memory data) {\n        (canExec, data) = _checker(_pools);\n    }\n\n    /// @notice external function of checkers with array of pools\n    /// @param _pools an array of pools address\n    /// @param _txPrice gas price threshold\n    /// @return canExec tell gelato to execute\n    /// @return data calldata to execute (batchExecuteCall(address[],bytes[] memory,uint256[]))\n    function checkerWithTxPrice(address[] calldata _pools, uint256 _txPrice)\n        external\n        returns (bool canExec, bytes memory data)\n    {\n        if (tx.gasprice > _txPrice) {\n            return (false, \"gas too high\");\n        }\n        (canExec, data) = _checker(_pools);\n    }\n}\n"
      },
      "AjnaPoker/src/interfaces/IOpsProxy.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.23;\n\ninterface IOpsProxy {\n    function batchExecuteCall(address[] calldata targets, bytes[] calldata datas, uint256[] calldata values)\n        external\n        payable;\n}\n"
      },
      "AjnaPoker/src/interfaces/IPoolLenderActions.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.18;\n\n/**\n * @title Pool Lender Actions\n */\ninterface IPoolLenderActions {\n    /**\n     *\n     */\n    /**\n     * Quote/collateral management functions **\n     */\n    /**\n     *\n     */\n\n    /**\n     *  @notice Called by lenders to add an amount of credit at a specified price bucket.\n     *  @param  amount_           The amount of quote token to be added by a lender (`WAD` precision).\n     *  @param  index_            The index of the bucket to which the quote tokens will be added.\n     *  @param  expiry_           Timestamp after which this transaction will revert, preventing inclusion in a block with unfavorable price.\n     *  @return bucketLP_         The amount of `LP` changed for the added quote tokens (`WAD` precision).\n     *  @return addedAmount_      The amount of quote token added (`WAD` precision).\n     */\n    function addQuoteToken(uint256 amount_, uint256 index_, uint256 expiry_)\n        external\n        returns (uint256 bucketLP_, uint256 addedAmount_);\n\n    /**\n     *  @notice Called by lenders to move an amount of credit from a specified price bucket to another specified price bucket.\n     *  @param  maxAmount_        The maximum amount of quote token to be moved by a lender (`WAD` precision).\n     *  @param  fromIndex_        The bucket index from which the quote tokens will be removed.\n     *  @param  toIndex_          The bucket index to which the quote tokens will be added.\n     *  @param  expiry_           Timestamp after which this transaction will revert, preventing inclusion in a block with unfavorable price.\n     *  @return fromBucketLP_     The amount of `LP` moved out from bucket (`WAD` precision).\n     *  @return toBucketLP_       The amount of `LP` moved to destination bucket (`WAD` precision).\n     *  @return movedAmount_      The amount of quote token moved (`WAD` precision).\n     */\n    function moveQuoteToken(uint256 maxAmount_, uint256 fromIndex_, uint256 toIndex_, uint256 expiry_)\n        external\n        returns (uint256 fromBucketLP_, uint256 toBucketLP_, uint256 movedAmount_);\n\n    /**\n     *  @notice Called by lenders to claim collateral from a price bucket.\n     *  @param  maxAmount_     The amount of collateral (`WAD` precision for `ERC20` pools, number of `NFT` tokens for `ERC721` pools) to claim.\n     *  @param  index_         The bucket index from which collateral will be removed.\n     *  @return removedAmount_ The amount of collateral removed (`WAD` precision).\n     *  @return redeemedLP_    The amount of `LP` used for removing collateral amount (`WAD` precision).\n     */\n    function removeCollateral(uint256 maxAmount_, uint256 index_)\n        external\n        returns (uint256 removedAmount_, uint256 redeemedLP_);\n\n    /**\n     *  @notice Called by lenders to remove an amount of credit at a specified price bucket.\n     *  @param  maxAmount_     The max amount of quote token to be removed by a lender (`WAD` precision).\n     *  @param  index_         The bucket index from which quote tokens will be removed.\n     *  @return removedAmount_ The amount of quote token removed (`WAD` precision).\n     *  @return redeemedLP_    The amount of `LP` used for removing quote tokens amount (`WAD` precision).\n     */\n    function removeQuoteToken(uint256 maxAmount_, uint256 index_)\n        external\n        returns (uint256 removedAmount_, uint256 redeemedLP_);\n\n    /**\n     *\n     */\n    /**\n     * Interest update function **\n     */\n    /**\n     *\n     */\n\n    /**\n     *  @notice Called by actors to update pool interest rate (can be updated only once in a `12` hours period of time).\n     */\n    function updateInterest() external;\n}\n"
      },
      "AjnaPoker/src/interfaces/IPool.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity =0.8.23;\n\nimport {IPoolLenderActions} from \"./IPoolLenderActions.sol\";\nimport {IPoolState} from \"./IPoolState.sol\";\n\ninterface IPool is IPoolLenderActions, IPoolState {}\n"
      },
      "AjnaPoker/src/interfaces/IPoolState.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.18;\n\n/**\n * @title Pool State\n */\ninterface IPoolState {\n    /**\n     *  @notice Returns details of an auction for a given borrower address.\n     *  @param  borrower_         Address of the borrower that is liquidated.\n     *  @return kicker_           Address of the kicker that is kicking the auction.\n     *  @return bondFactor_       The factor used for calculating bond size.\n     *  @return bondSize_         The bond amount in quote token terms.\n     *  @return kickTime_         Time the liquidation was initiated.\n     *  @return referencePrice_   Price used to determine auction start price.\n     *  @return neutralPrice_     `Neutral Price` of auction.\n     *  @return debtToCollateral_ Borrower debt to collateral, which is used in BPF for kicker's reward calculation.\n     *  @return head_             Address of the head auction.\n     *  @return next_             Address of the next auction in queue.\n     *  @return prev_             Address of the prev auction in queue.\n     */\n    function auctionInfo(address borrower_)\n        external\n        view\n        returns (\n            address kicker_,\n            uint256 bondFactor_,\n            uint256 bondSize_,\n            uint256 kickTime_,\n            uint256 referencePrice_,\n            uint256 neutralPrice_,\n            uint256 debtToCollateral_,\n            address head_,\n            address next_,\n            address prev_\n        );\n\n    /**\n     *  @notice Returns pool related debt values.\n     *  @return debt_                Current amount of debt owed by borrowers in pool.\n     *  @return accruedDebt_         Debt owed by borrowers based on last inflator snapshot.\n     *  @return debtInAuction_       Total amount of debt in auction.\n     *  @return t0Debt2ToCollateral_ t0debt accross all borrowers divided by their collateral, used in determining a collateralization weighted debt.\n     */\n    function debtInfo()\n        external\n        view\n        returns (uint256 debt_, uint256 accruedDebt_, uint256 debtInAuction_, uint256 t0Debt2ToCollateral_);\n\n    /**\n     *  @notice Mapping of borrower addresses to `Borrower` structs.\n     *  @dev    NOTE: Cannot use appended underscore syntax for return params since struct is used.\n     *  @param  borrower_   Address of the borrower.\n     *  @return t0Debt_     Amount of debt borrower would have had if their loan was the first debt drawn from the pool.\n     *  @return collateral_ Amount of collateral that the borrower has deposited, in collateral token.\n     *  @return npTpRatio_  Np to Tp ratio of borrower at the time of last borrow or pull collateral.\n     */\n    function borrowerInfo(address borrower_)\n        external\n        view\n        returns (uint256 t0Debt_, uint256 collateral_, uint256 npTpRatio_);\n\n    /**\n     *  @notice Mapping of buckets indexes to `Bucket` structs.\n     *  @dev    NOTE: Cannot use appended underscore syntax for return params since struct is used.\n     *  @param  index_               Bucket index.\n     *  @return lpAccumulator_       Amount of `LP` accumulated in current bucket.\n     *  @return availableCollateral_ Amount of collateral available in current bucket.\n     *  @return bankruptcyTime_      Timestamp when bucket become insolvent, `0` if healthy.\n     *  @return bucketDeposit_       Amount of quote tokens in bucket.\n     *  @return bucketScale_         Bucket multiplier.\n     */\n    function bucketInfo(uint256 index_)\n        external\n        view\n        returns (\n            uint256 lpAccumulator_,\n            uint256 availableCollateral_,\n            uint256 bankruptcyTime_,\n            uint256 bucketDeposit_,\n            uint256 bucketScale_\n        );\n\n    /**\n     *  @notice Mapping of burnEventEpoch to `BurnEvent` structs.\n     *  @dev    Reserve auctions correspond to burn events.\n     *  @param  burnEventEpoch_  Id of the current reserve auction.\n     *  @return burnBlock_       Block in which a reserve auction started.\n     *  @return totalInterest_   Total interest as of the reserve auction.\n     *  @return totalBurned_     Total ajna tokens burned as of the reserve auction.\n     */\n    function burnInfo(uint256 burnEventEpoch_) external view returns (uint256, uint256, uint256);\n\n    /**\n     *  @notice Returns the latest `burnEventEpoch` of reserve auctions.\n     *  @dev    If a reserve auction is active, it refers to the current reserve auction. If no reserve auction is active, it refers to the last reserve auction.\n     *  @return Current `burnEventEpoch`.\n     */\n    function currentBurnEpoch() external view returns (uint256);\n\n    /**\n     *  @notice Returns information about the pool `EMA (Exponential Moving Average)` variables.\n     *  @return debtColEma_   Debt squared to collateral Exponential, numerator to `TU` calculation.\n     *  @return lupt0DebtEma_ Exponential of `LUP * t0 debt`, denominator to `TU` calculation\n     *  @return debtEma_      Exponential debt moving average.\n     *  @return depositEma_   sample of meaningful deposit Exponential, denominator to `MAU` calculation.\n     */\n    function emasInfo()\n        external\n        view\n        returns (uint256 debtColEma_, uint256 lupt0DebtEma_, uint256 debtEma_, uint256 depositEma_);\n\n    /**\n     *  @notice Returns information about pool inflator.\n     *  @return inflator_   Pool inflator value.\n     *  @return lastUpdate_ The timestamp of the last `inflator` update.\n     */\n    function inflatorInfo() external view returns (uint256 inflator_, uint256 lastUpdate_);\n\n    /**\n     *  @notice Returns information about pool interest rate.\n     *  @return interestRate_       Current interest rate in pool.\n     *  @return interestRateUpdate_ The timestamp of the last interest rate update.\n     */\n    function interestRateInfo() external view returns (uint256 interestRate_, uint256 interestRateUpdate_);\n\n    /**\n     *  @notice Returns details about kicker balances.\n     *  @param  kicker_    The address of the kicker to retrieved info for.\n     *  @return claimable_ Amount of quote token kicker can claim / withdraw from pool at any time.\n     *  @return locked_    Amount of quote token kicker locked in auctions (as bonds).\n     */\n    function kickerInfo(address kicker_) external view returns (uint256 claimable_, uint256 locked_);\n\n    /**\n     *  @notice Mapping of buckets indexes and owner addresses to `Lender` structs.\n     *  @param  index_       Bucket index.\n     *  @param  lender_      Address of the liquidity provider.\n     *  @return lpBalance_   Amount of `LP` owner has in current bucket.\n     *  @return depositTime_ Time the user last deposited quote token.\n     */\n    function lenderInfo(uint256 index_, address lender_)\n        external\n        view\n        returns (uint256 lpBalance_, uint256 depositTime_);\n\n    /**\n     *  @notice Return the `LP` allowance a `LP` owner provided to a spender.\n     *  @param  index_     Bucket index.\n     *  @param  spender_   Address of the `LP` spender.\n     *  @param  owner_     The initial owner of the `LP`.\n     *  @return allowance_ Amount of `LP` spender can utilize.\n     */\n    function lpAllowance(uint256 index_, address spender_, address owner_) external view returns (uint256 allowance_);\n\n    /**\n     *  @notice Returns information about a loan in the pool.\n     *  @param  loanId_             Loan's id within loan heap. Max loan is position `1`.\n     *  @return borrower_           Borrower address at the given position.\n     *  @return t0DebtToCollateral_ Borrower t0 debt to collateral.\n     */\n    function loanInfo(uint256 loanId_) external view returns (address borrower_, uint256 t0DebtToCollateral_);\n\n    /**\n     *  @notice Returns information about pool loans.\n     *  @return maxBorrower_           Borrower address with highest t0 debt to collateral.\n     *  @return maxT0DebtToCollateral_ Highest t0 debt to collateral in pool.\n     *  @return noOfLoans_             Total number of loans.\n     */\n    function loansInfo()\n        external\n        view\n        returns (address maxBorrower_, uint256 maxT0DebtToCollateral_, uint256 noOfLoans_);\n\n    /**\n     *  @notice Returns information about pool reserves.\n     *  @return liquidationBondEscrowed_ Amount of liquidation bond across all liquidators.\n     *  @return reserveAuctionUnclaimed_ Amount of claimable reserves which has not been taken in the `Claimable Reserve Auction`.\n     *  @return reserveAuctionKicked_    Time a `Claimable Reserve Auction` was last kicked.\n     *  @return lastKickedReserves_      Amount of reserves upon last kick, used to calculate price.\n     *  @return totalInterestEarned_     Total interest earned by all lenders in the pool\n     */\n    function reservesInfo()\n        external\n        view\n        returns (\n            uint256 liquidationBondEscrowed_,\n            uint256 reserveAuctionUnclaimed_,\n            uint256 reserveAuctionKicked_,\n            uint256 lastKickedReserves_,\n            uint256 totalInterestEarned_\n        );\n\n    /**\n     *  @notice Returns the `pledgedCollateral` state variable.\n     *  @return The total pledged collateral in the system, in WAD units.\n     */\n    function pledgedCollateral() external view returns (uint256);\n\n    /**\n     *  @notice Returns the total number of active auctions in pool.\n     *  @return totalAuctions_ Number of active auctions.\n     */\n    function totalAuctionsInPool() external view returns (uint256);\n\n    /**\n     *  @notice Returns the `t0Debt` state variable.\n     *  @dev    This value should be multiplied by inflator in order to calculate current debt of the pool.\n     *  @return The total `t0Debt` in the system, in `WAD` units.\n     */\n    function totalT0Debt() external view returns (uint256);\n\n    /**\n     *  @notice Returns the `t0DebtInAuction` state variable.\n     *  @dev    This value should be multiplied by inflator in order to calculate current debt in auction of the pool.\n     *  @return The total `t0DebtInAuction` in the system, in `WAD` units.\n     */\n    function totalT0DebtInAuction() external view returns (uint256);\n\n    /**\n     *  @notice Mapping of addresses that can transfer `LP` to a given lender.\n     *  @param  lender_     Lender that receives `LP`.\n     *  @param  transferor_ Transferor that transfers `LP`.\n     *  @return True if the transferor is approved by lender.\n     */\n    function approvedTransferors(address lender_, address transferor_) external view returns (bool);\n}\n\n/**\n *\n */\n/**\n * State Structs **\n */\n/**\n *\n */\n\n/**\n *\n */\n/**\n * Pool State **\n */\n/**\n *\n */\n\n/// @dev Struct holding inflator state.\nstruct InflatorState {\n    uint208 inflator; // [WAD] pool's inflator\n    uint48 inflatorUpdate; // [SEC] last time pool's inflator was updated\n}\n\n/// @dev Struct holding pool interest state.\nstruct InterestState {\n    uint208 interestRate; // [WAD] pool's interest rate\n    uint48 interestRateUpdate; // [SEC] last time pool's interest rate was updated (not before 12 hours passed)\n    uint256 debt; // [WAD] previous update's debt\n    uint256 meaningfulDeposit; // [WAD] previous update's meaningfulDeposit\n    uint256 t0Debt2ToCollateral; // [WAD] utilization weight accumulator, tracks debt and collateral relationship accross borrowers\n    uint256 debtCol; // [WAD] previous debt squared to collateral\n    uint256 lupt0Debt; // [WAD] previous LUP * t0 debt\n}\n\n/// @dev Struct holding pool EMAs state.\nstruct EmaState {\n    uint256 debtEma; // [WAD] sample of debt EMA, numerator to MAU calculation\n    uint256 depositEma; // [WAD] sample of meaningful deposit EMA, denominator to MAU calculation\n    uint256 debtColEma; // [WAD] debt squared to collateral EMA, numerator to TU calculation\n    uint256 lupt0DebtEma; // [WAD] EMA of LUP * t0 debt, denominator to TU calculation\n    uint256 emaUpdate; // [SEC] last time pool's EMAs were updated\n}\n\n/// @dev Struct holding pool balances state.\nstruct PoolBalancesState {\n    uint256 pledgedCollateral; // [WAD] total collateral pledged in pool\n    uint256 t0DebtInAuction; // [WAD] Total debt in auction used to restrict LPB holder from withdrawing\n    uint256 t0Debt; // [WAD] Pool debt as if the whole amount was incurred upon the first loan\n}\n\n/// @dev Struct holding pool params (in memory only).\nstruct PoolState {\n    uint8 poolType; // pool type, can be ERC20 or ERC721\n    uint256 t0Debt; // [WAD] t0 debt in pool\n    uint256 t0DebtInAuction; // [WAD] t0 debt in auction within pool\n    uint256 debt; // [WAD] total debt in pool, accrued in current block\n    uint256 collateral; // [WAD] total collateral pledged in pool\n    uint256 inflator; // [WAD] current pool inflator\n    bool isNewInterestAccrued; // true if new interest already accrued in current block\n    uint256 rate; // [WAD] pool's current interest rate\n    uint256 quoteTokenScale; // [WAD] quote token scale of the pool. Same as quote token dust.\n}\n\n/**\n *\n */\n/**\n * Buckets State **\n */\n/**\n *\n */\n\n/// @dev Struct holding lender state.\nstruct Lender {\n    uint256 lps; // [WAD] Lender LP accumulator\n    uint256 depositTime; // timestamp of last deposit\n}\n\n/// @dev Struct holding bucket state.\nstruct Bucket {\n    uint256 lps; // [WAD] Bucket LP accumulator\n    uint256 collateral; // [WAD] Available collateral tokens deposited in the bucket\n    uint256 bankruptcyTime; // Timestamp when bucket become insolvent, 0 if healthy\n    mapping(address => Lender) lenders; // lender address to Lender struct mapping\n}\n\n/**\n *\n */\n/**\n * Deposits State **\n */\n/**\n *\n */\n\n/// @dev Struct holding deposits (Fenwick) values and scaling.\nstruct DepositsState {\n    uint256[8193] values; // Array of values in the FenwickTree.\n    uint256[8193] scaling; // Array of values which scale (multiply) the FenwickTree accross indexes.\n}\n\n/**\n *\n */\n/**\n * Loans State **\n */\n/**\n *\n */\n\n/// @dev Struct holding loans state.\nstruct LoansState {\n    Loan[] loans;\n    mapping(address => uint256) indices; // borrower address => loan index mapping\n    mapping(address => Borrower) borrowers; // borrower address => Borrower struct mapping\n}\n\n/// @dev Struct holding loan state.\nstruct Loan {\n    address borrower; // borrower address\n    uint96 t0DebtToCollateral; // [WAD] Borrower t0 debt to collateral.\n}\n\n/// @dev Struct holding borrower state.\nstruct Borrower {\n    uint256 t0Debt; // [WAD] Borrower debt time-adjusted as if it was incurred upon first loan of pool.\n    uint256 collateral; // [WAD] Collateral deposited by borrower.\n    uint256 npTpRatio; // [WAD] Np to Tp ratio at the time of last borrow or pull collateral.\n}\n\n/**\n *\n */\n/**\n * Auctions State **\n */\n/**\n *\n */\n\n/// @dev Struct holding pool auctions state.\nstruct AuctionsState {\n    uint96 noOfAuctions; // total number of auctions in pool\n    address head; // first address in auction queue\n    address tail; // last address in auction queue\n    uint256 totalBondEscrowed; // [WAD] total amount of quote token posted as auction kick bonds\n    mapping(address => Liquidation) liquidations; // mapping of borrower address and auction details\n    mapping(address => Kicker) kickers; // mapping of kicker address and kicker balances\n}\n\n/// @dev Struct holding liquidation state.\nstruct Liquidation {\n    address kicker; // address that initiated liquidation\n    uint96 bondFactor; // [WAD] bond factor used to start liquidation\n    uint96 kickTime; // timestamp when liquidation was started\n    address prev; // previous liquidated borrower in auctions queue\n    uint96 referencePrice; // [WAD] used to calculate auction start price\n    address next; // next liquidated borrower in auctions queue\n    uint160 bondSize; // [WAD] liquidation bond size\n    uint96 neutralPrice; // [WAD] Neutral Price when liquidation was started\n    uint256 debtToCollateral; // [WAD] Borrower debt to collateral, which is used in BPF for kicker's reward calculation\n    uint256 t0ReserveSettleAmount; // [WAD] Amount of t0Debt that could be settled via reserves in this auction\n}\n\n/// @dev Struct holding kicker state.\nstruct Kicker {\n    uint256 claimable; // [WAD] kicker's claimable balance\n    uint256 locked; // [WAD] kicker's balance of tokens locked in auction bonds\n}\n\n/**\n *\n */\n/**\n * Reserve Auctions State **\n */\n/**\n *\n */\n\n/// @dev Struct holding reserve auction state.\nstruct ReserveAuctionState {\n    uint256 kicked; // Time a Claimable Reserve Auction was last kicked.\n    uint256 lastKickedReserves; // [WAD] Amount of reserves upon last kick, used to calculate price.\n    uint256 unclaimed; // [WAD] Amount of claimable reserves which has not been taken in the Claimable Reserve Auction.\n    uint256 latestBurnEventEpoch; // Latest burn event epoch.\n    uint256 totalAjnaBurned; // [WAD] Total ajna burned in the pool.\n    uint256 totalInterestEarned; // [WAD] Total interest earned by all lenders in the pool.\n    mapping(uint256 => BurnEvent) burnEvents; // Mapping burnEventEpoch => BurnEvent.\n}\n\n/// @dev Struct holding burn event state.\nstruct BurnEvent {\n    uint256 timestamp; // time at which the burn event occured\n    uint256 totalInterest; // [WAD] current pool interest accumulator `PoolCommons.accrueInterest().newInterest`\n    uint256 totalBurned; // [WAD] burn amount accumulator\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": false,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}