{
    "Function": "_find_timestamp_epoch",
    "File": "contracts/contracts/RewardsDistributor.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "IVotingEscrow",
        "IVotingEscrow"
    ],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _find_timestamp_epoch(address ve, uint _timestamp) internal view returns (uint) {\n        uint _min = 0;\n        uint _max = IVotingEscrow(ve).epoch();\n        for (uint i = 0; i < 128; i++) {\n            if (_min >= _max) break;\n            uint _mid = (_min + _max + 2) / 2;\n            IVotingEscrow.Point memory pt = IVotingEscrow(ve).point_history(_mid);\n            if (pt.ts <= _timestamp) {\n                _min = _mid;\n            } else {\n                _max = _mid - 1;\n            }\n        }\n        return _min;\n    }"
}