ETH Price: $3,484.80 (+2.24%)

Token

Interest Protocol (IPT)
 

Overview

Max Total Supply

100,000,000 IPT

Holders

205 (0.00%)

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
0.00003596837944664 IPT

Value
$0.00
0x8cfd871dfcdbcad022929baf779019ae4330b800
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Interest Protocol is a new borrow/lend protocol that is highly capital-efficient thanks to its unique combination of fractional reserves and over-collateralization.

# Exchange Pair Price  24H Volume % Volume

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

Contract Name:
InterestProtocolToken

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : TokenDelegator.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma experimental ABIEncoderV2;

import "./IToken.sol";
import "./TokenStorage.sol";

contract InterestProtocolToken is TokenDelegatorStorage, TokenEvents, ITokenDelegator {
  constructor(
    address account_,
    address owner_,
    address implementation_,
    uint256 initialSupply_
  ) {
    require(implementation_ != address(0), "TokenDelegator: invalid address");
    owner = owner_;
    delegateTo(implementation_, abi.encodeWithSignature("initialize(address,uint256)", account_, initialSupply_));

    implementation = implementation_;

    emit NewImplementation(address(0), implementation);
  }

  /**
   * @notice Called by the admin to update the implementation of the delegator
   * @param implementation_ The address of the new implementation for delegation
   */
  function _setImplementation(address implementation_) external override onlyOwner {
    require(implementation_ != address(0), "_setImplementation: invalid addr");

    address oldImplementation = implementation;
    implementation = implementation_;

    emit NewImplementation(oldImplementation, implementation);
  }

  /**
   * @notice Called by the admin to update the owner of the delegator
   * @param owner_ The address of the new owner
   */
  function _setOwner(address owner_) external override onlyOwner {
    owner = owner_;
  }

  /**
   * @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
   */
  function delegateTo(address callee, bytes memory data) internal {
    //solhint-disable-next-line avoid-low-level-calls
    (bool success, bytes memory returnData) = callee.delegatecall(data);
    //solhint-disable-next-line no-inline-assembly
    assembly {
      if eq(success, 0) {
        revert(add(returnData, 0x20), returndatasize())
      }
    }
  }

  /**
   * @dev Delegates execution to an implementation contract.
   * It returns to the external caller whatever the implementation returns
   * or forwards reverts.
   */
  // solhint-disable-next-line no-complex-fallback
  fallback() external payable override {
    // delegate all other functions to current implementation
    //solhint-disable-next-line avoid-low-level-calls
    (bool success, ) = implementation.delegatecall(msg.data);
    //solhint-disable-next-line no-inline-assembly
    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())
      }
    }
  }

  receive() external payable override {}
}

File 2 of 4 : IToken.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma experimental ABIEncoderV2;

/// @title interface to interact with TokenDelgator
interface ITokenDelegator {
  function _setImplementation(address implementation_) external;

  function _setOwner(address owner_) external;

  fallback() external payable;

  receive() external payable;
}

/// @title interface to interact with TokenDelgate
interface ITokenDelegate {
  function initialize(address account_, uint256 initialSupply_) external;

  function changeName(string calldata name_) external;

  function changeSymbol(string calldata symbol_) external;

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

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

  function balanceOf(address account) external view returns (uint256);

  function transfer(address dst, uint256 rawAmount) external returns (bool);

  function transferFrom(
    address src,
    address dst,
    uint256 rawAmount
  ) external returns (bool);

  function mint(address dst, uint256 rawAmount) external;

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

  function delegate(address delegatee) external;

  function delegateBySig(
    address delegatee,
    uint256 nonce,
    uint256 expiry,
    uint8 v,
    bytes32 r,
    bytes32 s
  ) external;

  function getCurrentVotes(address account) external view returns (uint96);

  function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);
}

/// @title interface which contains all events emitted by delegator & delegate
interface TokenEvents {
  /// @notice An event thats emitted when an account changes its delegate
  event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

  /// @notice An event thats emitted when a delegate account's vote balance changes
  event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);

  /// @notice An event thats emitted when the minter changes
  event MinterChanged(address indexed oldMinter, address indexed newMinter);

  /// @notice The standard EIP-20 transfer event
  event Transfer(address indexed from, address indexed to, uint256 amount);

  /// @notice The standard EIP-20 approval event
  event Approval(address indexed owner, address indexed spender, uint256 amount);

  /// @notice Emitted when implementation is changed
  event NewImplementation(address oldImplementation, address newImplementation);

  /// @notice An event thats emitted when the token symbol is changed
  event ChangedSymbol(string oldSybmol, string newSybmol);

  /// @notice An event thats emitted when the token name is changed
  event ChangedName(string oldName, string newName);
}

File 3 of 4 : TokenStorage.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
pragma experimental ABIEncoderV2;

import "../../_external/Context.sol";

