{
    "Function": "getRewardAmount",
    "File": "contracts/hyphen/LiquidityPool.sol",
    "Parent Contracts": [
        "contracts/hyphen/metatx/ERC2771ContextUpgradeable.sol",
        "node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol",
        "contracts/security/Pausable.sol",
        "node_modules/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol",
        "node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol",
        "node_modules/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol",
        "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"
    ],
    "High-Level Calls": [
        "ILiquidityProviders"
    ],
    "Internal Calls": [
        "getCurrentLiquidity"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function getRewardAmount(uint256 amount, address tokenAddress) public view returns (uint256 rewardAmount) {\n        uint256 currentLiquidity = getCurrentLiquidity(tokenAddress);\n        uint256 providedLiquidity = liquidityProviders.getSuppliedLiquidityByToken(tokenAddress);\n        if (currentLiquidity < providedLiquidity) {\n            uint256 liquidityDifference = providedLiquidity - currentLiquidity;\n            if (amount >= liquidityDifference) {\n                rewardAmount = incentivePool[tokenAddress];\n            } else {\n                // Multiply by 10000000000 to avoid 0 reward amount for small amount and liquidity difference\n                rewardAmount = (amount * incentivePool[tokenAddress] * 10000000000) / liquidityDifference;\n                rewardAmount = rewardAmount / 10000000000;\n            }\n        }\n    }"
}