```\n    function getOracleData() external view override returns (OracleData memory oracleData) {\n// rest of code\n        (/* */, uint256 supplyCap) = IPoolDataProvider(POOL_DATA_PROVIDER).getReserveCaps(underlying);\n        // Supply caps are returned as whole token values\n        supplyCap = supplyCap * UNDERLYING_PRECISION;\n        uint256 aTokenSupply = IPoolDataProvider(POOL_DATA_PROVIDER).getATokenTotalSupply(underlying);\n\n        // If supply cap is zero, that means there is no cap on the pool\n        if (supplyCap == 0) {\n            oracleData.maxExternalDeposit = type(uint256).max;\n        } else if (supplyCap <= aTokenSupply) {\n            oracleData.maxExternalDeposit = 0;\n        } else {\n            // underflow checked as consequence of if / else statement\n          oracleData.maxExternalDeposit = supplyCap - aTokenSupply;\n        }\n```\n