Discover more of SonicScan Block Explorer's tools and services in one place.
Contract Source Code:
File 1 of 3 : AnglesLiquidVaultRateProvider.sol
// SPDX-License-Identifier: MIT pragma solidity >0.8.0; import {IRateProvider} from "../IRateProvider.sol"; import {IERC4626RateProvider} from "./IERC4626RateProvider.sol"; contract AnglesLiquidVaultRateProvider is IRateProvider { error RateProvider__InvalidParam(); uint256 immutable PRECISION = 1e18; address immutable WRAPPED_ANGLES_S = 0xfA85Fe5A8F5560e9039C04f2b0a90dE1415aBD70; address immutable WRAPPED_S = 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38; address immutable WRAPPED_ANGLES_S_RATE_PROVIDER = 0x2d087C0999223997b77cc33BE5E7E8eC79396cea; /// @dev hardcode price of WRAPPED_S to PRECISION function rate(address token) external view returns (uint256) { if (token == WRAPPED_S) { return PRECISION; } else if (token == WRAPPED_ANGLES_S) { return IERC4626RateProvider(WRAPPED_ANGLES_S_RATE_PROVIDER).getRate(); } else { revert RateProvider__InvalidParam(); } } }
File 2 of 3 : IRateProvider.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IRateProvider { function rate(address token) external view returns (uint256); } /// @dev returns (rate, quote token decimals) interface IRateProviderV2 { function rate(address token) external view returns (uint256, uint8); }
File 3 of 3 : IERC4626RateProvider.sol
// SPDX-License-Identifier: MIT pragma solidity >0.8.0; interface IERC4626RateProvider { function getRate() external view returns (uint256); }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.