{
    "Function": "burnSynth",
    "File": "contracts/Synth.sol",
    "Parent Contracts": [
        "contracts/interfaces/iBEP20.sol"
    ],
    "High-Level Calls": [
        "Pool"
    ],
    "Internal Calls": [
        "balanceOf",
        "_burn"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function burnSynth() external returns (bool){\n        uint _syntheticAmount = balanceOf(address(this)); // Get the received synth units\n        uint _amountUnits = (_syntheticAmount * mapSynth_LPBalance[msg.sender]) / mapSynth_LPDebt[msg.sender]; // share = amount * part/total\n        mapSynth_LPBalance[msg.sender] -= _amountUnits; // Reduce lp balance\n        mapSynth_LPDebt[msg.sender] -= _syntheticAmount; // Reduce debt by synths being burnt\n        if(_amountUnits > 0){\n            _burn(address(this), _syntheticAmount); // Burn the synths\n            Pool(msg.sender).burn(_amountUnits); // Burn the LP tokens\n        }\n        return true;\n    }"
}