ETH Price: $2,410.95 (-1.97%)

Contract

0xd2C59781F1Db84080A0592CE83Fe265642A4a8Eb
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60a06040199322282024-05-23 11:16:59140 days ago1716463019IN
 Create: SyrupRateProvider
0 ETH0.001021086.99811094

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SyrupRateProvider

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, BSL 1.1 license
/**
 *Submitted for verification at Etherscan.io on 2024-05-23
*/

// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.7;

// contracts/interfaces/ISyrupRateProvider.sol

interface ISyrupRateProvider {

    /**
     * @return The value of Pool Token in terms of the underlying
     */
    function getRate() external view returns (uint256);

    /**
     *  @dev    The address of the ERC4626 Vault.
     *  @return pool The address of the ERC4626 Vault.
     */
    function pool() external view returns (address pool);

}

// contracts/interfaces/Interfaces.sol

interface IERC20Like {

    function allowance(address owner, address spender) external view returns (uint256 allowance);

    function approve(address spender, uint256 amount) external returns (bool success);

    function permit(address owner, address spender, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    function transfer(address recipient, uint256 amount) external returns (bool success);

    function transferFrom(address owner, address recipient, uint256 amount) external returns (bool success);

}

interface IPoolLike is IERC20Like {

    function asset() external view returns (address asset);

    function convertToExitAssets(uint256 shares) external view returns (uint256);

    function deposit(uint256 assets, address receiver) external returns (uint256 shares);

    function manager() external view returns (address manager);

}

interface IPoolManagerLike {

    function poolPermissionManager() external view returns (address poolPermissionManager);

}

interface IPoolPermissionManagerLike {

    function hasPermission(address poolManager, address lender, bytes32 functionId) external view returns (bool hasPermission);

    function permissionAdmins(address account) external view returns (bool isAdmin);

    function setLenderBitmaps(address[] calldata lenders, uint256[] calldata bitmaps) external;

}

// contracts/utils/SyrupRateProvider.sol

contract SyrupRateProvider is ISyrupRateProvider {

    uint256 public constant FIXED_POINT_ONE = 1e18;  // 18 decimal fixed point number.

    address public immutable override pool;

    constructor(address pool_) {
        pool = pool_;
    }

    function getRate() external view override returns (uint256) {
        return IPoolLike(pool).convertToExitAssets(FIXED_POINT_ONE);
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"pool_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FIXED_POINT_ONE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b5060405161023c38038061023c83398101604081905261002f91610044565b60601b6001600160601b031916608052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160601c6101a561009760003960008181604b015260cf01526101a56000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806316f0115b14610046578063679aefce1461008a57806373aa265b146100a0575b600080fd5b61006d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100926100af565b604051908152602001610081565b610092670de0b6b3a764000081565b6040516350496cbd60e01b8152670de0b6b3a764000060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906350496cbd9060240160206040518083038186803b15801561011957600080fd5b505afa15801561012d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101519190610156565b905090565b60006020828403121561016857600080fd5b505191905056fea2646970667358221220cb5ab4964252c509b55be5cf5c607b3aa30959c1037003e3023e53de6dd2066064736f6c6343000807003300000000000000000000000080ac24aa929eaf5013f6436cda2a7ba190f5cc0b

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c806316f0115b14610046578063679aefce1461008a57806373aa265b146100a0575b600080fd5b61006d7f00000000000000000000000080ac24aa929eaf5013f6436cda2a7ba190f5cc0b81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100926100af565b604051908152602001610081565b610092670de0b6b3a764000081565b6040516350496cbd60e01b8152670de0b6b3a764000060048201526000907f00000000000000000000000080ac24aa929eaf5013f6436cda2a7ba190f5cc0b6001600160a01b0316906350496cbd9060240160206040518083038186803b15801561011957600080fd5b505afa15801561012d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101519190610156565b905090565b60006020828403121561016857600080fd5b505191905056fea2646970667358221220cb5ab4964252c509b55be5cf5c607b3aa30959c1037003e3023e53de6dd2066064736f6c63430008070033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000080ac24aa929eaf5013f6436cda2a7ba190f5cc0b

-----Decoded View---------------
Arg [0] : pool_ (address): 0x80ac24aA929eaF5013f6436cdA2a7ba190f5Cc0b

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000080ac24aa929eaf5013f6436cda2a7ba190f5cc0b


Deployed Bytecode Sourcemap

1970:404:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2118:38;;;;;;;;-1:-1:-1;;;;;367:32:1;;;349:51;;337:2;322:18;2118:38:0;;;;;;;;2231:138;;;:::i;:::-;;;557:25:1;;;545:2;530:18;2231:138:0;411:177:1;2028:46:0;;2070:4;2028:46;;2231:138;2309:52;;-1:-1:-1;;;2309:52:0;;2070:4;2309:52;;;557:25:1;2282:7:0;;2319:4;-1:-1:-1;;;;;2309:35:0;;;;530:18:1;;2309:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2302:59;;2231:138;:::o;14:184:1:-;84:6;137:2;125:9;116:7;112:23;108:32;105:52;;;153:1;150;143:12;105:52;-1:-1:-1;176:16:1;;14:184;-1:-1:-1;14:184:1:o

Swarm Source

ipfs://cb5ab4964252c509b55be5cf5c607b3aa30959c1037003e3023e53de6dd20660

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.