ERC-20
Overview
Max Total Supply
530.91112381 cWETH
Holders
27
Market
Price
-
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 8 Decimals)
Balance
0.49999779 cWETHValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
CErc20Delegator
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.8.22; import "./CTokenInterfaces.sol"; /** * @title Mach's CErc20Delegator Contract * @notice CTokens which wrap an EIP-20 underlying and delegate to an implementation * @author Mach */ contract CErc20Delegator is CTokenInterface, CErc20Interface, CDelegatorInterface { /** * @notice Construct a new money market * @param underlying_ The address of the underlying asset * @param comptroller_ The address of the Comptroller * @param interestRateModel_ The address of the interest rate model * @param initialExchangeRateMantissa_ The initial exchange rate, 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 admin_ Address of the administrator of this token * @param implementation_ The address of the implementation the contract delegates to * @param becomeImplementationData The encoded args for becomeImplementation */ constructor( address underlying_, ComptrollerInterface comptroller_, InterestRateModel interestRateModel_, uint256 initialExchangeRateMantissa_, string memory name_, string memory symbol_, uint8 decimals_, address payable admin_, address implementation_, bytes memory becomeImplementationData ) { // Creator of the contract is admin during initialization admin = payable(msg.sender); // First delegate gets to initialize the delegator (i.e. storage contract) delegateTo( implementation_, abi.encodeWithSignature( "initialize(address,address,address,uint256,string,string,uint8)", underlying_, comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_ ) ); // New implementations always get set via the settor (post-initialize) _setImplementation(implementation_, false, becomeImplementationData); // Set the proper admin now that initialization is done admin = admin_; } /** * @notice Called by the admin to update the implementation of the delegator * @param implementation_ The address of the new implementation for delegation * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation */ function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public override { require(msg.sender == admin, "CErc20Delegator::_setImplementation: Caller must be admin"); if (allowResign) { delegateToImplementation(abi.encodeWithSignature("_resignImplementation()")); } address oldImplementation = implementation; implementation = implementation_; delegateToImplementation(abi.encodeWithSignature("_becomeImplementation(bytes)", becomeImplementationData)); emit NewImplementation(oldImplementation, implementation); } /** * @notice Sender supplies assets into the market and receives cTokens in exchange * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param mintAmount The amount of the underlying asset to supply * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function mint(uint256 mintAmount) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("mint(uint256)", mintAmount)); return abi.decode(data, (uint256)); } /** * @notice Sender supplies assets into the market, enables it as collateral and receives cTokens in exchange * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param mintAmount The amount of the underlying asset to supply * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function mintAsCollateral(uint256 mintAmount) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("mintAsCollateral(uint256)", mintAmount)); return abi.decode(data, (uint256)); } /** * @notice Sender redeems cTokens in exchange for the underlying asset * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param redeemTokens The number of cTokens to redeem into underlying * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function redeem(uint256 redeemTokens) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("redeem(uint256)", redeemTokens)); return abi.decode(data, (uint256)); } /** * @notice Sender redeems cTokens in exchange for a specified amount of underlying asset * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param redeemAmount The amount of underlying to redeem * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function redeemUnderlying(uint256 redeemAmount) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("redeemUnderlying(uint256)", redeemAmount)); return abi.decode(data, (uint256)); } /** * @notice Sender borrows assets from the protocol to their own address * @param borrowAmount The amount of the underlying asset to borrow * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function borrow(uint256 borrowAmount) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("borrow(uint256)", borrowAmount)); return abi.decode(data, (uint256)); } /** * @notice Sender repays their own borrow * @param repayAmount The amount to repay, or -1 for the full outstanding amount * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function repayBorrow(uint256 repayAmount) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("repayBorrow(uint256)", repayAmount)); return abi.decode(data, (uint256)); } /** * @notice Sender repays a borrow belonging to borrower * @param borrower the account with the debt being payed off * @param repayAmount The amount to repay, or -1 for the full outstanding amount * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function repayBorrowBehalf(address borrower, uint256 repayAmount) external override returns (uint256) { bytes memory data = delegateToImplementation( abi.encodeWithSignature("repayBorrowBehalf(address,uint256)", borrower, repayAmount) ); return abi.decode(data, (uint256)); } /** * @notice The sender liquidates the borrowers collateral. * The collateral seized is transferred to the liquidator. * @param borrower The borrower of this cToken to be liquidated * @param cTokenCollateral The market in which to seize collateral from the borrower * @param repayAmount The amount of the underlying borrowed asset to repay * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function liquidateBorrow(address borrower, uint256 repayAmount, CTokenInterface cTokenCollateral) external override returns (uint256) { bytes memory data = delegateToImplementation( abi.encodeWithSignature("liquidateBorrow(address,uint256,address)", borrower, repayAmount, cTokenCollateral) ); return abi.decode(data, (uint256)); } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param amount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint256 amount) external override returns (bool) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("transfer(address,uint256)", dst, amount)); return abi.decode(data, (bool)); } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param amount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint256 amount) external override returns (bool) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("transferFrom(address,address,uint256)", src, dst, amount)); return abi.decode(data, (bool)); } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param amount The number of tokens that are approved (-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint256 amount) external override returns (bool) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("approve(address,uint256)", spender, amount)); return abi.decode(data, (bool)); } /** * @notice Get the current allowance from `owner` for `spender` * @param owner The address of the account which owns the tokens to be spent * @param spender The address of the account which may transfer tokens * @return The number of tokens allowed to be spent (-1 means infinite) */ function allowance(address owner, address spender) external view override returns (uint256) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("allowance(address,address)", owner, spender)); return abi.decode(data, (uint256)); } /** * @notice Get the token balance of the `owner` * @param owner The address of the account to query * @return The number of tokens owned by `owner` */ function balanceOf(address owner) external view override returns (uint256) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("balanceOf(address)", owner)); return abi.decode(data, (uint256)); } /** * @notice Get the underlying balance of the `owner` * @dev This also accrues interest in a transaction * @param owner The address of the account to query * @return The amount of underlying owned by `owner` */ function balanceOfUnderlying(address owner) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("balanceOfUnderlying(address)", owner)); return abi.decode(data, (uint256)); } /** * @notice Get a snapshot of the account's balances, and the cached exchange rate * @dev This is used by comptroller to more efficiently perform liquidity checks. * @param account Address of the account to snapshot * @return (possible error, token balance, borrow balance, exchange rate mantissa) */ function getAccountSnapshot(address account) external view override returns (uint256, uint256, uint256, uint256) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("getAccountSnapshot(address)", account)); return abi.decode(data, (uint256, uint256, uint256, uint256)); } /** * @notice Returns the current per-timestamp borrow interest rate for this cToken * @return The borrow interest rate per timestamp, scaled by 1e18 */ function borrowRatePerTimestamp() external view override returns (uint256) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("borrowRatePerTimestamp()")); return abi.decode(data, (uint256)); } /** * @notice Returns the current per-timestamp supply interest rate for this cToken * @return The supply interest rate per timestamp, scaled by 1e18 */ function supplyRatePerTimestamp() external view override returns (uint256) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("supplyRatePerTimestamp()")); return abi.decode(data, (uint256)); } /** * @notice Returns the current total borrows plus accrued interest * @return The total borrows with interest */ function totalBorrowsCurrent() external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("totalBorrowsCurrent()")); return abi.decode(data, (uint256)); } /** * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex * @param account The address whose balance should be calculated after updating borrowIndex * @return The calculated balance */ function borrowBalanceCurrent(address account) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("borrowBalanceCurrent(address)", account)); return abi.decode(data, (uint256)); } /** * @notice Return the borrow balance of account based on stored data * @param account The address whose balance should be calculated * @return The calculated balance */ function borrowBalanceStored(address account) public view override returns (uint256) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("borrowBalanceStored(address)", account)); return abi.decode(data, (uint256)); } /** * @notice Accrue interest then return the up-to-date exchange rate * @return Calculated exchange rate scaled by 1e18 */ function exchangeRateCurrent() public override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("exchangeRateCurrent()")); return abi.decode(data, (uint256)); } /** * @notice Calculates the exchange rate from the underlying to the CToken * @dev This function does not accrue interest before calculating the exchange rate * @return Calculated exchange rate scaled by 1e18 */ function exchangeRateStored() public view override returns (uint256) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("exchangeRateStored()")); return abi.decode(data, (uint256)); } /** * @notice Get cash balance of this cToken in the underlying asset * @return The quantity of underlying asset owned by this contract */ function getCash() external view override returns (uint256) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("getCash()")); return abi.decode(data, (uint256)); } /** * @notice Applies accrued interest to total borrows and reserves. * @dev This calculates interest accrued from the last checkpointed timestamp * up to the current timestamp and writes new checkpoint to storage. */ function accrueInterest() public override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("accrueInterest()")); return abi.decode(data, (uint256)); } /** * @notice Transfers collateral tokens (this market) to the liquidator. * @dev Will fail unless called by another cToken during the process of liquidation. * Its absolutely critical to use msg.sender as the borrowed cToken and not a parameter. * @param liquidator The account receiving seized collateral * @param borrower The account having collateral seized * @param seizeTokens The number of cTokens to seize * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function seize(address liquidator, address borrower, uint256 seizeTokens) external override returns (uint256) { bytes memory data = delegateToImplementation( abi.encodeWithSignature("seize(address,address,uint256)", liquidator, borrower, seizeTokens) ); return abi.decode(data, (uint256)); } /** * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to admin (timelock) * @param token The address of the ERC-20 token to sweep */ function sweepToken(EIP20NonStandardInterface token) external override { delegateToImplementation(abi.encodeWithSignature("sweepToken(address)", token)); } /** * Admin Functions ** */ /** * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @param newPendingAdmin New pending admin. * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setPendingAdmin(address payable newPendingAdmin) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setPendingAdmin(address)", newPendingAdmin)); return abi.decode(data, (uint256)); } /** * @notice Sets a new comptroller for the market * @dev Admin function to set a new comptroller * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setComptroller(ComptrollerInterface newComptroller) public override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setComptroller(address)", newComptroller)); return abi.decode(data, (uint256)); } /** * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh * @dev Admin function to accrue interest and set a new reserve factor * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setReserveFactor(uint256 newReserveFactorMantissa) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setReserveFactor(uint256)", newReserveFactorMantissa)); return abi.decode(data, (uint256)); } /** * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin * @dev Admin function for pending admin to accept role and update admin * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _acceptAdmin() external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_acceptAdmin()")); return abi.decode(data, (uint256)); } /** * @notice Accrues interest and adds reserves by transferring from admin * @param addAmount Amount of reserves to add * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _addReserves(uint256 addAmount) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_addReserves(uint256)", addAmount)); return abi.decode(data, (uint256)); } /** * @notice Accrues interest and reduces reserves by transferring to admin * @param reduceAmount Amount of reduction to reserves * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _reduceReserves(uint256 reduceAmount) external override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_reduceReserves(uint256)", reduceAmount)); return abi.decode(data, (uint256)); } /** * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh * @dev Admin function to accrue interest and update the interest rate model * @param newInterestRateModel the new interest rate model to use * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setInterestRateModel(InterestRateModel newInterestRateModel) public override returns (uint256) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setInterestRateModel(address)", newInterestRateModel)); return abi.decode(data, (uint256)); } /** * @notice accrues interest and sets a new protocol seize share for the protocol using _setProtocolSeizeShareFresh * @dev Admin function to accrue interest and set a new protocol seize share * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setProtocolSeizeShare(uint256 newProtocolSeizeShareMantissa) external override returns (uint256) { bytes memory data = delegateToImplementation( abi.encodeWithSignature("_setProtocolSeizeShare(uint256)", newProtocolSeizeShareMantissa) ); return abi.decode(data, (uint256)); } /** * @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; } /** * @notice Delegates execution to the implementation contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts * @param data The raw data to delegatecall * @return The returned bytes from the delegatecall */ function delegateToImplementation(bytes memory data) public returns (bytes memory) { return delegateTo(implementation, data); } /** * @notice Delegates execution to an implementation contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop. * @param data The raw data to delegatecall * @return The returned bytes from the delegatecall */ function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) { (bool success, bytes memory returnData) = address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", data)); assembly { if eq(success, 0) { revert(add(returnData, 0x20), returndatasize()) } } return abi.decode(returnData, (bytes)); } /** * @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, "CErc20Delegator:fallback: cannot send value to fallback"); // delegate all other functions to current implementation (bool success,) = implementation.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()) } } } }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.8.22; import "./ComptrollerInterface.sol"; import "./InterestRateModel.sol"; import "./EIP20NonStandardInterface.sol"; import "./ErrorReporter.sol"; contract CTokenStorage { /** * @dev Guard variable for re-entrancy checks */ bool internal _notEntered; /** * @notice EIP-20 token name for this token */ string public name; /** * @notice EIP-20 token symbol for this token */ string public symbol; /** * @notice EIP-20 token decimals for this token */ uint8 public decimals; // Maximum borrow rate that can ever be applied (.0001% / timestamp) // Estimation of maximum borrow rate = 0.0001% * ((365 * 24 * 3600) / 1 second) = 3153% // The original interest from Compound v2 is 0.0005% * ((365 * 24 * 3600) / 15 seconds) = 1051% uint256 internal constant borrowRateMaxMantissa = 0.0001e16; // Maximum fraction of interest that can be set aside for reserves uint256 internal constant reserveFactorMaxMantissa = 1e18; /** * @notice Administrator for this contract */ address payable public admin; /** * @notice Pending administrator for this contract */ address payable public pendingAdmin; /** * @notice Contract which oversees inter-cToken operations */ ComptrollerInterface public comptroller; /** * @notice Model which tells what the current interest rate should be */ InterestRateModel public interestRateModel; // Initial exchange rate used when minting the first CTokens (used when totalSupply = 0) uint256 internal initialExchangeRateMantissa; /** * @notice Fraction of interest currently set aside for reserves */ uint256 public reserveFactorMantissa; /** * @notice Block timestamp that interest was last accrued at */ uint256 public accrualBlockTimestamp; /** * @notice Accumulator of the total earned interest rate since the opening of the market */ uint256 public borrowIndex; /** * @notice Total amount of outstanding borrows of the underlying in this market */ uint256 public totalBorrows; /** * @notice Total amount of reserves of the underlying held in this market */ uint256 public totalReserves; /** * @notice Total number of tokens in circulation */ uint256 public totalSupply; // Official record of token balances for each account mapping(address => uint256) internal accountTokens; // Approved token transfer amounts on behalf of others mapping(address => mapping(address => uint256)) internal transferAllowances; /** * @notice Container for borrow balance information * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action * @member interestIndex Global borrowIndex as of the most recent balance-changing action */ struct BorrowSnapshot { uint256 principal; uint256 interestIndex; } // Mapping of account addresses to outstanding borrow balances mapping(address => BorrowSnapshot) internal accountBorrows; /** * @notice Share of seized collateral that is added to reserves */ uint256 public protocolSeizeShareMantissa; } abstract contract CTokenInterface is CTokenStorage { /** * @notice Indicator that this is a CToken contract (for inspection) */ bool public constant isCToken = true; /** * Market Events ** */ /** * @notice Event emitted when interest is accrued */ event AccrueInterest(uint256 cashPrior, uint256 interestAccumulated, uint256 borrowIndex, uint256 totalBorrows); /** * @notice Event emitted when tokens are minted */ event Mint(address minter, uint256 mintAmount, uint256 mintTokens); /** * @notice Event emitted when tokens are redeemed */ event Redeem(address redeemer, uint256 redeemAmount, uint256 redeemTokens); /** * @notice Event emitted when underlying is borrowed */ event Borrow(address borrower, uint256 borrowAmount, uint256 accountBorrows, uint256 totalBorrows); /** * @notice Event emitted when a borrow is repaid */ event RepayBorrow( address payer, address borrower, uint256 repayAmount, uint256 accountBorrows, uint256 totalBorrows ); /** * @notice Event emitted when a borrow is liquidated */ event LiquidateBorrow( address liquidator, address borrower, uint256 repayAmount, address cTokenCollateral, uint256 seizeTokens ); /** * Admin Events ** */ /** * @notice Event emitted when pendingAdmin is changed */ event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin); /** * @notice Event emitted when pendingAdmin is accepted, which means admin is updated */ event NewAdmin(address oldAdmin, address newAdmin); /** * @notice Event emitted when comptroller is changed */ event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller); /** * @notice Event emitted when interestRateModel is changed */ event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel); /** * @notice Event emitted when the reserve factor is changed */ event NewReserveFactor(uint256 oldReserveFactorMantissa, uint256 newReserveFactorMantissa); /** * @notice Event emitted when the protocol seize share is changed */ event NewProtocolSeizeShare(uint256 oldProtocolSeizeShareMantissa, uint256 newProtocolSeizeShareMantissa); /** * @notice Event emitted when the reserves are added */ event ReservesAdded(address benefactor, uint256 addAmount, uint256 newTotalReserves); /** * @notice Event emitted when the reserves are reduced */ event ReservesReduced(address admin, uint256 reduceAmount, uint256 newTotalReserves); /** * @notice EIP20 Transfer event */ event Transfer(address indexed from, address indexed to, uint256 amount); /** * @notice EIP20 Approval event */ event Approval(address indexed owner, address indexed spender, uint256 amount); /** * User Interface ** */ function transfer(address dst, uint256 amount) external virtual returns (bool); function transferFrom(address src, address dst, uint256 amount) external virtual returns (bool); function approve(address spender, uint256 amount) external virtual returns (bool); function allowance(address owner, address spender) external view virtual returns (uint256); function balanceOf(address owner) external view virtual returns (uint256); function balanceOfUnderlying(address owner) external virtual returns (uint256); function getAccountSnapshot(address account) external view virtual returns (uint256, uint256, uint256, uint256); function borrowRatePerTimestamp() external view virtual returns (uint256); function supplyRatePerTimestamp() external view virtual returns (uint256); function totalBorrowsCurrent() external virtual returns (uint256); function borrowBalanceCurrent(address account) external virtual returns (uint256); function borrowBalanceStored(address account) external view virtual returns (uint256); function exchangeRateCurrent() external virtual returns (uint256); function exchangeRateStored() external view virtual returns (uint256); function getCash() external view virtual returns (uint256); function accrueInterest() external virtual returns (uint256); function seize(address liquidator, address borrower, uint256 seizeTokens) external virtual returns (uint256); /** * Admin Functions ** */ function _setPendingAdmin(address payable newPendingAdmin) external virtual returns (uint256); function _acceptAdmin() external virtual returns (uint256); function _setComptroller(ComptrollerInterface newComptroller) external virtual returns (uint256); function _setReserveFactor(uint256 newReserveFactorMantissa) external virtual returns (uint256); function _reduceReserves(uint256 reduceAmount) external virtual returns (uint256); function _setInterestRateModel(InterestRateModel newInterestRateModel) external virtual returns (uint256); function _setProtocolSeizeShare(uint256 newProtocolSeizeShareMantissa) external virtual returns (uint256); } contract CErc20Storage { /** * @notice Underlying asset for this CToken */ address public underlying; } abstract contract CErc20Interface is CErc20Storage { /** * User Interface ** */ function mint(uint256 mintAmount) external virtual returns (uint256); function mintAsCollateral(uint256 mintAmount) external virtual returns (uint256); function redeem(uint256 redeemTokens) external virtual returns (uint256); function redeemUnderlying(uint256 redeemAmount) external virtual returns (uint256); function borrow(uint256 borrowAmount) external virtual returns (uint256); function repayBorrow(uint256 repayAmount) external virtual returns (uint256); function repayBorrowBehalf(address borrower, uint256 repayAmount) external virtual returns (uint256); function liquidateBorrow(address borrower, uint256 repayAmount, CTokenInterface cTokenCollateral) external virtual returns (uint256); function sweepToken(EIP20NonStandardInterface token) external virtual; /** * Admin Functions ** */ function _addReserves(uint256 addAmount) external virtual returns (uint256); } contract CDelegationStorage { /** * @notice Implementation address for this contract */ address public implementation; } abstract contract CDelegatorInterface is CDelegationStorage { /** * @notice Emitted when implementation is changed */ event NewImplementation(address oldImplementation, address newImplementation); /** * @notice Called by the admin to update the implementation of the delegator * @param implementation_ The address of the new implementation for delegation * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation */ function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) external virtual; } abstract contract CDelegateInterface is CDelegationStorage { /** * @notice Called by the delegator on a delegate to initialize it for duty * @dev Should revert if any issues arise which make it unfit for delegation * @param data The encoded bytes data for any initialization */ function _becomeImplementation(bytes memory data) external virtual; /** * @notice Called by the delegator on a delegate to forfeit its responsibility */ function _resignImplementation() external virtual; }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.8.22; abstract contract ComptrollerInterface { /// @notice Indicator that this is a Comptroller contract (for inspection) bool public constant isComptroller = true; /** * Assets You Are In ** */ function enterMarkets(address[] calldata cTokens) external virtual returns (uint256[] memory); function exitMarket(address cToken) external virtual returns (uint256); function checkMembership(address account, address cToken) external view virtual returns (bool); function enterMarketForCToken(address cToken, address account) external virtual returns (uint256); /** * Policy Hooks ** */ function mintAllowed(address cToken, address minter, uint256 mintAmount) external virtual returns (uint256); function mintVerify(address cToken, address minter, uint256 mintAmount, uint256 mintTokens) external virtual; function redeemAllowed(address cToken, address redeemer, uint256 redeemTokens) external virtual returns (uint256); function redeemVerify(address cToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external virtual; function borrowAllowed(address cToken, address borrower, uint256 borrowAmount) external virtual returns (uint256); function borrowVerify(address cToken, address borrower, uint256 borrowAmount) external virtual; function repayBorrowAllowed(address cToken, address payer, address borrower, uint256 repayAmount) external virtual returns (uint256); function repayBorrowVerify( address cToken, address payer, address borrower, uint256 repayAmount, uint256 borrowerIndex ) external virtual; function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint256 repayAmount ) external virtual returns (uint256); function liquidateBorrowVerify( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint256 repayAmount, uint256 seizeTokens ) external virtual; function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint256 seizeTokens ) external virtual returns (uint256); function seizeVerify( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint256 seizeTokens ) external virtual; function transferAllowed(address cToken, address src, address dst, uint256 transferTokens) external virtual returns (uint256); function transferVerify(address cToken, address src, address dst, uint256 transferTokens) external virtual; /** * Liquidity/Liquidation Calculations ** */ function liquidateCalculateSeizeTokens(address cTokenBorrowed, address cTokenCollateral, uint256 repayAmount) external view virtual returns (uint256, uint256); }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.8.22; /** * @title Mach's InterestRateModel Interface * @author Mach Finance */ abstract contract InterestRateModel { /// @notice Indicator that this is an InterestRateModel contract (for inspection) bool public constant isInterestRateModel = true; /** * @notice Calculates the current borrow interest rate per timestamp * @param cash The total amount of cash the market has * @param borrows The total amount of borrows the market has outstanding * @param reserves The total amount of reserves the market has * @return The borrow rate per timestamp (as a percentage, and scaled by 1e18) */ function getBorrowRate(uint256 cash, uint256 borrows, uint256 reserves) external view virtual returns (uint256); /** * @notice Calculates the current supply interest rate per timestamp * @param cash The total amount of cash the market has * @param borrows The total amount of borrows the market has outstanding * @param reserves The total amount of reserves the market has * @param reserveFactorMantissa The current reserve factor the market has * @return The supply rate per timestamp (as a percentage, and scaled by 1e18) */ function getSupplyRate(uint256 cash, uint256 borrows, uint256 reserves, uint256 reserveFactorMantissa) external view virtual returns (uint256); }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.8.22; /** * @title EIP20NonStandardInterface * @dev Version of ERC20 with no return values for `transfer` and `transferFrom` * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca */ interface EIP20NonStandardInterface { /** * @notice Get the total number of tokens in circulation * @return The supply of tokens */ function totalSupply() external view returns (uint256); /** * @notice Gets the balance of the specified address * @param owner The address from which the balance will be retrieved * @return balance The balance */ function balanceOf(address owner) external view returns (uint256 balance); /// /// !!!!!!!!!!!!!! /// !!! NOTICE !!! `transfer` does not return a value, in violation of the ERC-20 specification /// !!!!!!!!!!!!!! /// /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param amount The number of tokens to transfer */ function transfer(address dst, uint256 amount) external; /// /// !!!!!!!!!!!!!! /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the ERC-20 specification /// !!!!!!!!!!!!!! /// /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param amount The number of tokens to transfer */ function transferFrom(address src, address dst, uint256 amount) external; /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param amount The number of tokens that are approved * @return success Whether or not the approval succeeded */ function approve(address spender, uint256 amount) external returns (bool success); /** * @notice Get the current allowance from `owner` for `spender` * @param owner The address of the account which owns the tokens to be spent * @param spender The address of the account which may transfer tokens * @return remaining The number of tokens allowed to be spent */ function allowance(address owner, address spender) external view returns (uint256 remaining); event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.8.22; contract ComptrollerErrorReporter { enum Error { NO_ERROR, UNAUTHORIZED, COMPTROLLER_MISMATCH, INSUFFICIENT_SHORTFALL, INSUFFICIENT_LIQUIDITY, INVALID_CLOSE_FACTOR, INVALID_COLLATERAL_FACTOR, INVALID_LIQUIDATION_INCENTIVE, MARKET_NOT_ENTERED, // no longer possible MARKET_NOT_LISTED, MARKET_ALREADY_LISTED, MATH_ERROR, NONZERO_BORROW_BALANCE, PRICE_ERROR, REJECTION, SNAPSHOT_ERROR, TOO_MANY_ASSETS, TOO_MUCH_REPAY } enum FailureInfo { ACCEPT_ADMIN_PENDING_ADMIN_CHECK, ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK, EXIT_MARKET_BALANCE_OWED, EXIT_MARKET_REJECTION, SET_CLOSE_FACTOR_OWNER_CHECK, SET_CLOSE_FACTOR_VALIDATION, SET_COLLATERAL_FACTOR_OWNER_CHECK, SET_COLLATERAL_FACTOR_NO_EXISTS, SET_COLLATERAL_FACTOR_VALIDATION, SET_COLLATERAL_FACTOR_WITHOUT_PRICE, SET_IMPLEMENTATION_OWNER_CHECK, SET_LIQUIDATION_INCENTIVE_OWNER_CHECK, SET_LIQUIDATION_INCENTIVE_VALIDATION, SET_MAX_ASSETS_OWNER_CHECK, SET_PENDING_ADMIN_OWNER_CHECK, SET_PENDING_IMPLEMENTATION_OWNER_CHECK, SET_PRICE_ORACLE_OWNER_CHECK, SUPPORT_MARKET_EXISTS, SUPPORT_MARKET_OWNER_CHECK, SET_PAUSE_GUARDIAN_OWNER_CHECK } /** * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary * contract-specific code that enables us to report opaque error codes from upgradeable contracts. * */ event Failure(uint256 error, uint256 info, uint256 detail); /** * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator */ function fail(Error err, FailureInfo info) internal returns (uint256) { emit Failure(uint256(err), uint256(info), 0); return uint256(err); } /** * @dev use this when reporting an opaque error from an upgradeable collaborator contract */ function failOpaque(Error err, FailureInfo info, uint256 opaqueError) internal returns (uint256) { emit Failure(uint256(err), uint256(info), opaqueError); return uint256(err); } } contract TokenErrorReporter { uint256 public constant NO_ERROR = 0; // support legacy return codes error TransferComptrollerRejection(uint256 errorCode); error TransferNotAllowed(); error TransferNotEnough(); error TransferTooMuch(); error MintComptrollerRejection(uint256 errorCode); error MintFreshnessCheck(); error RedeemComptrollerRejection(uint256 errorCode); error RedeemFreshnessCheck(); error RedeemTransferOutNotPossible(); error BorrowComptrollerRejection(uint256 errorCode); error BorrowFreshnessCheck(); error BorrowCashNotAvailable(); error RepayBorrowComptrollerRejection(uint256 errorCode); error RepayBorrowFreshnessCheck(); error LiquidateComptrollerRejection(uint256 errorCode); error LiquidateFreshnessCheck(); error LiquidateCollateralFreshnessCheck(); error LiquidateAccrueBorrowInterestFailed(uint256 errorCode); error LiquidateAccrueCollateralInterestFailed(uint256 errorCode); error LiquidateLiquidatorIsBorrower(); error LiquidateCloseAmountIsZero(); error LiquidateCloseAmountIsUintMax(); error LiquidateRepayBorrowFreshFailed(uint256 errorCode); error LiquidateSeizeComptrollerRejection(uint256 errorCode); error LiquidateSeizeLiquidatorIsBorrower(); error AcceptAdminPendingAdminCheck(); error SetComptrollerOwnerCheck(); error SetPendingAdminOwnerCheck(); error SetReserveFactorAdminCheck(); error SetReserveFactorFreshCheck(); error SetReserveFactorBoundsCheck(); error AddReservesFactorFreshCheck(uint256 actualAddAmount); error ReduceReservesAdminCheck(); error ReduceReservesFreshCheck(); error ReduceReservesCashNotAvailable(); error ReduceReservesCashValidation(); error SetInterestRateModelOwnerCheck(); error SetInterestRateModelFreshCheck(); error SetProtocolSeizeShareOwnerCheck(); error SetProtocolSeizeShareFreshCheck(); error EnterMarketComptrollerRejection(uint256 errorCode); }
{ "remappings": [ "@pythnetwork/pyth-sdk-solidity/=lib/pyth-crosschain/target_chains/ethereum/sdk/solidity/", "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/", "@api3/contracts/=lib/contracts/contracts/", "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/", "pyth-crosschain/=lib/pyth-crosschain/", "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "shanghai", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"underlying_","type":"address"},{"internalType":"contract ComptrollerInterface","name":"comptroller_","type":"address"},{"internalType":"contract InterestRateModel","name":"interestRateModel_","type":"address"},{"internalType":"uint256","name":"initialExchangeRateMantissa_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"address payable","name":"admin_","type":"address"},{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"bytes","name":"becomeImplementationData","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cashPrior","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interestAccumulated","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"borrowIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"}],"name":"AccrueInterest","type":"event"},{"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":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"borrowAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"}],"name":"Borrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"liquidator","type":"address"},{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"repayAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"cTokenCollateral","type":"address"},{"indexed":false,"internalType":"uint256","name":"seizeTokens","type":"uint256"}],"name":"LiquidateBorrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintTokens","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"NewAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract ComptrollerInterface","name":"oldComptroller","type":"address"},{"indexed":false,"internalType":"contract ComptrollerInterface","name":"newComptroller","type":"address"}],"name":"NewComptroller","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":false,"internalType":"contract InterestRateModel","name":"oldInterestRateModel","type":"address"},{"indexed":false,"internalType":"contract InterestRateModel","name":"newInterestRateModel","type":"address"}],"name":"NewMarketInterestRateModel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldPendingAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newPendingAdmin","type":"address"}],"name":"NewPendingAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldProtocolSeizeShareMantissa","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newProtocolSeizeShareMantissa","type":"uint256"}],"name":"NewProtocolSeizeShare","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldReserveFactorMantissa","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newReserveFactorMantissa","type":"uint256"}],"name":"NewReserveFactor","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"redeemAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redeemTokens","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"payer","type":"address"},{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"repayAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"}],"name":"RepayBorrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"benefactor","type":"address"},{"indexed":false,"internalType":"uint256","name":"addAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalReserves","type":"uint256"}],"name":"ReservesAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"uint256","name":"reduceAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalReserves","type":"uint256"}],"name":"ReservesReduced","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":[],"name":"_acceptAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"addAmount","type":"uint256"}],"name":"_addReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reduceAmount","type":"uint256"}],"name":"_reduceReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ComptrollerInterface","name":"newComptroller","type":"address"}],"name":"_setComptroller","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"bool","name":"allowResign","type":"bool"},{"internalType":"bytes","name":"becomeImplementationData","type":"bytes"}],"name":"_setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract InterestRateModel","name":"newInterestRateModel","type":"address"}],"name":"_setInterestRateModel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newPendingAdmin","type":"address"}],"name":"_setPendingAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newProtocolSeizeShareMantissa","type":"uint256"}],"name":"_setProtocolSeizeShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newReserveFactorMantissa","type":"uint256"}],"name":"_setReserveFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accrualBlockTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accrueInterest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOfUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"borrowAmount","type":"uint256"}],"name":"borrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowRatePerTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"comptroller","outputs":[{"internalType":"contract ComptrollerInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"delegateToImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"delegateToViewImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRateCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exchangeRateStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAccountSnapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"interestRateModel","outputs":[{"internalType":"contract InterestRateModel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isCToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"},{"internalType":"contract CTokenInterface","name":"cTokenCollateral","type":"address"}],"name":"liquidateBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"mintAsCollateral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolSeizeShareMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemTokens","type":"uint256"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemAmount","type":"uint256"}],"name":"redeemUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"repayBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"repayBorrowBehalf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveFactorMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"liquidator","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"seizeTokens","type":"uint256"}],"name":"seize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supplyRatePerTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract EIP20NonStandardInterface","name":"token","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBorrows","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBorrowsCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801562000010575f80fd5b506040516200222d3803806200222d8339810160408190526200003391620003fb565b60038054610100600160a81b0319163361010002179055604051620000a490839062000070908d908d908d908d908d908d908d906024016200052d565b60408051601f198184030181529190526020810180516001600160e01b03908116631a31d46560e01b17909152620000e816565b50620000b2825f8362000160565b5050600380546001600160a01b0390921661010002610100600160a81b031990921691909117905550620005cd95505050505050565b60605f80846001600160a01b03168460405162000106919062000595565b5f60405180830381855af49150503d805f811462000140576040519150601f19603f3d011682016040523d82523d5f602084013e62000145565b606091505b5090925090508162000158573d60208201fd5b949350505050565b60035461010090046001600160a01b03163314620001ea5760405162461bcd60e51b815260206004820152603960248201527f43457263323044656c656761746f723a3a5f736574496d706c656d656e74617460448201527f696f6e3a2043616c6c6572206d7573742062652061646d696e00000000000000606482015260840160405180910390fd5b81156200022c576040805160048152602481019091526020810180516001600160e01b0390811663153ab50560e01b179091526200022a9190620002e716565b505b601380546001600160a01b038581166001600160a01b0319831617909255604051911690620002999062000265908490602401620005b2565b60408051601f198184030181529190526020810180516001600160e01b03908116630adccee560e31b17909152620002e716565b50601354604080516001600160a01b03808516825290921660208301527fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a910160405180910390a150505050565b60135460609062000302906001600160a01b031683620000e8565b92915050565b80516001600160a01b03811681146200031f575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5b83811015620003545781810151838201526020016200033a565b50505f910152565b5f82601f8301126200036c575f80fd5b81516001600160401b038082111562000389576200038962000324565b604051601f8301601f19908116603f01168101908282118183101715620003b457620003b462000324565b81604052838152866020858801011115620003cd575f80fd5b620003e084602083016020890162000338565b9695505050505050565b805160ff811681146200031f575f80fd5b5f805f805f805f805f806101408b8d03121562000416575f80fd5b620004218b62000308565b99506200043160208c0162000308565b98506200044160408c0162000308565b60608c015160808d015191995097506001600160401b038082111562000465575f80fd5b620004738e838f016200035c565b975060a08d015191508082111562000489575f80fd5b620004978e838f016200035c565b9650620004a760c08e01620003ea565b9550620004b760e08e0162000308565b9450620004c86101008e0162000308565b93506101208d0151915080821115620004df575f80fd5b50620004ee8d828e016200035c565b9150509295989b9194979a5092959850565b5f81518084526200051981602086016020860162000338565b601f01601f19169290920160200192915050565b6001600160a01b0388811682528781166020830152861660408201526060810185905260e0608082018190525f90620005699083018662000500565b82810360a08401526200057d818662000500565b91505060ff831660c083015298975050505050505050565b5f8251620005a881846020870162000338565b9190910192915050565b602081525f620005c6602083018462000500565b9392505050565b611c5280620005db5f395ff3fe608060405260043610610334575f3560e01c806373acee98116101aa578063c37f68e2116100f6578063e9c714f211610094578063f5e3c4621161006e578063f5e3c462146109f7578063f851a44014610a16578063fca7820b14610a3a578063fe9c44ae14610a5957610334565b8063e9c714f2146109a5578063f2b3abbd146109b9578063f3fdb15a146109d857610334565b8063cfa99201116100d0578063cfa992011461093e578063d3bd2c7214610953578063db006a7514610967578063dd62ed3e1461098657610334565b8063c37f68e2146108cc578063c5ebeaec1461090b578063cd91801c1461092a57610334565b8063a0712d6811610163578063aa5af0fd1161013d578063aa5af0fd14610865578063b2a02ff11461087a578063b71d1a0c14610899578063bd6d894d146108b857610334565b8063a0712d6814610813578063a6afed9514610832578063a9059cbb1461084657610334565b806373acee9814610779578063830308461461078d578063852a12e3146107ac5780638f840ddd146107cb57806395d89b41146107e057806395dd9193146107f457610334565b80633af9e66911610284578063562d62a311610222578063601a0bf1116101fc578063601a0bf1146107075780636752e702146107265780636f307dc31461073b57806370a082311461075a57610334565b8063562d62a3146106aa5780635c60da1b146106c95780635fe3b567146106e857610334565b80634487152f1161025e5780634487152f146106385780634576b5db1461065757806347bd371814610676578063555bcc401461068b57610334565b80633af9e669146105e65780633b1d21a2146106055780633e9410101461061957610334565b806318160ddd116102f157806323b872dd116102cb57806323b872dd146105465780632608f818146105655780632678224714610584578063313ce567146105bb57610334565b806318160ddd146104fe578063182df0f5146105135780631be195601461052757610334565b806306fdde03146104255780630933c1ed1461044f578063095ea7b31461046e5780630e7527021461049d578063173b9904146104ca57806317bfdfbc146104df575b34156103ad5760405162461bcd60e51b815260206004820152603760248201527f43457263323044656c656761746f723a66616c6c6261636b3a2063616e6e6f7460448201527f2073656e642076616c756520746f2066616c6c6261636b00000000000000000060648201526084015b60405180910390fd5b6013546040515f916001600160a01b0316906103cc908390369061180b565b5f60405180830381855af49150503d805f8114610404576040519150601f19603f3d011682016040523d82523d5f602084013e610409565b606091505b505090506040513d5f823e81801561041f573d82f35b3d82fd5b005b348015610430575f80fd5b50610439610a6d565b6040516104469190611867565b60405180910390f35b34801561045a575f80fd5b50610439610469366004611937565b610af9565b348015610479575f80fd5b5061048d610488366004611980565b610b18565b6040519015158152602001610446565b3480156104a8575f80fd5b506104bc6104b73660046119aa565b610b89565b604051908152602001610446565b3480156104d5575f80fd5b506104bc60085481565b3480156104ea575f80fd5b506104bc6104f93660046119c1565b610bed565b348015610509575f80fd5b506104bc600d5481565b34801561051e575f80fd5b506104bc610c39565b348015610532575f80fd5b506104236105413660046119c1565b610c8b565b348015610551575f80fd5b5061048d6105603660046119dc565b610cd6565b348015610570575f80fd5b506104bc61057f366004611980565b610d50565b34801561058f575f80fd5b506004546105a3906001600160a01b031681565b6040516001600160a01b039091168152602001610446565b3480156105c6575f80fd5b506003546105d49060ff1681565b60405160ff9091168152602001610446565b3480156105f1575f80fd5b506104bc6106003660046119c1565b610db9565b348015610610575f80fd5b506104bc610e05565b348015610624575f80fd5b506104bc6106333660046119aa565b610e3b565b348015610643575f80fd5b50610439610652366004611937565b610e82565b348015610662575f80fd5b506104bc6106713660046119c1565b610f39565b348015610681575f80fd5b506104bc600b5481565b348015610696575f80fd5b506104236106a5366004611a27565b610f85565b3480156106b5575f80fd5b506104bc6106c43660046119aa565b6110f7565b3480156106d4575f80fd5b506013546105a3906001600160a01b031681565b3480156106f3575f80fd5b506005546105a3906001600160a01b031681565b348015610712575f80fd5b506104bc6107213660046119aa565b61113e565b348015610731575f80fd5b506104bc60115481565b348015610746575f80fd5b506012546105a3906001600160a01b031681565b348015610765575f80fd5b506104bc6107743660046119c1565b611185565b348015610784575f80fd5b506104bc6111d1565b348015610798575f80fd5b506104bc6107a73660046119aa565b611207565b3480156107b7575f80fd5b506104bc6107c63660046119aa565b61124e565b3480156107d6575f80fd5b506104bc600c5481565b3480156107eb575f80fd5b50610439611295565b3480156107ff575f80fd5b506104bc61080e3660046119c1565b6112a2565b34801561081e575f80fd5b506104bc61082d3660046119aa565b6112ee565b34801561083d575f80fd5b506104bc611335565b348015610851575f80fd5b5061048d610860366004611980565b61136b565b348015610870575f80fd5b506104bc600a5481565b348015610885575f80fd5b506104bc6108943660046119dc565b6113be565b3480156108a4575f80fd5b506104bc6108b33660046119c1565b61142f565b3480156108c3575f80fd5b506104bc61147b565b3480156108d7575f80fd5b506108eb6108e63660046119c1565b6114b1565b604080519485526020850193909352918301526060820152608001610446565b348015610916575f80fd5b506104bc6109253660046119aa565b61152e565b348015610935575f80fd5b506104bc611575565b348015610949575f80fd5b506104bc60095481565b34801561095e575f80fd5b506104bc6115ab565b348015610972575f80fd5b506104bc6109813660046119aa565b6115e1565b348015610991575f80fd5b506104bc6109a0366004611a85565b611628565b3480156109b0575f80fd5b506104bc61167c565b3480156109c4575f80fd5b506104bc6109d33660046119c1565b6116b2565b3480156109e3575f80fd5b506006546105a3906001600160a01b031681565b348015610a02575f80fd5b506104bc610a11366004611abc565b6116fe565b348015610a21575f80fd5b506003546105a39061010090046001600160a01b031681565b348015610a45575f80fd5b506104bc610a543660046119aa565b611759565b348015610a64575f80fd5b5061048d600181565b60018054610a7a90611afb565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa690611afb565b8015610af15780601f10610ac857610100808354040283529160200191610af1565b820191905f5260205f20905b815481529060010190602001808311610ad457829003601f168201915b505050505081565b601354606090610b12906001600160a01b0316836117a0565b92915050565b6040516001600160a01b0383166024820152604481018290525f908190610b6b9060640160408051601f198184030181529190526020810180516001600160e01b031663095ea7b360e01b179052610af9565b905080806020019051810190610b819190611b33565b949350505050565b5f80610bd083604051602401610ba191815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663073a938160e11b179052610af9565b905080806020019051810190610be69190611b4e565b9392505050565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b03166305eff7ef60e21b179052610af9565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b1790525f908190610c6f90610e82565b905080806020019051810190610c859190611b4e565b91505090565b6040516001600160a01b0382166024820152610cd29060440160408051601f198184030181529190526020810180516001600160e01b031662df0cab60e51b179052610af9565b5050565b6040516001600160a01b03808516602483015283166044820152606481018290525f908190610d319060840160408051601f198184030181529190526020810180516001600160e01b03166323b872dd60e01b179052610af9565b905080806020019051810190610d479190611b33565b95945050505050565b6040516001600160a01b0383166024820152604481018290525f908190610da39060640160408051601f198184030181529190526020810180516001600160e01b03166304c11f0360e31b179052610af9565b905080806020019051810190610b819190611b4e565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b0316633af9e66960e01b179052610af9565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b1790525f908190610c6f90610e82565b5f80610bd083604051602401610e5391815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166303e9410160e41b179052610af9565b60605f80306001600160a01b031684604051602401610ea19190611867565b60408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b17905251610ed69190611b65565b5f60405180830381855afa9150503d805f8114610f0e576040519150601f19603f3d011682016040523d82523d5f602084013e610f13565b606091505b50909250905081610f25573d60208201fd5b80806020019051810190610b819190611b80565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b0316634576b5db60e01b179052610af9565b60035461010090046001600160a01b0316331461100a5760405162461bcd60e51b815260206004820152603960248201527f43457263323044656c656761746f723a3a5f736574496d706c656d656e74617460448201527f696f6e3a2043616c6c6572206d7573742062652061646d696e0000000000000060648201526084016103a4565b8115611044576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b17905261104290610af9565b505b601380546001600160a01b038581166001600160a01b03198316179092556040519116906110a99061107a908490602401611867565b60408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b179052610af9565b50601354604080516001600160a01b03808516825290921660208301527fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a910160405180910390a150505050565b5f80610bd08360405160240161110f91815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663562d62a360e01b179052610af9565b5f80610bd08360405160240161115691815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663601a0bf160e01b179052610af9565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b03166370a0823160e01b179052610e82565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b1790525f908190610c6f90610af9565b5f80610bd08360405160240161121f91815260200190565b60408051601f198184030181529190526020810180516001600160e01b0316634181842360e11b179052610af9565b5f80610bd08360405160240161126691815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663852a12e360e01b179052610af9565b60028054610a7a90611afb565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b03166395dd919360e01b179052610e82565b5f80610bd08360405160240161130691815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663140e25ad60e31b179052610af9565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b1790525f908190610c6f90610af9565b6040516001600160a01b0383166024820152604481018290525f908190610b6b9060640160408051601f198184030181529190526020810180516001600160e01b031663a9059cbb60e01b179052610af9565b6040516001600160a01b03808516602483015283166044820152606481018290525f9081906114199060840160408051601f198184030181529190526020810180516001600160e01b031663b2a02ff160e01b179052610af9565b905080806020019051810190610d479190611b4e565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b0316632dc7468360e21b179052610af9565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b1790525f908190610c6f90610af9565b5f805f805f611508866040516024016114d991906001600160a01b0391909116815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166361bfb47160e11b179052610e82565b90508080602001905181019061151e9190611be9565b9450945094509450509193509193565b5f80610bd08360405160240161154691815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663317afabb60e21b179052610af9565b6040805160048152602481019091526020810180516001600160e01b0316633364600760e21b1790525f908190610c6f90610e82565b6040805160048152602481019091526020810180516001600160e01b03166369de963960e11b1790525f908190610c6f90610e82565b5f80610bd0836040516024016115f991815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663db006a7560e01b179052610af9565b6040516001600160a01b038084166024830152821660448201525f908190610da39060640160408051601f198184030181529190526020810180516001600160e01b0316636eb1769f60e11b179052610e82565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b1790525f908190610c6f90610af9565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b031663f2b3abbd60e01b179052610af9565b6040516001600160a01b03808516602483015260448201849052821660648201525f9081906114199060840160408051601f198184030181529190526020810180516001600160e01b0316637af1e23160e11b179052610af9565b5f80610bd08360405160240161177191815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663fca7820b60e01b179052610af9565b60605f80846001600160a01b0316846040516117bc9190611b65565b5f60405180830381855af49150503d805f81146117f4576040519150601f19603f3d011682016040523d82523d5f602084013e6117f9565b606091505b50909250905081610b81573d60208201fd5b818382375f9101908152919050565b5f5b8381101561183457818101518382015260200161181c565b50505f910152565b5f815180845261185381602086016020860161181a565b601f01601f19169290920160200192915050565b602081525f610be6602083018461183c565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156118b6576118b6611879565b604052919050565b5f67ffffffffffffffff8211156118d7576118d7611879565b50601f01601f191660200190565b5f82601f8301126118f4575f80fd5b8135611907611902826118be565b61188d565b81815284602083860101111561191b575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611947575f80fd5b813567ffffffffffffffff81111561195d575f80fd5b610b81848285016118e5565b6001600160a01b038116811461197d575f80fd5b50565b5f8060408385031215611991575f80fd5b823561199c81611969565b946020939093013593505050565b5f602082840312156119ba575f80fd5b5035919050565b5f602082840312156119d1575f80fd5b8135610be681611969565b5f805f606084860312156119ee575f80fd5b83356119f981611969565b92506020840135611a0981611969565b929592945050506040919091013590565b801515811461197d575f80fd5b5f805f60608486031215611a39575f80fd5b8335611a4481611969565b92506020840135611a5481611a1a565b9150604084013567ffffffffffffffff811115611a6f575f80fd5b611a7b868287016118e5565b9150509250925092565b5f8060408385031215611a96575f80fd5b8235611aa181611969565b91506020830135611ab181611969565b809150509250929050565b5f805f60608486031215611ace575f80fd5b8335611ad981611969565b9250602084013591506040840135611af081611969565b809150509250925092565b600181811c90821680611b0f57607f821691505b602082108103611b2d57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215611b43575f80fd5b8151610be681611a1a565b5f60208284031215611b5e575f80fd5b5051919050565b5f8251611b7681846020870161181a565b9190910192915050565b5f60208284031215611b90575f80fd5b815167ffffffffffffffff811115611ba6575f80fd5b8201601f81018413611bb6575f80fd5b8051611bc4611902826118be565b818152856020838501011115611bd8575f80fd5b610d4782602083016020860161181a565b5f805f8060808587031215611bfc575f80fd5b50508251602084015160408501516060909501519196909550909250905056fea2646970667358221220cf24a1af406d3a808bfaec74e3d2471a5cd7fd5fb374cb1eafb2b35e8216404d64736f6c6343000816003300000000000000000000000050c42deacd8fc9773493ed674b675be577f2634b000000000000000000000000646f91abd5ab94b76d1f9c5d9490a2f6ddf257300000000000000000000000005d2526ef306e85a51ebef9883ec9d00e5b12b394000000000000000000000000000000000000000000a56fa5b99019a5c80000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000080000000000000000000000009a74a959ab5f706c1dff414f580560287fcb757600000000000000000000000088e3ca445774687b91258d0ecd720458f401cf4f00000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000094d61636820574554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000563574554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405260043610610334575f3560e01c806373acee98116101aa578063c37f68e2116100f6578063e9c714f211610094578063f5e3c4621161006e578063f5e3c462146109f7578063f851a44014610a16578063fca7820b14610a3a578063fe9c44ae14610a5957610334565b8063e9c714f2146109a5578063f2b3abbd146109b9578063f3fdb15a146109d857610334565b8063cfa99201116100d0578063cfa992011461093e578063d3bd2c7214610953578063db006a7514610967578063dd62ed3e1461098657610334565b8063c37f68e2146108cc578063c5ebeaec1461090b578063cd91801c1461092a57610334565b8063a0712d6811610163578063aa5af0fd1161013d578063aa5af0fd14610865578063b2a02ff11461087a578063b71d1a0c14610899578063bd6d894d146108b857610334565b8063a0712d6814610813578063a6afed9514610832578063a9059cbb1461084657610334565b806373acee9814610779578063830308461461078d578063852a12e3146107ac5780638f840ddd146107cb57806395d89b41146107e057806395dd9193146107f457610334565b80633af9e66911610284578063562d62a311610222578063601a0bf1116101fc578063601a0bf1146107075780636752e702146107265780636f307dc31461073b57806370a082311461075a57610334565b8063562d62a3146106aa5780635c60da1b146106c95780635fe3b567146106e857610334565b80634487152f1161025e5780634487152f146106385780634576b5db1461065757806347bd371814610676578063555bcc401461068b57610334565b80633af9e669146105e65780633b1d21a2146106055780633e9410101461061957610334565b806318160ddd116102f157806323b872dd116102cb57806323b872dd146105465780632608f818146105655780632678224714610584578063313ce567146105bb57610334565b806318160ddd146104fe578063182df0f5146105135780631be195601461052757610334565b806306fdde03146104255780630933c1ed1461044f578063095ea7b31461046e5780630e7527021461049d578063173b9904146104ca57806317bfdfbc146104df575b34156103ad5760405162461bcd60e51b815260206004820152603760248201527f43457263323044656c656761746f723a66616c6c6261636b3a2063616e6e6f7460448201527f2073656e642076616c756520746f2066616c6c6261636b00000000000000000060648201526084015b60405180910390fd5b6013546040515f916001600160a01b0316906103cc908390369061180b565b5f60405180830381855af49150503d805f8114610404576040519150601f19603f3d011682016040523d82523d5f602084013e610409565b606091505b505090506040513d5f823e81801561041f573d82f35b3d82fd5b005b348015610430575f80fd5b50610439610a6d565b6040516104469190611867565b60405180910390f35b34801561045a575f80fd5b50610439610469366004611937565b610af9565b348015610479575f80fd5b5061048d610488366004611980565b610b18565b6040519015158152602001610446565b3480156104a8575f80fd5b506104bc6104b73660046119aa565b610b89565b604051908152602001610446565b3480156104d5575f80fd5b506104bc60085481565b3480156104ea575f80fd5b506104bc6104f93660046119c1565b610bed565b348015610509575f80fd5b506104bc600d5481565b34801561051e575f80fd5b506104bc610c39565b348015610532575f80fd5b506104236105413660046119c1565b610c8b565b348015610551575f80fd5b5061048d6105603660046119dc565b610cd6565b348015610570575f80fd5b506104bc61057f366004611980565b610d50565b34801561058f575f80fd5b506004546105a3906001600160a01b031681565b6040516001600160a01b039091168152602001610446565b3480156105c6575f80fd5b506003546105d49060ff1681565b60405160ff9091168152602001610446565b3480156105f1575f80fd5b506104bc6106003660046119c1565b610db9565b348015610610575f80fd5b506104bc610e05565b348015610624575f80fd5b506104bc6106333660046119aa565b610e3b565b348015610643575f80fd5b50610439610652366004611937565b610e82565b348015610662575f80fd5b506104bc6106713660046119c1565b610f39565b348015610681575f80fd5b506104bc600b5481565b348015610696575f80fd5b506104236106a5366004611a27565b610f85565b3480156106b5575f80fd5b506104bc6106c43660046119aa565b6110f7565b3480156106d4575f80fd5b506013546105a3906001600160a01b031681565b3480156106f3575f80fd5b506005546105a3906001600160a01b031681565b348015610712575f80fd5b506104bc6107213660046119aa565b61113e565b348015610731575f80fd5b506104bc60115481565b348015610746575f80fd5b506012546105a3906001600160a01b031681565b348015610765575f80fd5b506104bc6107743660046119c1565b611185565b348015610784575f80fd5b506104bc6111d1565b348015610798575f80fd5b506104bc6107a73660046119aa565b611207565b3480156107b7575f80fd5b506104bc6107c63660046119aa565b61124e565b3480156107d6575f80fd5b506104bc600c5481565b3480156107eb575f80fd5b50610439611295565b3480156107ff575f80fd5b506104bc61080e3660046119c1565b6112a2565b34801561081e575f80fd5b506104bc61082d3660046119aa565b6112ee565b34801561083d575f80fd5b506104bc611335565b348015610851575f80fd5b5061048d610860366004611980565b61136b565b348015610870575f80fd5b506104bc600a5481565b348015610885575f80fd5b506104bc6108943660046119dc565b6113be565b3480156108a4575f80fd5b506104bc6108b33660046119c1565b61142f565b3480156108c3575f80fd5b506104bc61147b565b3480156108d7575f80fd5b506108eb6108e63660046119c1565b6114b1565b604080519485526020850193909352918301526060820152608001610446565b348015610916575f80fd5b506104bc6109253660046119aa565b61152e565b348015610935575f80fd5b506104bc611575565b348015610949575f80fd5b506104bc60095481565b34801561095e575f80fd5b506104bc6115ab565b348015610972575f80fd5b506104bc6109813660046119aa565b6115e1565b348015610991575f80fd5b506104bc6109a0366004611a85565b611628565b3480156109b0575f80fd5b506104bc61167c565b3480156109c4575f80fd5b506104bc6109d33660046119c1565b6116b2565b3480156109e3575f80fd5b506006546105a3906001600160a01b031681565b348015610a02575f80fd5b506104bc610a11366004611abc565b6116fe565b348015610a21575f80fd5b506003546105a39061010090046001600160a01b031681565b348015610a45575f80fd5b506104bc610a543660046119aa565b611759565b348015610a64575f80fd5b5061048d600181565b60018054610a7a90611afb565b80601f0160208091040260200160405190810160405280929190818152602001828054610aa690611afb565b8015610af15780601f10610ac857610100808354040283529160200191610af1565b820191905f5260205f20905b815481529060010190602001808311610ad457829003601f168201915b505050505081565b601354606090610b12906001600160a01b0316836117a0565b92915050565b6040516001600160a01b0383166024820152604481018290525f908190610b6b9060640160408051601f198184030181529190526020810180516001600160e01b031663095ea7b360e01b179052610af9565b905080806020019051810190610b819190611b33565b949350505050565b5f80610bd083604051602401610ba191815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663073a938160e11b179052610af9565b905080806020019051810190610be69190611b4e565b9392505050565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b03166305eff7ef60e21b179052610af9565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b1790525f908190610c6f90610e82565b905080806020019051810190610c859190611b4e565b91505090565b6040516001600160a01b0382166024820152610cd29060440160408051601f198184030181529190526020810180516001600160e01b031662df0cab60e51b179052610af9565b5050565b6040516001600160a01b03808516602483015283166044820152606481018290525f908190610d319060840160408051601f198184030181529190526020810180516001600160e01b03166323b872dd60e01b179052610af9565b905080806020019051810190610d479190611b33565b95945050505050565b6040516001600160a01b0383166024820152604481018290525f908190610da39060640160408051601f198184030181529190526020810180516001600160e01b03166304c11f0360e31b179052610af9565b905080806020019051810190610b819190611b4e565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b0316633af9e66960e01b179052610af9565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b1790525f908190610c6f90610e82565b5f80610bd083604051602401610e5391815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166303e9410160e41b179052610af9565b60605f80306001600160a01b031684604051602401610ea19190611867565b60408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b17905251610ed69190611b65565b5f60405180830381855afa9150503d805f8114610f0e576040519150601f19603f3d011682016040523d82523d5f602084013e610f13565b606091505b50909250905081610f25573d60208201fd5b80806020019051810190610b819190611b80565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b0316634576b5db60e01b179052610af9565b60035461010090046001600160a01b0316331461100a5760405162461bcd60e51b815260206004820152603960248201527f43457263323044656c656761746f723a3a5f736574496d706c656d656e74617460448201527f696f6e3a2043616c6c6572206d7573742062652061646d696e0000000000000060648201526084016103a4565b8115611044576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b17905261104290610af9565b505b601380546001600160a01b038581166001600160a01b03198316179092556040519116906110a99061107a908490602401611867565b60408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b179052610af9565b50601354604080516001600160a01b03808516825290921660208301527fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a910160405180910390a150505050565b5f80610bd08360405160240161110f91815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663562d62a360e01b179052610af9565b5f80610bd08360405160240161115691815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663601a0bf160e01b179052610af9565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b03166370a0823160e01b179052610e82565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b1790525f908190610c6f90610af9565b5f80610bd08360405160240161121f91815260200190565b60408051601f198184030181529190526020810180516001600160e01b0316634181842360e11b179052610af9565b5f80610bd08360405160240161126691815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663852a12e360e01b179052610af9565b60028054610a7a90611afb565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b03166395dd919360e01b179052610e82565b5f80610bd08360405160240161130691815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663140e25ad60e31b179052610af9565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b1790525f908190610c6f90610af9565b6040516001600160a01b0383166024820152604481018290525f908190610b6b9060640160408051601f198184030181529190526020810180516001600160e01b031663a9059cbb60e01b179052610af9565b6040516001600160a01b03808516602483015283166044820152606481018290525f9081906114199060840160408051601f198184030181529190526020810180516001600160e01b031663b2a02ff160e01b179052610af9565b905080806020019051810190610d479190611b4e565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b0316632dc7468360e21b179052610af9565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b1790525f908190610c6f90610af9565b5f805f805f611508866040516024016114d991906001600160a01b0391909116815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166361bfb47160e11b179052610e82565b90508080602001905181019061151e9190611be9565b9450945094509450509193509193565b5f80610bd08360405160240161154691815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663317afabb60e21b179052610af9565b6040805160048152602481019091526020810180516001600160e01b0316633364600760e21b1790525f908190610c6f90610e82565b6040805160048152602481019091526020810180516001600160e01b03166369de963960e11b1790525f908190610c6f90610e82565b5f80610bd0836040516024016115f991815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663db006a7560e01b179052610af9565b6040516001600160a01b038084166024830152821660448201525f908190610da39060640160408051601f198184030181529190526020810180516001600160e01b0316636eb1769f60e11b179052610e82565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b1790525f908190610c6f90610af9565b6040516001600160a01b03821660248201525f908190610bd09060440160408051601f198184030181529190526020810180516001600160e01b031663f2b3abbd60e01b179052610af9565b6040516001600160a01b03808516602483015260448201849052821660648201525f9081906114199060840160408051601f198184030181529190526020810180516001600160e01b0316637af1e23160e11b179052610af9565b5f80610bd08360405160240161177191815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663fca7820b60e01b179052610af9565b60605f80846001600160a01b0316846040516117bc9190611b65565b5f60405180830381855af49150503d805f81146117f4576040519150601f19603f3d011682016040523d82523d5f602084013e6117f9565b606091505b50909250905081610b81573d60208201fd5b818382375f9101908152919050565b5f5b8381101561183457818101518382015260200161181c565b50505f910152565b5f815180845261185381602086016020860161181a565b601f01601f19169290920160200192915050565b602081525f610be6602083018461183c565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff811182821017156118b6576118b6611879565b604052919050565b5f67ffffffffffffffff8211156118d7576118d7611879565b50601f01601f191660200190565b5f82601f8301126118f4575f80fd5b8135611907611902826118be565b61188d565b81815284602083860101111561191b575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611947575f80fd5b813567ffffffffffffffff81111561195d575f80fd5b610b81848285016118e5565b6001600160a01b038116811461197d575f80fd5b50565b5f8060408385031215611991575f80fd5b823561199c81611969565b946020939093013593505050565b5f602082840312156119ba575f80fd5b5035919050565b5f602082840312156119d1575f80fd5b8135610be681611969565b5f805f606084860312156119ee575f80fd5b83356119f981611969565b92506020840135611a0981611969565b929592945050506040919091013590565b801515811461197d575f80fd5b5f805f60608486031215611a39575f80fd5b8335611a4481611969565b92506020840135611a5481611a1a565b9150604084013567ffffffffffffffff811115611a6f575f80fd5b611a7b868287016118e5565b9150509250925092565b5f8060408385031215611a96575f80fd5b8235611aa181611969565b91506020830135611ab181611969565b809150509250929050565b5f805f60608486031215611ace575f80fd5b8335611ad981611969565b9250602084013591506040840135611af081611969565b809150509250925092565b600181811c90821680611b0f57607f821691505b602082108103611b2d57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215611b43575f80fd5b8151610be681611a1a565b5f60208284031215611b5e575f80fd5b5051919050565b5f8251611b7681846020870161181a565b9190910192915050565b5f60208284031215611b90575f80fd5b815167ffffffffffffffff811115611ba6575f80fd5b8201601f81018413611bb6575f80fd5b8051611bc4611902826118be565b818152856020838501011115611bd8575f80fd5b610d4782602083016020860161181a565b5f805f8060808587031215611bfc575f80fd5b50508251602084015160408501516060909501519196909550909250905056fea2646970667358221220cf24a1af406d3a808bfaec74e3d2471a5cd7fd5fb374cb1eafb2b35e8216404d64736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000050c42deacd8fc9773493ed674b675be577f2634b000000000000000000000000646f91abd5ab94b76d1f9c5d9490a2f6ddf257300000000000000000000000005d2526ef306e85a51ebef9883ec9d00e5b12b394000000000000000000000000000000000000000000a56fa5b99019a5c80000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000080000000000000000000000009a74a959ab5f706c1dff414f580560287fcb757600000000000000000000000088e3ca445774687b91258d0ecd720458f401cf4f00000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000094d61636820574554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000563574554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : underlying_ (address): 0x50c42dEAcD8Fc9773493ED674b675bE577f2634b
Arg [1] : comptroller_ (address): 0x646F91AbD5Ab94B76d1F9C5D9490A2f6DDf25730
Arg [2] : interestRateModel_ (address): 0x5d2526EF306E85A51eBef9883Ec9d00e5b12B394
Arg [3] : initialExchangeRateMantissa_ (uint256): 200000000000000000000000000
Arg [4] : name_ (string): Mach WETH
Arg [5] : symbol_ (string): cWETH
Arg [6] : decimals_ (uint8): 8
Arg [7] : admin_ (address): 0x9A74A959Ab5F706c1DFf414F580560287FcB7576
Arg [8] : implementation_ (address): 0x88e3cA445774687B91258D0ECd720458f401CF4f
Arg [9] : becomeImplementationData (bytes): 0x
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 00000000000000000000000050c42deacd8fc9773493ed674b675be577f2634b
Arg [1] : 000000000000000000000000646f91abd5ab94b76d1f9c5d9490a2f6ddf25730
Arg [2] : 0000000000000000000000005d2526ef306e85a51ebef9883ec9d00e5b12b394
Arg [3] : 000000000000000000000000000000000000000000a56fa5b99019a5c8000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [7] : 0000000000000000000000009a74a959ab5f706c1dff414f580560287fcb7576
Arg [8] : 00000000000000000000000088e3ca445774687b91258d0ecd720458f401cf4f
Arg [9] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [11] : 4d61636820574554480000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [13] : 6357455448000000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000000
[ 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.