contract TokenDelegatorStorage is Context {
  /// @notice Active brains of Token
  address public implementation;

  /// @notice EIP-20 token name for this token
  string public name = "Interest Protocol";

  /// @notice EIP-20 token symbol for this token
  string public symbol = "IPT";

  /// @notice Total number of tokens in circulation
  uint256 public totalSupply;

  /// @notice EIP-20 token decimals for this token
  uint8 public constant decimals = 18;

  address public owner;
  /// @notice onlyOwner modifier checks if sender is owner
  modifier onlyOwner() {
    require(owner == _msgSender(), "onlyOwner: sender not owner");
    _;
  }
}

/**
 * @title Storage for Token Delegate
 * @notice For future upgrades, do not change TokenDelegateStorageV1. Create a new
 * contract which implements TokenDelegateStorageV1 and following the naming convention
 * TokenDelegateStorageVX.
 */
contract TokenDelegateStorageV1 is TokenDelegatorStorage {
  // Allowance amounts on behalf of others
  mapping(address => mapping(address => uint96)) internal allowances;

  // Official record of token balances for each account
  mapping(address => uint96) internal balances;

  /// @notice A record of each accounts delegate
  mapping(address => address) public delegates;

  /// @notice A checkpoint for marking number of votes from a given block
  struct Checkpoint {
    uint32 fromBlock;
    uint96 votes;
  }
  /// @notice A record of votes checkpoints for each account, by index
  mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;

  /// @notice The number of checkpoints for each account
  mapping(address => uint32) public numCheckpoints;

  /// @notice A record of states for signing / validating signatures
  mapping(address => uint256) public nonces;
}

