{
    "Function": "_stakedTotal",
    "File": "contracts/RewardDistribution.sol",
    "Parent Contracts": [
        "contracts/external/Ownable.sol"
    ],
    "High-Level Calls": [
        "ILendingPair",
        "IERC20",
        "ILendingPair",
        "ILendingPair",
        "IERC20"
    ],
    "Internal Calls": [
        "_feeRecipient"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _stakedTotal(Pool memory _pool) internal view returns(uint) {\n    ILendingPair pair = ILendingPair(_pool.pair);\n    uint feeRecipientBalance = pair.lpToken(_pool.token).balanceOf(_feeRecipient());\n\n    if (_pool.isSupply) {\n      // stake of feeRecipient should not be included in the reward pool\n      return pair.lpToken(_pool.token).totalSupply() - feeRecipientBalance;\n    } else {\n      // feeRecipient will never have any debt\n      return pair.totalDebt(_pool.token);\n    }\n  }"
}