{
    "Function": "_updateFor",
    "File": "contracts/contracts/Pair.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _updateFor(address recipient) internal {\n        uint _supplied = balanceOf[recipient]; // get LP balance of `recipient`\n        if (_supplied > 0) {\n            uint _supplyIndex0 = supplyIndex0[recipient]; // get last adjusted index0 for recipient\n            uint _supplyIndex1 = supplyIndex1[recipient];\n            uint _index0 = index0; // get global index0 for accumulated fees\n            uint _index1 = index1;\n            supplyIndex0[recipient] = _index0; // update user current position to global position\n            supplyIndex1[recipient] = _index1;\n            uint _delta0 = _index0 - _supplyIndex0; // see if there is any difference that need to be accrued\n            uint _delta1 = _index1 - _supplyIndex1;\n            if (_delta0 > 0) {\n                uint _share = _supplied * _delta0 / 1e18; // add accrued difference for each supplied token\n                claimable0[recipient] += _share;\n            }\n            if (_delta1 > 0) {\n                uint _share = _supplied * _delta1 / 1e18;\n                claimable1[recipient] += _share;\n            }\n        } else {\n            supplyIndex0[recipient] = index0; // new users are set to the default global state\n            supplyIndex1[recipient] = index1;\n        }\n    }"
}