Contract 0xDB89487A449274478e984665b8692AfC67459deF 1

 
 
Txn Hash
Method
Block
From
To
Value
0xa5866354ea426cdbf35689f5c9f362fb035370386e4d0efc97022a0566b9daeb0x60806040154772532022-09-05 10:13:4788 days 6 hrs ago0xdc6d052700a2bb1f45852a65acb61c194ef09b61 IN  Create: EthereumProposalPayload0 Ether0.0082073510
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EthereumProposalPayload

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : EthereumProposalPayload.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

import {IERC20} from './interfaces/IERC20.sol';
import {ICollectorController} from './interfaces/ICollectorController.sol';
import {IProposalGenericExecutor} from './IProposalGenericExecutor.sol';

contract EthereumProposalPayload is IProposalGenericExecutor {
  address public constant AAVE_COMPANIES_ADDRESS = 0x1c037b3C22240048807cC9d7111be5d455F640bd;

  ICollectorController public constant CONTROLLER_OF_COLLECTOR =
    ICollectorController(0x3d569673dAa0575c936c7c67c4E6AedA69CC630C);

  address public constant COLLECTOR_ADDRESS = 0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c;
  address public constant ECOSYSTEM_RESERVE_ADDRESS = 0x25F2226B597E8F9514B3F68F00f494cF4f286491;

  IERC20 public constant AAVE = IERC20(0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9);
  uint256 public constant AAVE_AMOUNT = 76196367343821000000000; // 76196.367343821000000000 AAVE

  function execute() external override {
    address[3] memory STABLES = [
      0xBcca60bB61934080951369a648Fb03DF4F96263C, // aUSDC
      0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811, // aUSDT
      0x028171bCA77440897B824Ca71D1c56caC55b68A3 // aDAI
    ];

    uint256[] memory STABLES_AMOUNTS = new uint256[](3);
    STABLES_AMOUNTS[0] = 2783066720000; // 2783066.720000 aUSDC
    STABLES_AMOUNTS[1] = 1036828780000; // 1036828.780000 aUSDT
    STABLES_AMOUNTS[2] = 1637098070000000000000000; // 1637098.070000000000000000 aDAI

    address[8] memory ALT_STABLES = [
      0x6C5024Cd4F8A59110119C56f8933403A539555EB, // aSUSD
      0x101cc05f4A51C0319f570d5E146a8C625198e636, // aTUSD
      0x0000000000085d4780B73119b644AE5ecd22b376, // TUSD
      0xd4937682df3C8aEF4FE912A96A74121C0829E664, // aFRAX
      0xA361718326c15715591c299427c62086F69923D9, // aBUSD
      0x4Fabb145d64652a948d72533023f6E7A623C7C53, // BUSD
      0xD37EE7e4f452C6638c96536e68090De8cBcdb583, // aGUSD
      0x2e8F4bdbE3d47d7d7DE490437AeA9915D930F1A3 // aUSDP
    ];

    uint256[] memory ALT_STABLES_AMOUNTS = new uint256[](8);
    ALT_STABLES_AMOUNTS[0] = 463358329101236000000000; // 463358.329101236000000000 aSUSD
    ALT_STABLES_AMOUNTS[1] = 292927660000000000000000; // 292927.660000000000000000 aTUSD
    ALT_STABLES_AMOUNTS[2] = 88141398944950200000; // 88.141398944950200000 TUSD
    ALT_STABLES_AMOUNTS[3] = 154992100000000000000000; // 154992.100000000000000000 aFRAX
    ALT_STABLES_AMOUNTS[4] = 130399257102886000000000; // 130399.257102886000000000 aBUSD
    ALT_STABLES_AMOUNTS[5] = 350362897113999000000; // 350.362897113999000000 BUSD
    ALT_STABLES_AMOUNTS[6] = 8635430; // 86354.30 aGUSD
    ALT_STABLES_AMOUNTS[7] = 26871320000000000000000; // 26871.320000000000000000 aPAX

    address[19] memory VOLATILE_ASSETS = [
      0x8dAE6Cb04688C62d939ed9B68d32Bc62e49970b1, // aCRV
      0x030bA81f1c18d280636F32af80b9AAd02Cf0854e, // aWETH
      0x9ff58f4fFB29fA2266Ab25e75e2A8b3503311656, // aWBTC
      0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599, // WBTC
      0x35f6B052C598d933D69A4EEC4D04c73A191fE6c2, // aSNX
      0xc9BC48c72154ef3e5425641a3c747242112a46AF, // aRAI
      0xa685a61171bb30d4072B338c80Cb7b2c865c873E, // aMANA
      0xa06bC25B5805d5F8d82847D191Cb4Af5A3e873E0, // aLINK
      0x5165d24277cD063F5ac44Efd447B27025e888f37, // aYFI
      0x952749E07d7157bb9644A894dFAF3Bad5eF6D918, // aCVX
      0xc713e5E149D5D0715DcD1c156a020976e7E56B88, // aMKR
      0x39C6b3e42d6A679d7D776778Fe880BC9487C2EDA, // aKNC
      0xdd974D5C2e2928deA5F71b9825b8b646686BD200, // KNC
      0xB9D7CB55f463405CDfBe4E90a6D2Df01C2B92BF1, // aUNI
      0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984, // UNI
      0xaC6Df26a590F08dcC95D5a4705ae8abbc88509Ef, // aENJ
      0xF256CC7847E919FAc9B808cC216cAc87CCF2f47a, // aXSUSHI
      0x05Ec93c0365baAeAbF7AefFb0972ea7ECdD39CF1, // aBAT
      0xCC12AbE4ff81c9378D670De1b57F8e0Dd228D77a // aREN
    ];

    uint256[] memory VOLATILE_ASSETS_AMOUNTS = new uint256[](19);
    VOLATILE_ASSETS_AMOUNTS[0] = 509732680000000000000000; // 509732.680000000000000000 aCRV
    VOLATILE_ASSETS_AMOUNTS[1] = 350000000000000000000; // 350.000000000000000000 aWETH
    VOLATILE_ASSETS_AMOUNTS[2] = 338855085; // 3.38855085 aWBTC
    VOLATILE_ASSETS_AMOUNTS[3] = 44577014; // 0.44577014 WBTC
    VOLATILE_ASSETS_AMOUNTS[4] = 96251920000000000000000; // 96251.920000000000000000 aSNX
    VOLATILE_ASSETS_AMOUNTS[5] = 66094610000000000000000; // 66094.610000000000000000 aRAI
    VOLATILE_ASSETS_AMOUNTS[6] = 103234630000000000000000; // 103234.630000000000000000 aMANA
    VOLATILE_ASSETS_AMOUNTS[7] = 12053480000000000000000; // 12053.480000000000000000 aLINK
    VOLATILE_ASSETS_AMOUNTS[8] = 7080000000000000000; // 7.080000000000000000 aYFI
    VOLATILE_ASSETS_AMOUNTS[9] = 5137260000000000000000; // 5137.260000000000000000 aCVX
    VOLATILE_ASSETS_AMOUNTS[10] = 30360000000000000000; // 30.360000000000000000 aMKR
    VOLATILE_ASSETS_AMOUNTS[11] = 11236269638020000000000; // 11236.269638020000000000 aKNC
    VOLATILE_ASSETS_AMOUNTS[12] = 795220361980000000000; // 795.220361980000000000 KNC
    VOLATILE_ASSETS_AMOUNTS[13] = 1681265487372400000000; // 1681.265487372400000000 aUNI
    VOLATILE_ASSETS_AMOUNTS[14] = 4394512627600080000; // 4.394512627600080000 UNI
    VOLATILE_ASSETS_AMOUNTS[15] = 7242480000000000000000; // 7242.480000000000000000 aENJ
    VOLATILE_ASSETS_AMOUNTS[16] = 2331216007307700000000; // 2331.216007307700000000 aXSUSHI
    VOLATILE_ASSETS_AMOUNTS[17] = 6395160000000000000000; // 6395.160000000000000000 aBAT
    VOLATILE_ASSETS_AMOUNTS[18] = 15300170000000000000000; // 15300.170000000000000000 aREN

    // 1. Transfer AAVE
    CONTROLLER_OF_COLLECTOR.transfer(
      ECOSYSTEM_RESERVE_ADDRESS,
      AAVE,
      AAVE_COMPANIES_ADDRESS,
      AAVE_AMOUNT
    );

    // 2. Transfer stables
    for (uint256 i = 0; i < STABLES.length; i++) {
      CONTROLLER_OF_COLLECTOR.transfer(
        COLLECTOR_ADDRESS,
        IERC20(STABLES[i]),
        AAVE_COMPANIES_ADDRESS,
        STABLES_AMOUNTS[i]
      );
    }

    // 3. Transfer alternative stables
    for (uint256 i = 0; i < ALT_STABLES.length; i++) {
      CONTROLLER_OF_COLLECTOR.transfer(
        COLLECTOR_ADDRESS,
        IERC20(ALT_STABLES[i]),
        AAVE_COMPANIES_ADDRESS,
        ALT_STABLES_AMOUNTS[i]
      );
    }

    // 4. Transfer volatile assets
    for (uint256 i = 0; i < VOLATILE_ASSETS.length; i++) {
      CONTROLLER_OF_COLLECTOR.transfer(
        COLLECTOR_ADDRESS,
        IERC20(VOLATILE_ASSETS[i]),
        AAVE_COMPANIES_ADDRESS,
        VOLATILE_ASSETS_AMOUNTS[i]
      );
    }

    emit ProposalExecuted();
  }
}

