{
    "Function": "_getPnlToBeRealized",
    "File": "contracts/AMM.sol",
    "Parent Contracts": [
        "contracts/legos/Governable.sol",
        "node_modules/@openzeppelin/contracts/proxy/utils/Initializable.sol",
        "contracts/legos/Governable.sol",
        "contracts/Interfaces.sol"
    ],
    "High-Level Calls": [
        "SafeCast",
        "SafeCast",
        "SafeCast",
        "SafeCast"
    ],
    "Internal Calls": [],
    "Library Calls": [
        "toInt256",
        "toInt256",
        "toInt256",
        "toInt256"
    ],
    "Low-Level Calls": [],
    "Code": "function _getPnlToBeRealized(int256 takerPosition, uint notionalPosition, uint openNotional) internal pure returns (int256 pnlToBeRealized) {\n        if (takerPosition > 0) {\n            pnlToBeRealized = notionalPosition.toInt256() - openNotional.toInt256();\n        } else {\n            pnlToBeRealized = openNotional.toInt256() - notionalPosition.toInt256();\n        }\n    }"
}