File 4 of 4 : Context.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
  function _msgSender() internal view virtual returns (address) {
    return msg.sender;
  }

  function _msgData() internal view virtual returns (bytes calldata) {
    this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
    return msg.data;
  }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200,
    "details": {
      "orderLiterals": true,
      "deduplicate": true,
      "cse": true,
      "yul": true
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"uint256","name":"initialSupply_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"oldName","type":"string"},{"indexed":false,"internalType":"string","name":"newName","type":"string"}],"name":"ChangedName","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"oldSybmol","type":"string"},{"indexed":false,"internalType":"string","name":"newSybmol","type":"string"}],"name":"ChangedSymbol","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldMinter","type":"address"},{"indexed":true,"internalType":"address","name":"newMinter","type":"address"}],"name":"MinterChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldImplementation","type":"address"},{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"NewImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"implementation_","type":"address"}],"name":"_setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"_setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040526011608081905270125b9d195c995cdd08141c9bdd1bd8dbdb607a1b60a09081526100329160019190610227565b506040805180820190915260038082526212541560ea1b602090920191825261005d91600291610227565b5034801561006a57600080fd5b50604051610905380380610905833981016040819052610089916102dc565b6001600160a01b0382166100e35760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e44656c656761746f723a20696e76616c6964206164647265737300604482015260640160405180910390fd5b600480546001600160a01b0319166001600160a01b038581169190911790915560405190851660248201526044810182905261015190839060640160408051601f198184030181529190526020810180516001600160e01b0390811663cd6dc68760e01b179091526101b116565b600080546001600160a01b0319166001600160a01b03841690811782556040805192835260208301919091527fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a910160405180910390a15050505061039d565b600080836001600160a01b0316836040516101cc9190610327565b600060405180830381855af49150503d8060008114610207576040519150601f19603f3d011682016040523d82523d6000602084013e61020c565b606091505b50915091506000821415610221573d60208201fd5b50505050565b82805461023390610362565b90600052602060002090601f016020900481019282610255576000855561029b565b82601f1061026e57805160ff191683800117855561029b565b8280016001018555821561029b579182015b8281111561029b578251825591602001919060010190610280565b506102a79291506102ab565b5090565b5b808211156102a757600081556001016102ac565b80516001600160a01b03811681146102d757600080fd5b919050565b600080600080608085870312156102f257600080fd5b6102fb856102c0565b9350610309602086016102c0565b9250610317604086016102c0565b6060959095015193969295505050565b6000825160005b81811015610348576020818601810151858301520161032e565b81811115610357576000828501525b509190910192915050565b600181811c9082168061037657607f821691505b6020821081141561039757634e487b7160e01b600052602260045260246000fd5b50919050565b610559806103ac6000396000f3fe60806040526004361061007f5760003560e01c80638da5cb5b1161004e5780638da5cb5b146101af57806395d89b41146101cf578063bb913f41146101e4578063fc2011221461020657610086565b806306fdde031461010157806318160ddd1461012c578063313ce567146101505780635c60da1b1461017757610086565b3661008657005b600080546040516001600160a01b03909116906100a69083903690610453565b600060405180830381855af49150503d80600081146100e1576040519150601f19603f3d011682016040523d82523d6000602084013e6100e6565b606091505b505090506040513d6000823e8180156100fd573d82f35b3d82fd5b34801561010d57600080fd5b50610116610226565b6040516101239190610463565b60405180910390f35b34801561013857600080fd5b5061014260035481565b604051908152602001610123565b34801561015c57600080fd5b50610165601281565b60405160ff9091168152602001610123565b34801561018357600080fd5b50600054610197906001600160a01b031681565b6040516001600160a01b039091168152602001610123565b3480156101bb57600080fd5b50600454610197906001600160a01b031681565b3480156101db57600080fd5b506101166102b4565b3480156101f057600080fd5b506102046101ff3660046104b8565b6102c1565b005b34801561021257600080fd5b506102046102213660046104b8565b6103d7565b60018054610233906104e8565b80601f016020809104026020016040519081016040528092919081815260200182805461025f906104e8565b80156102ac5780601f10610281576101008083540402835291602001916102ac565b820191906000526020600020905b81548152906001019060200180831161028f57829003601f168201915b505050505081565b60028054610233906104e8565b6004546001600160a01b031633146103205760405162461bcd60e51b815260206004820152601b60248201527f6f6e6c794f776e65723a2073656e646572206e6f74206f776e6572000000000060448201526064015b60405180910390fd5b6001600160a01b0381166103765760405162461bcd60e51b815260206004820181905260248201527f5f736574496d706c656d656e746174696f6e3a20696e76616c696420616464726044820152606401610317565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a910160405180910390a15050565b6004546001600160a01b031633146104315760405162461bcd60e51b815260206004820152601b60248201527f6f6e6c794f776e65723a2073656e646572206e6f74206f776e657200000000006044820152606401610317565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b8183823760009101908152919050565b600060208083528351808285015260005b8181101561049057858101830151858201604001528201610474565b818111156104a2576000604083870101525b50601f01601f1916929092016040019392505050565b6000602082840312156104ca57600080fd5b81356001600160a01b03811681146104e157600080fd5b9392505050565b600181811c908216806104fc57607f821691505b6020821081141561051d57634e487b7160e01b600052602260045260246000fd5b5091905056fea264697066735822122030726c53700bc0a134db0774685b9f4c81bce607a2b087f9ed21a1685c6c933064736f6c63430008090033000000000000000000000000958892b4a0512b28aaac890fc938868bbd42f064000000000000000000000000958892b4a0512b28aaac890fc938868bbd42f06400000000000000000000000035bb90c0b96ddb4b93ddf42afedd5204e91a1a1000000000000000000000000000000000000000000052b7d2dcc80cd2e4000000

Deployed Bytecode

0x60806040526004361061007f5760003560e01c80638da5cb5b1161004e5780638da5cb5b146101af57806395d89b41146101cf578063bb913f41146101e4578063fc2011221461020657610086565b806306fdde031461010157806318160ddd1461012c578063313ce567146101505780635c60da1b1461017757610086565b3661008657005b600080546040516001600160a01b03909116906100a69083903690610453565b600060405180830381855af49150503d80600081146100e1576040519150601f19603f3d011682016040523d82523d6000602084013e6100e6565b606091505b505090506040513d6000823e8180156100fd573d82f35b3d82fd5b34801561010d57600080fd5b50610116610226565b6040516101239190610463565b60405180910390f35b34801561013857600080fd5b5061014260035481565b604051908152602001610123565b34801561015c57600080fd5b50610165601281565b60405160ff9091168152602001610123565b34801561018357600080fd5b50600054610197906001600160a01b031681565b6040516001600160a01b039091168152602001610123565b3480156101bb57600080fd5b50600454610197906001600160a01b031681565b3480156101db57600080fd5b506101166102b4565b3480156101f057600080fd5b506102046101ff3660046104b8565b6102c1565b005b34801561021257600080fd5b506102046102213660046104b8565b6103d7565b60018054610233906104e8565b80601f016020809104026020016040519081016040528092919081815260200182805461025f906104e8565b80156102ac5780601f10610281576101008083540402835291602001916102ac565b820191906000526020600020905b81548152906001019060200180831161028f57829003601f168201915b505050505081565b60028054610233906104e8565b6004546001600160a01b031633146103205760405162461bcd60e51b815260206004820152601b60248201527f6f6e6c794f776e65723a2073656e646572206e6f74206f776e6572000000000060448201526064015b60405180910390fd5b6001600160a01b0381166103765760405162461bcd60e51b815260206004820181905260248201527f5f736574496d706c656d656e746174696f6e3a20696e76616c696420616464726044820152606401610317565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a910160405180910390a15050565b6004546001600160a01b031633146104315760405162461bcd60e51b815260206004820152601b60248201527f6f6e6c794f776e65723a2073656e646572206e6f74206f776e657200000000006044820152606401610317565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b8183823760009101908152919050565b600060208083528351808285015260005b8181101561049057858101830151858201604001528201610474565b818111156104a2576000604083870101525b50601f01601f1916929092016040019392505050565b6000602082840312156104ca57600080fd5b81356001600160a01b03811681146104e157600080fd5b9392505050565b600181811c908216806104fc57607f821691505b6020821081141561051d57634e487b7160e01b600052602260045260246000fd5b5091905056fea264697066735822122030726c53700bc0a134db0774685b9f4c81bce607a2b087f9ed21a1685c6c933064736f6c63430008090033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.