{
    "Function": "realise",
    "File": "contracts/Synth.sol",
    "Parent Contracts": [
        "contracts/interfaces/iBEP20.sol"
    ],
    "High-Level Calls": [
        "iDAO",
        "Pool",
        "iUTILS",
        "iUTILS",
        "iUTILS",
        "iDAO",
        "iDAO"
    ],
    "Internal Calls": [
        "_DAO",
        "_DAO",
        "_DAO"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function realise(address pool) external {\n        uint baseValueLP = iUTILS(_DAO().UTILS()).calcLiquidityHoldings(mapSynth_LPBalance[pool], BASE, pool); // Get the SPARTA value of the LP tokens\n        uint baseValueSynth = iUTILS(_DAO().UTILS()).calcActualSynthUnits(mapSynth_LPDebt[pool], address(this)); // Get the SPARTA value of the synths\n        if(baseValueLP > baseValueSynth){\n            uint premium = baseValueLP - baseValueSynth; // Get the premium between the two values\n            if(premium > 10**18){\n                uint premiumLP = iUTILS(_DAO().UTILS()).calcLiquidityUnitsAsym(premium, pool); // Get the LP value of the premium\n                mapSynth_LPBalance[pool] -= premiumLP; // Reduce the LP balance\n                Pool(pool).burn(premiumLP); // Burn the premium of the LP tokens\n            }\n        }\n    }"
}