File 2 of 4 : IERC20.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
  /**
   * @dev Returns the amount of tokens in existence.
   */
  function totalSupply() external view returns (uint256);

  /**
   * @dev Returns the amount of tokens owned by `account`.
   */
  function balanceOf(address account) external view returns (uint256);

  /**
   * @dev Moves `amount` tokens from the caller's account to `recipient`.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * Emits a {Transfer} event.
   */
  function transfer(address recipient, uint256 amount) external returns (bool);

  /**
   * @dev Returns the remaining number of tokens that `spender` will be
   * allowed to spend on behalf of `owner` through {transferFrom}. This is
   * zero by default.
   *
   * This value changes when {approve} or {transferFrom} are called.
   */
  function allowance(address owner, address spender) external view returns (uint256);

  /**
   * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * IMPORTANT: Beware that changing an allowance with this method brings the risk
   * that someone may use both the old and the new allowance by unfortunate
   * transaction ordering. One possible solution to mitigate this race
   * condition is to first reduce the spender's allowance to 0 and set the
   * desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   *
   * Emits an {Approval} event.
   */
  function approve(address spender, uint256 amount) external returns (bool);

  /**
   * @dev Moves `amount` tokens from `sender` to `recipient` using the
   * allowance mechanism. `amount` is then deducted from the caller's
   * allowance.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * Emits a {Transfer} event.
   */
  function transferFrom(
    address sender,
    address recipient,
    uint256 amount
  ) external returns (bool);

  /**
   * @dev Emitted when `value` tokens are moved from one account (`from`) to
   * another (`to`).
   *
   * Note that `value` may be zero.
   */
  event Transfer(address indexed from, address indexed to, uint256 value);

  /**
   * @dev Emitted when the allowance of a `spender` for an `owner` is set by
   * a call to {approve}. `value` is the new allowance.
   */
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 3 of 4 : ICollectorController.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IERC20} from './IERC20.sol';

