{
    "Function": "distributeBonusTokenRewards",
    "File": "contracts/rubiconPools/BathToken.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "IBathBuddy"
    ],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function distributeBonusTokenRewards(\n        address receiver,\n        uint256 sharesWithdrawn,\n        uint256 initialTotalSupply\n    ) internal {\n        if (bonusTokens.length > 0) {\n            for (uint256 index = 0; index < bonusTokens.length; index++) {\n                IERC20 token = IERC20(bonusTokens[index]);\n                // Note: Shares already burned in Bath Token _withdraw\n\n                // Pair each bonus token with a lightly adapted OZ Vesting wallet. Each time a user withdraws, they\n                //  are released their relative share of this pool, of vested BathBuddy rewards\n                // The BathBuddy pool should accrue ERC-20 rewards just like OZ VestingWallet and simply just release the withdrawer's relative share of releaseable() tokens\n                if (rewardsVestingWallet != IBathBuddy(0)) {\n                    rewardsVestingWallet.release(\n                        (token),\n                        receiver,\n                        sharesWithdrawn,\n                        initialTotalSupply,\n                        feeBPS\n                    );\n                }\n            }\n        }\n    }"
}