{
    "Function": "totalSupplyAtEpoch",
    "File": "contracts/VE3DLocker.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol",
        "node_modules/@openzeppelin/contracts/security/ReentrancyGuard.sol"
    ],
    "High-Level Calls": [
        "BoringMath",
        "BoringMath",
        "BoringMath",
        "BoringMath"
    ],
    "Internal Calls": [],
    "Library Calls": [
        "div",
        "mul",
        "add",
        "sub"
    ],
    "Low-Level Calls": [],
    "Code": "function totalSupplyAtEpoch(uint256 _epoch) external view returns (uint256 supply) {\n        uint256 epochStart = uint256(epochs[_epoch].date).div(rewardsDuration).mul(\n            rewardsDuration\n        );\n        uint256 cutoffEpoch = epochStart.sub(lockDuration);\n\n        //traverse inversely to make more current queries more gas efficient\n        for (uint256 i = _epoch; i + 1 != 0; i--) {\n            Epoch storage e = epochs[i];\n            if (uint256(e.date) <= cutoffEpoch) {\n                break;\n            }\n            supply = supply.add(epochs[i].supply);\n        }\n\n        return supply;\n    }"
}