ETH Price: $2,416.67 (+1.91%)

Contract

0x56285180CCFA602124f9f03D6dD03BF4Fc08892D
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Redeem Underlyin...128746502021-07-22 6:45:241150 days ago1626936324IN
0x56285180...4Fc08892D
0 ETH0.0068567516
Redeem Underlyin...128185542021-07-13 11:38:401158 days ago1626176320IN
0x56285180...4Fc08892D
0 ETH0.0106952424
Mint127074852021-06-26 4:24:301176 days ago1624681470IN
0x56285180...4Fc08892D
0 ETH0.001813299
Mint126717782021-06-20 14:44:561181 days ago1624200296IN
0x56285180...4Fc08892D
0 ETH0.0036265818
Mint126187672021-06-12 9:08:491190 days ago1623488929IN
0x56285180...4Fc08892D
0 ETH0.0022162411
Mint126082312021-06-10 17:49:381191 days ago1623347378IN
0x56285180...4Fc08892D
0 ETH0.0041914519.36
Mint125541342021-06-02 9:10:551200 days ago1622625055IN
0x56285180...4Fc08892D
0 ETH0.0043295420
Redeem125352942021-05-30 10:51:511202 days ago1622371911IN
0x56285180...4Fc08892D
0 ETH0.0033755218
Mint125018792021-05-25 6:28:431208 days ago1621924123IN
0x56285180...4Fc08892D
0 ETH0.0072798935
Mint124696582021-05-20 6:37:051213 days ago1621492625IN
0x56285180...4Fc08892D
0 ETH0.0158077776
Mint124583362021-05-18 12:18:151214 days ago1621340295IN
0x56285180...4Fc08892D
0 ETH0.0141853968.2
Mint124521112021-05-17 13:17:281215 days ago1621257448IN
0x56285180...4Fc08892D
0 ETH0.0112318354
Mint123030972021-04-24 13:05:161238 days ago1619269516IN
0x56285180...4Fc08892D
0 ETH0.0120638258
Redeem122978102021-04-23 17:21:581239 days ago1619198518IN
0x56285180...4Fc08892D
0 ETH0.0184024179
Mint122972702021-04-23 15:31:231239 days ago1619191883IN
0x56285180...4Fc08892D
0 ETH0.0225089100
Mint121237842021-03-27 22:22:251266 days ago1616883745IN
0x56285180...4Fc08892D
0 ETH0.03288943118

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
121236802021-03-27 22:00:451266 days ago1616882445  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xAbC1B3f3...C4b3dB1e2
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
PErc20Delegator

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
File 1 of 3 : PErc20Delegator.sol
pragma solidity ^0.7.4;

import "./ProxyWithRegistry.sol";
import "./RegistryInterface.sol";

/**
 * @title DeFiPie's PErc20Delegator Contract
 * @notice PTokens which wrap an EIP-20 underlying and delegate to an implementation
 * @author DeFiPie
 */
contract PErc20Delegator is ProxyWithRegistry {

    /**
     * @notice Construct a new money market
     * @param underlying_ The address of the underlying asset
     * @param controller_ The address of the Controller
     * @param interestRateModel_ The address of the interest rate model
     * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18
     * @param initialReserveFactorMantissa_ The initial reserve factor, scaled by 1e18
     * @param name_ ERC-20 name of this token
     * @param symbol_ ERC-20 symbol of this token
     * @param decimals_ ERC-20 decimal precision of this token
     * @param registry_ The address of the registry contract
     */
    constructor(
        address underlying_,
        address controller_,
        address interestRateModel_,
        uint initialExchangeRateMantissa_,
        uint initialReserveFactorMantissa_,
        string memory name_,
        string memory symbol_,
        uint8 decimals_,
        address registry_
    ) {
        // Set registry
        _setRegistry(registry_);

        // First delegate gets to initialize the delegator (i.e. storage contract)
        delegateTo(_pTokenImplementation(), abi.encodeWithSignature("initialize(address,address,address,address,uint256,uint256,string,string,uint8)",
                                                            underlying_,
                                                            registry_,
                                                            controller_,
                                                            interestRateModel_,
                                                            initialExchangeRateMantissa_,
                                                            initialReserveFactorMantissa_,
                                                            name_,
                                                            symbol_,
                                                            decimals_));
    }

    /**
     * @notice Internal method to delegate execution to another contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     * @param callee The contract to delegatecall
     * @param data The raw data to delegatecall
     * @return The returned bytes from the delegatecall
     */
    function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returnData) = callee.delegatecall(data);
        assembly {
            if eq(success, 0) {
                revert(add(returnData, 0x20), returndatasize())
            }
        }
        return returnData;
    }

    function delegateAndReturn() internal returns (bytes memory) {
        (bool success, ) = _pTokenImplementation().delegatecall(msg.data);

        assembly {
            let free_mem_ptr := mload(0x40)
            returndatacopy(free_mem_ptr, 0, returndatasize())

            switch success
            case 0 { revert(free_mem_ptr, returndatasize()) }
            default { return(free_mem_ptr, returndatasize()) }
        }
    }

    /**
     * @notice Delegates execution to an implementation contract
     * @dev It returns to the external caller whatever the implementation returns or forwards reverts
     */
    fallback() external payable {
        require(msg.value == 0,"PErc20Delegator:fallback: cannot send value to fallback");

        // delegate all other functions to current implementation
        delegateAndReturn();
    }

    receive() external payable {
        require(msg.value == 0,"PErc20Delegator:receive: cannot send value to receive");
    }
}