interface ICollectorController {
  /**
   * @dev Transfer an amount of tokens to the recipient.
   * @param collector The address of the collector contract to retrieve funds from (e.g. Aave ecosystem reserve)
   * @param token The address of the asset
   * @param recipient The address of the entity to transfer the tokens.
   * @param amount The amount to be transferred.
   */
  function transfer(
    address collector,
    IERC20 token,
    address recipient,
    uint256 amount
  ) external;
}

File 4 of 4 : IProposalGenericExecutor.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;

interface IProposalGenericExecutor {
  function execute() external;

  event ProposalExecuted();
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "berlin",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[],"name":"ProposalExecuted","type":"event"},{"inputs":[],"name":"AAVE","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AAVE_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AAVE_COMPANIES_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COLLECTOR_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONTROLLER_OF_COLLECTOR","outputs":[{"internalType":"contract ICollectorController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ECOSYSTEM_RESERVE_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610de3806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063614619541161005b57806361461954146100f05780636c0722da146100fa578063a402397914610115578063aef8b6ab1461013457600080fd5b80632e9dc8831461008257806348ccda3c146100ba57806351e615ff146100d5575b600080fd5b61009d7325f2226b597e8f9514b3f68f00f494cf4f28649181565b6040516001600160a01b0390911681526020015b60405180910390f35b61009d737fc66500c84a76ad7e9c93437bfc5ac33e2ddae981565b61009d731c037b3c22240048807cc9d7111be5d455f640bd81565b6100f861014f565b005b61009d733d569673daa0575c936c7c67c4e6aeda69cc630c81565b6101266910229d04898c8933c20081565b6040519081526020016100b1565b61009d73464c71f6c2f760dda6093dcb91c24c39e5d6e18c81565b6040805160608101825273bcca60bb61934080951369a648fb03df4f96263c8152733ed3b47dd13ec9a98b44e6204a523e766b225811602082015273028171bca77440897b824ca71d1c56cac55b68a3818301528151600380825260808201909352909160009190816020016020820280368337019050509050650287fbb40700816000815181106101e3576101e3610d44565b60200260200101818152505064f167cfa5e08160018151811061020857610208610d44565b6020026020010181815250506a015aab43a2d3afb7af00008160028151811061023357610233610d44565b602090810291909101810191909152604080516101008082018352736c5024cd4f8a59110119c56f8933403a539555eb825273101cc05f4a51c0319f570d5e146a8c625198e636828501526e085d4780b73119b644ae5ecd22b3768284015273d4937682df3c8aef4fe912a96a74121c0829e664606083015273a361718326c15715591c299427c62086f69923d96080830152734fabb145d64652a948d72533023f6e7a623c7c5360a083015273d37ee7e4f452c6638c96536e68090de8cbcdb58360c0830152732e8f4bdbe3d47d7d7de490437aea9915d930f1a360e0830152825160088082526101208201909452919360009391908301908036833701905050905069621eb491fbee542408008160008151811061035557610355610d44565b602002602001018181525050693e07a3e894bde15e00008160018151811061037f5761037f610d44565b6020026020010181815250506804c7352758e7bf26c0816002815181106103a8576103a8610d44565b6020026020010181815250506920d22379c6a8ed4a0000816003815181106103d2576103d2610d44565b602002602001018181525050691b9cf5386a3360ddfc00816004815181106103fc576103fc610d44565b6020026020010181815250506812fe430e9f7ca4c1c08160058151811061042557610425610d44565b6020026020010181815250506283c4268160068151811061044857610448610d44565b6020026020010181815250506905b0b27a21a5199c00008160078151811061047257610472610d44565b602090810291909101810191909152604080516102608082018352738dae6cb04688c62d939ed9b68d32bc62e49970b1825273030ba81f1c18d280636f32af80b9aad02cf0854e82850152739ff58f4ffb29fa2266ab25e75e2a8b350331165682840152732260fac5e5542a773aa44fbcfedf7c193bc2c59960608301527335f6b052c598d933d69a4eec4d04c73a191fe6c2608083015273c9bc48c72154ef3e5425641a3c747242112a46af60a083015273a685a61171bb30d4072b338c80cb7b2c865c873e60c083015273a06bc25b5805d5f8d82847d191cb4af5a3e873e060e0830152735165d24277cd063f5ac44efd447b27025e888f3761010083015273952749e07d7157bb9644a894dfaf3bad5ef6d91861012083015273c713e5e149d5d0715dcd1c156a020976e7e56b886101408301527339c6b3e42d6a679d7d776778fe880bc9487c2eda61016083015273dd974d5c2e2928dea5f71b9825b8b646686bd20061018083015273b9d7cb55f463405cdfbe4e90a6d2df01c2b92bf16101a0830152731f9840a85d5af5bf1d1762f925bdaddc4201f9846101c083015273ac6df26a590f08dcc95d5a4705ae8abbc88509ef6101e083015273f256cc7847e919fac9b808cc216cac87ccf2f47a6102008301527305ec93c0365baaeabf7aeffb0972ea7ecdd39cf161022083015273cc12abe4ff81c9378d670de1b57f8e0dd228d77a6102408301528251601380825261028082019094529193600093919083019080368337019050509050696bf0a9f8c483f5540000816000815181106106c2576106c2610d44565b6020026020010181815250506812f939c99edab80000816001815181106106eb576106eb610d44565b60200260200101818152505063143284ad8160028151811061070f5761070f610d44565b6020026020010181815250506302a830f68160038151811061073357610733610d44565b602002602001018181525050691461d3b8cb78c46800008160048151811061075d5761075d610d44565b602002602001018181525050690dfefef90abf7cf500008160058151811061078757610787610d44565b6020026020010181815250506915dc5c4a207d14470000816006815181106107b1576107b1610d44565b60200260200101818152505069028d6ba345ed0b640000816007815181106107db576107db610d44565b602002602001018181525050676241367d11c400008160088151811061080357610803610d44565b6020026020010181815250506901167dcddfa1473e00008160098151811061082d5761082d610d44565b6020026020010181815250506801a554632554dc000081600a8151811061085657610856610d44565b6020026020010181815250506902611e90d778a11a280081600b8151811061088057610880610d44565b602002602001018181525050682b1be641f67772d80081600c815181106108a9576108a9610d44565b602002602001018181525050685b243ee509f3e4fc0081600d815181106108d2576108d2610d44565b602002602001018181525050673cfc71f3a1123c8081600e815181106108fa576108fa610d44565b6020026020010181815250506901889d99c3b24718000081600f8151811061092457610924610d44565b602002602001018181525050687e601eff55a7e4d5008160108151811061094d5761094d610d44565b60200260200101818152505069015aaeac68fd7b1c00008160118151811061097757610977610d44565b60200260200101818152505069033d6c833f39a0610000816012815181106109a1576109a1610d44565b6020908102919091010152604051633c6340f360e21b8152733d569673daa0575c936c7c67c4e6aeda69cc630c9063f18d03cc90610a2f907325f2226b597e8f9514b3f68f00f494cf4f28649190737fc66500c84a76ad7e9c93437bfc5ac33e2ddae990731c037b3c22240048807cc9d7111be5d455f640bd906910229d04898c8933c20090600401610d5a565b600060405180830381600087803b158015610a4957600080fd5b505af1158015610a5d573d6000803e3d6000fd5b5050505060005b6003811015610b4657733d569673daa0575c936c7c67c4e6aeda69cc630c63f18d03cc73464c71f6c2f760dda6093dcb91c24c39e5d6e18c898460038110610aae57610aae610d44565b6020020151731c037b3c22240048807cc9d7111be5d455f640bd8a8681518110610ada57610ada610d44565b60200260200101516040518563ffffffff1660e01b8152600401610b019493929190610d5a565b600060405180830381600087803b158015610b1b57600080fd5b505af1158015610b2f573d6000803e3d6000fd5b505050508080610b3e90610d84565b915050610a64565b5060005b6008811015610c2c57733d569673daa0575c936c7c67c4e6aeda69cc630c63f18d03cc73464c71f6c2f760dda6093dcb91c24c39e5d6e18c878460088110610b9457610b94610d44565b6020020151731c037b3c22240048807cc9d7111be5d455f640bd888681518110610bc057610bc0610d44565b60200260200101516040518563ffffffff1660e01b8152600401610be79493929190610d5a565b600060405180830381600087803b158015610c0157600080fd5b505af1158015610c15573d6000803e3d6000fd5b505050508080610c2490610d84565b915050610b4a565b5060005b6013811015610d1257733d569673daa0575c936c7c67c4e6aeda69cc630c63f18d03cc73464c71f6c2f760dda6093dcb91c24c39e5d6e18c858460138110610c7a57610c7a610d44565b6020020151731c037b3c22240048807cc9d7111be5d455f640bd868681518110610ca657610ca6610d44565b60200260200101516040518563ffffffff1660e01b8152600401610ccd9493929190610d5a565b600060405180830381600087803b158015610ce757600080fd5b505af1158015610cfb573d6000803e3d6000fd5b505050508080610d0a90610d84565b915050610c30565b506040517fcf88c657fb0ecbed2a624b6b4c626e2ceda32ea9ed16ea81de6362a6d965bd0890600090a1505050505050565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b039485168152928416602084015292166040820152606081019190915260800190565b6000600019821415610da657634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220c219695e6f9192df40439ebe69b9598cccc0dcab2d8b19d4b8354ba825e5078664736f6c634300080a0033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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