Address Contract Verified
Address
0x72D07D7DcA67b8A406aD1Ec34ce969c90bFEE768
Balance
0 ETH
Nonce
1
Code Size
377 bytes
Creator
0x3d64fb8a...99cC at tx 0xafc4be6d...9e2dba
Indexed Transactions
0
Contract Bytecode
377 bytes
0x608060405234801561001057600080fd5b50600436106100365760003560e01c80634aa07e641461003b578063679aefce1461006c575b600080fd5b610043610086565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100746100aa565b60408051918252519081900360200190f35b7f0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca081565b60007f0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca073ffffffffffffffffffffffffffffffffffffffff1663035faf826040518163ffffffff1660e01b815260040160206040518083038186803b15801561011257600080fd5b505afa158015610126573d6000803e3d6000fd5b505050506040513d602081101561013c57600080fd5b505190509056fea2646970667358221220ea76cab9de832dbe7dd8e95e2f7455ec90d1a6e7f91a1e03ec840a8393d33dbc64736f6c63430007010033
Verified Source Code Full Match
Compiler: v0.7.1+commit.f4a555be
EVM: istanbul
Optimization: Yes (9999 runs)
WstETHRateProvider.sol 37 lines
// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity ^0.7.0;
import "./interfaces/IRateProvider.sol";
import "./interfaces/IwstETH.sol";
/**
* @title Wrapped stETH Rate Provider
* @notice Returns the value of wstETH in terms of stETH
*/
contract WstETHRateProvider is IRateProvider {
IwstETH public immutable wstETH;
constructor(IwstETH _wstETH) {
wstETH = _wstETH;
}
/**
* @return the value of wstETH in terms of stETH
*/
function getRate() external view override returns (uint256) {
return wstETH.stEthPerToken();
}
}
IwstETH.sol 30 lines
// SPDX-FileCopyrightText: 2021 Lido <[email protected]> // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.1; /** * @title StETH token wrapper with static balances. * @dev It's an ERC20 token that represents the account's share of the total * supply of stETH tokens. WstETH token's balance only changes on transfers, * unlike StETH that is also changed when oracles report staking rewards and * penalties. It's a "power user" token for DeFi protocols which don't * support rebasable tokens. * * The contract is also a trustless wrapper that accepts stETH tokens and mints * wstETH in return. Then the user unwraps, the contract burns user's wstETH * and sends user locked stETH in return. * * The contract provides the staking shortcut: user can send ETH with regular * transfer and get wstETH in return. The contract will send ETH to Lido submit * method, staking it and wrapping the received stETH. * */ interface IwstETH { /** * @notice Get amount of wstETH for a one stETH * @return Amount of stETH for 1 wstETH */ function stEthPerToken() external view returns (uint256); }
IRateProvider.sol 20 lines
// SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity ^0.7.0;
// TODO: pull this from the monorepo
interface IRateProvider {
function getRate() external view returns (uint256);
}
Read Contract
getRate 0x679aefce → uint256
wstETH 0x4aa07e64 → address
Recent Transactions
No transactions found for this address