{
    "Function": "burn",
    "File": "contracts/contracts/Pair.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "IERC20",
        "IERC20",
        "IERC20",
        "IERC20"
    ],
    "Internal Calls": [
        "lock",
        "require(bool,string)",
        "_update",
        "_safeTransfer",
        "_safeTransfer",
        "_burn"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function burn(address to) external lock returns (uint amount0, uint amount1) {\n        (uint _reserve0, uint _reserve1) = (reserve0, reserve1);\n        (address _token0, address _token1) = (token0, token1);\n        uint _balance0 = IERC20(_token0).balanceOf(address(this));\n        uint _balance1 = IERC20(_token1).balanceOf(address(this));\n        uint _liquidity = balanceOf[address(this)];\n\n        uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee\n        amount0 = _liquidity * _balance0 / _totalSupply; // using balances ensures pro-rata distribution\n        amount1 = _liquidity * _balance1 / _totalSupply; // using balances ensures pro-rata distribution\n        require(amount0 > 0 && amount1 > 0, 'ILB'); // Pair: INSUFFICIENT_LIQUIDITY_BURNED\n        _burn(address(this), _liquidity);\n        _safeTransfer(_token0, to, amount0);\n        _safeTransfer(_token1, to, amount1);\n        _balance0 = IERC20(_token0).balanceOf(address(this));\n        _balance1 = IERC20(_token1).balanceOf(address(this));\n\n        _update(_balance0, _balance1, _reserve0, _reserve1);\n        emit Burn(msg.sender, amount0, amount1, to);\n    }"
}