ETH Price: $3,335.58 (-0.03%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
_set Decimals An...115761782021-01-02 16:51:581485 days ago1609606318IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0031322173
Redeem115756992021-01-02 15:02:021485 days ago1609599722IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.03059598140.8000016
Mint115742122021-01-02 9:35:571485 days ago1609580157IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.012223342
Redeem115741182021-01-02 9:15:221485 days ago1609578922IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.005551336.00000145
Mint115740872021-01-02 9:10:101485 days ago1609578610IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.010767737
Redeem115739852021-01-02 8:51:021485 days ago1609577462IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0064765242
Mint115739672021-01-02 8:47:031485 days ago1609577223IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0110407640
_set Decimals An...115621072020-12-31 13:02:491487 days ago1609419769IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0038628990
Borrow Balance C...115620932020-12-31 13:00:051487 days ago1609419605IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0140498181.4572
Redeem115616882020-12-31 11:32:261487 days ago1609414346IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0099526658.8
_reduce Reserves115616722020-12-31 11:29:371487 days ago1609414177IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.008879460
Repay Borrow Beh...115616362020-12-31 11:23:541487 days ago1609413834IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0197401680.1
Repay Borrow Beh...115616152020-12-31 11:20:231487 days ago1609413623IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0197231880.10000123
Repay Borrow115615152020-12-31 10:58:421487 days ago1609412322IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0126127271
Redeem115615072020-12-31 10:57:251487 days ago1609412245IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0301676871
Redeem115572792020-12-30 19:24:541488 days ago1609356294IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.03833106114.24
Mint115229572020-12-25 13:05:331493 days ago1608901533IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0217504375.90000023
Borrow115229032020-12-25 12:51:491493 days ago1608900709IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0371497165
Mint115217312020-12-25 8:40:491493 days ago1608885649IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0229809285.8
Mint115155052020-12-24 9:32:331494 days ago1608802353IN
0xAbC1B3f3...C4b3dB1e2
0 ETH0.0212079469.3

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
115151942020-12-24 8:22:231494 days ago1608798143  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

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"}]

608060405234801561001057600080fd5b50604051610758380380610758833981810160405261012081101561003457600080fd5b815160208301516040808501516060860151608087015160a08801805194519698959793969295919492938201928464010000000082111561007557600080fd5b90830190602082018581111561008a57600080fd5b82516401000000008111828201881017156100a457600080fd5b82525081516020918201929091019080838360005b838110156100d15781810151838201526020016100b9565b50505050905090810190601f1680156100fe5780820380516001836020036101000a031916815260200191505b506040526020018051604051939291908464010000000082111561012157600080fd5b90830190602082018581111561013657600080fd5b825164010000000081118282018810171561015057600080fd5b82525081516020918201929091019080838360005b8381101561017d578181015183820152602001610165565b50505050905090810190601f1680156101aa5780820380516001836020036101000a031916815260200191505b506040908152602082015191015190925090506101c68161034e565b61033f6101d1610370565b8a838b8b8b8b8b8b8b604051602401808a6001600160a01b03168152602001896001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b0316815260200186815260200185815260200180602001806020018460ff168152602001838103835286818151815260200191508051906020019080838360005b8381101561026f578181015183820152602001610257565b50505050905090810190601f16801561029c5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156102cf5781810151838201526020016102b7565b50505050905090810190601f1680156102fc5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b0390811663776fce3960e11b17909152909c506103f0169a5050505050505050505050565b505050505050505050506104b2565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008060009054906101000a90046001600160a01b03166001600160a01b03166382466ff66040518163ffffffff1660e01b815260040160206040518083038186803b1580156103bf57600080fd5b505afa1580156103d3573d6000803e3d6000fd5b505050506040513d60208110156103e957600080fd5b5051905090565b606060006060846001600160a01b0316846040518082805190602001908083835b602083106104305780518252601f199092019160209182019101610411565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610490576040519150601f19603f3d011682016040523d82523d6000602084013e610495565b606091505b509150915060008214156104aa573d60208201fd5b949350505050565b610297806104c16000396000f3fe6080604052600436106100225760003560e01c80637b103999146100ae57610066565b366100665734156100645760405162461bcd60e51b81526004018080602001828103825260358152602001806101f66035913960400191505060405180910390fd5b005b34156100a35760405162461bcd60e51b815260040180806020018281038252603781526020018061022b6037913960400191505060405180910390fd5b6100ab6100df565b50005b3480156100ba57600080fd5b506100c3610166565b604080516001600160a01b039092168252519081900360200190f35b606060006100eb610175565b6001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610146576040519150601f19603f3d011682016040523d82523d6000602084013e61014b565b606091505b505090506040513d6000823e818015610162573d82f35b3d82fd5b6000546001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b03166382466ff66040518163ffffffff1660e01b815260040160206040518083038186803b1580156101c457600080fd5b505afa1580156101d8573d6000803e3d6000fd5b505050506040513d60208110156101ee57600080fd5b505190509056fe50457263323044656c656761746f723a726563656976653a2063616e6e6f742073656e642076616c756520746f207265636569766550457263323044656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636ba2646970667358221220895e093bd7e3c322cfda8f1d0aaf34fb1f387204430b227dbc049e9102e27a3164736f6c63430007040033000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000036de5bbc618a04c9b471208ef52ee2b1f536e92d000000000000000000000000d47d39a66bb4912d127fbfc1b90884fcb35461370000000000000000000000000000000000000000000000000000000000004e20000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000120000000000000000000000001135270bbb0627e769a7a2e24f2b2c7f14b3d83a0000000000000000000000000000000000000000000000000000000000000012446546695069652054657468657220555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057055534454000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106100225760003560e01c80637b103999146100ae57610066565b366100665734156100645760405162461bcd60e51b81526004018080602001828103825260358152602001806101f66035913960400191505060405180910390fd5b005b34156100a35760405162461bcd60e51b815260040180806020018281038252603781526020018061022b6037913960400191505060405180910390fd5b6100ab6100df565b50005b3480156100ba57600080fd5b506100c3610166565b604080516001600160a01b039092168252519081900360200190f35b606060006100eb610175565b6001600160a01b03166000366040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610146576040519150601f19603f3d011682016040523d82523d6000602084013e61014b565b606091505b505090506040513d6000823e818015610162573d82f35b3d82fd5b6000546001600160a01b031681565b60008060009054906101000a90046001600160a01b03166001600160a01b03166382466ff66040518163ffffffff1660e01b815260040160206040518083038186803b1580156101c457600080fd5b505afa1580156101d8573d6000803e3d6000fd5b505050506040513d60208110156101ee57600080fd5b505190509056fe50457263323044656c656761746f723a726563656976653a2063616e6e6f742073656e642076616c756520746f207265636569766550457263323044656c656761746f723a66616c6c6261636b3a2063616e6e6f742073656e642076616c756520746f2066616c6c6261636ba2646970667358221220895e093bd7e3c322cfda8f1d0aaf34fb1f387204430b227dbc049e9102e27a3164736f6c63430007040033

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

000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000036de5bbc618a04c9b471208ef52ee2b1f536e92d000000000000000000000000d47d39a66bb4912d127fbfc1b90884fcb35461370000000000000000000000000000000000000000000000000000000000004e20000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000120000000000000000000000001135270bbb0627e769a7a2e24f2b2c7f14b3d83a0000000000000000000000000000000000000000000000000000000000000012446546695069652054657468657220555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057055534454000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : underlying_ (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [1] : controller_ (address): 0x36de5Bbc618A04c9B471208Ef52eE2b1F536E92d
Arg [2] : interestRateModel_ (address): 0xd47d39A66bb4912D127fBfC1b90884fCB3546137
Arg [3] : initialExchangeRateMantissa_ (uint256): 20000
Arg [4] : initialReserveFactorMantissa_ (uint256): 100000000000000000
Arg [5] : name_ (string): DeFiPie Tether USD
Arg [6] : symbol_ (string): pUSDT
Arg [7] : decimals_ (uint8): 18
Arg [8] : registry_ (address): 0x1135270BbB0627e769a7a2e24f2b2C7F14B3d83A

-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [1] : 00000000000000000000000036de5bbc618a04c9b471208ef52ee2b1f536e92d
Arg [2] : 000000000000000000000000d47d39a66bb4912d127fbfc1b90884fcb3546137
Arg [3] : 0000000000000000000000000000000000000000000000000000000000004e20
Arg [4] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [8] : 0000000000000000000000001135270bbb0627e769a7a2e24f2b2c7f14b3d83a
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [10] : 4465466950696520546574686572205553440000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [12] : 7055534454000000000000000000000000000000000000000000000000000000


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.