File 2 of 3 : ProxyWithRegistry.sol
pragma solidity ^0.7.4;

import "./RegistryInterface.sol";

contract ProxyWithRegistryStorage {

    /**
     * @notice Address of the registry contract
     */
    address public registry;
}

abstract contract ProxyWithRegistryInterface is ProxyWithRegistryStorage {
    function _setRegistry(address _registry) internal virtual;
    function _pTokenImplementation() internal view virtual returns (address);
}

contract ProxyWithRegistry is ProxyWithRegistryInterface {
    /**
     *  Returns actual address of the implementation contract from current registry
     *  @return registry Address of the registry
     */
    function _pTokenImplementation() internal view override returns (address) {
        return RegistryInterface(registry).pTokenImplementation();
    }

    function _setRegistry(address _registry) internal override {
        registry = _registry;
    }
}

contract ImplementationStorage {

    address public implementation;

    function _setImplementation(address implementation_) internal {
        implementation = implementation_;
    }
}

File 3 of 3 : RegistryInterface.sol
pragma solidity ^0.7.4;

interface RegistryInterface {

    /**
     *  Returns admin address for cToken contracts
     *  @return admin address
     */
    function admin() external view returns (address payable);

    /**
     *  Returns address of actual PToken implementation contract
     *  @return Address of contract
     */
    function pTokenImplementation() external view returns (address);

    function addPToken(address underlying, address pToken) external returns(uint);
    function addPETH(address pETH_) external returns(uint);
    function addPPIE(address pPIE_) external returns(uint);
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"underlying_","type":"address"},{"internalType":"address","name":"controller_","type":"address"},{"internalType":"address","name":"interestRateModel_","type":"address"},{"internalType":"uint256","name":"initialExchangeRateMantissa_","type":"uint256"},{"internalType":"uint256","name":"initialReserveFactorMantissa_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"address","name":"registry_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"registry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x6080604052600436106100225760003560e01c80637b103999146100ae57610066565b366100665734156100645760405162461bcd60e51b81526004018080602001828103825260358152602001806101f66035913960400191505060405180910390fd5b005b34156100a35760405162461bcd60e51b815260040180806020018281038252603781526020018061022b6037913960400191505060405180910390fd5b6100ab6100df565b50005b3480156100ba57600080fd5b506100c3610166565b604080516001600160a01b039092168252519081900360200190f35b606060006100eb610175565b6001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610146576040519150601f19603f3d011682016040523d82523d6000602084013e61014b565b606091505b505090506040513d6000823e818015610162573d82f35b3d82fd5b6000546001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b03166382466ff66040518163ffffffff1660e01b815260040160206040518083038186803b1580156101c457600080fd5b505afa1580156101d8573d6000803e3d6000fd5b505050506040513d60208110156101ee57600080fd5b505190509056fe50457263323044656c656761746f723a726563656976653a2063616e6e6f742073656e642076616c756520746f207265636569766550457263323044656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636ba2646970667358221220895e093bd7e3c322cfda8f1d0aaf34fb1f387204430b227dbc049e9102e27a3164736f6c63430007040033

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  ]
[ 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.