{
    "Function": "getRSETHPrice",
    "File": "src/LRTOracle.sol",
    "Parent Contracts": [
        "lib/openzeppelin-contracts-upgradeable/contracts/security/PausableUpgradeable.sol",
        "lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol",
        "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol",
        "src/utils/LRTConfigRoleChecker.sol",
        "src/interfaces/ILRTOracle.sol"
    ],
    "High-Level Calls": [
        "IRSETH",
        "ILRTDepositPool",
        "ILRTConfig",
        "ILRTConfig",
        "ILRTConfig"
    ],
    "Internal Calls": [
        "getAssetPrice"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function getRSETHPrice() external view returns (uint256 rsETHPrice) {\n        address rsETHTokenAddress = lrtConfig.rsETH();\n        uint256 rsEthSupply = IRSETH(rsETHTokenAddress).totalSupply();\n\n        if (rsEthSupply == 0) {\n            return 1 ether;\n        }\n\n        uint256 totalETHInPool;\n        address lrtDepositPoolAddr = lrtConfig.getContract(LRTConstants.LRT_DEPOSIT_POOL);\n\n        address[] memory supportedAssets = lrtConfig.getSupportedAssetList();\n        uint256 supportedAssetCount = supportedAssets.length;\n\n        for (uint16 asset_idx; asset_idx < supportedAssetCount;) {\n            address asset = supportedAssets[asset_idx];\n            uint256 assetER = getAssetPrice(asset);\n\n            uint256 totalAssetAmt = ILRTDepositPool(lrtDepositPoolAddr).getTotalAssetDeposits(asset);\n            totalETHInPool += totalAssetAmt * assetER;\n\n            unchecked {\n                ++asset_idx;\n            }\n        }\n\n        return totalETHInPool / rsEthSupply;\n    }"
}