Contract 0xc3552fb76F3C013eCbED1a064d80Bf721F6BC481

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2d05540573b0f69ff9dcbdebb1d2fd7536ff2b86579c5d7ad4ea20e145fa988aTransfer Ownersh...206646962021-10-31 17:02:4589 days 17 hrs ago0xb98d4d4e205aff4d4755e9df19bd0b8bd4e0f148 IN  0xc3552fb76f3c013ecbed1a064d80bf721f6bc4810 FTM0.005534314996
0x1292201cba8f3727871f5cbe4a6ca734228f0e2a303bf47373580452ea6de33fSet Fuji Admin206646302021-10-31 17:01:4589 days 18 hrs ago0xb98d4d4e205aff4d4755e9df19bd0b8bd4e0f148 IN  0xc3552fb76f3c013ecbed1a064d80bf721f6bc4810 FTM0.005029046314
0x9e151d36e7886fc2cb978db0922760772dbed7652615211b40b63a1cd266093b0x60c06040206643232021-10-31 16:57:0489 days 18 hrs ago0xb98d4d4e205aff4d4755e9df19bd0b8bd4e0f148 IN  Create: FlasherFTM0 FTM0.228682337113
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x9e151d36e7886fc2cb978db0922760772dbed7652615211b40b63a1cd266093b206643232021-10-31 16:57:0489 days 18 hrs ago 0xb98d4d4e205aff4d4755e9df19bd0b8bd4e0f148  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FlasherFTM

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 19 : FlasherFTM.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import "../../abstracts/claimable/Claimable.sol";
import "../../interfaces/IFujiAdmin.sol";
import "../../interfaces/IVault.sol";
import "../../interfaces/IFlasher.sol";
import "../../interfaces/IFliquidator.sol";
import "../../interfaces/IFujiMappings.sol";
import "../../interfaces/IWETH.sol";
import "../../libraries/FlashLoans.sol";
import "../../libraries/Errors.sol";
import "../../interfaces/aave/IFlashLoanReceiver.sol";
import "../../interfaces/aave/IAaveLendingPool.sol";
import "../../interfaces/cream/ICTokenFlashloan.sol";
import "../../interfaces/cream/ICFlashloanReceiver.sol";
import "../libraries/LibUniversalERC20FTM.sol";

contract FlasherFTM is IFlasher, Claimable, IFlashLoanReceiver, ICFlashloanReceiver {
  using LibUniversalERC20FTM for IERC20;

  IFujiAdmin private _fujiAdmin;

  address private constant _FTM = 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF;
  address private constant _WFTM = 0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83;

  address private immutable _geistLendingPool = 0x9FAD24f572045c7869117160A571B2e50b10d068;
  IFujiMappings private immutable _crMappings =
    IFujiMappings(0x1eEdE44b91750933C96d2125b6757C4F89e63E20);

  // need to be payable because of the conversion ETH <> WETH
  receive() external payable {}

  modifier isAuthorized() {
    require(
      msg.sender == _fujiAdmin.getController() ||
        msg.sender == _fujiAdmin.getFliquidator() ||
        msg.sender == owner(),
      Errors.VL_NOT_AUTHORIZED
    );
    _;
  }

  /**
   * @dev Sets the fujiAdmin Address
   * @param _newFujiAdmin: FujiAdmin Contract Address
   */
  function setFujiAdmin(address _newFujiAdmin) public onlyOwner {
    _fujiAdmin = IFujiAdmin(_newFujiAdmin);
  }

  /**
   * @dev Routing Function for Flashloan Provider
   * @param info: struct information for flashLoan
   * @param _flashnum: integer identifier of flashloan provider
   */
  function initiateFlashloan(FlashLoan.Info calldata info, uint8 _flashnum) external isAuthorized override {
    if (_flashnum == 0) {
      _initiateGeistFlashLoan(info);
    } else if (_flashnum == 2) {
      _initiateCreamFlashLoan(info);
    }
  }

  /**
   * @dev Initiates an Geist flashloan.
   * @param info: data to be passed between functions executing flashloan logic
   */
  function _initiateGeistFlashLoan(FlashLoan.Info calldata info) internal {
    //Initialize Instance of Geist Lending Pool
    IAaveLendingPool geistLp = IAaveLendingPool(_geistLendingPool);

    //Passing arguments to construct Geist flashloan -limited to 1 asset type for now.
    address receiverAddress = address(this);
    address[] memory assets = new address[](1);
    assets[0] = address(info.asset == _FTM ? _WFTM : info.asset);
    uint256[] memory amounts = new uint256[](1);
    amounts[0] = info.amount;

    // 0 = no debt, 1 = stable, 2 = variable
    uint256[] memory modes = new uint256[](1);
    //modes[0] = 0;

    //address onBehalfOf = address(this);
    //bytes memory params = abi.encode(info);
    //uint16 referralCode = 0;

    //Geist Flashloan initiated.
    geistLp.flashLoan(receiverAddress, assets, amounts, modes, address(this), abi.encode(info), 0);
  }

  /**
   * @dev Executes Geist Flashloan, this operation is required
   * and called by Geistflashloan when sending loaned amount
   */
  function executeOperation(
    address[] calldata assets,
    uint256[] calldata amounts,
    uint256[] calldata premiums,
    address initiator,
    bytes calldata params
  ) external override returns (bool) {
    require(msg.sender == _geistLendingPool && initiator == address(this), Errors.VL_NOT_AUTHORIZED);

    FlashLoan.Info memory info = abi.decode(params, (FlashLoan.Info));

    uint256 _value;
    if (info.asset == _FTM) {
      // Convert WETH to ETH and assign amount to be set as msg.value
      _convertWethToEth(amounts[0]);
      _value = info.amount;
    } else {
      // Transfer to Vault the flashloan Amount
      // _value is 0
      IERC20(assets[0]).univTransfer(payable(info.vault), amounts[0]);
    }

    _executeAction(info, amounts[0], premiums[0], _value);

    //Approve geistLP to spend to repay flashloan
    _approveBeforeRepay(info.asset == _FTM, assets[0], amounts[0] + premiums[0], _geistLendingPool);

    return true;
  }

  // ===================== CreamFinance FlashLoan ===================================

  /**
   * @dev Initiates an CreamFinance flashloan.
   * @param info: data to be passed between functions executing flashloan logic
   */
  function _initiateCreamFlashLoan(FlashLoan.Info calldata info) internal {
    address crToken = info.asset == _FTM
      ? 0xd528697008aC67A21818751A5e3c58C8daE54696
      : _crMappings.addressMapping(info.asset);

    // Prepara data for flashloan execution
    bytes memory params = abi.encode(info);

    // Initialize Instance of Cream crLendingContract
    ICTokenFlashloan(crToken).flashLoan(address(this), address(this), info.amount, params);
  }
  /**
   * @dev Executes CreamFinance Flashloan, this operation is required
   * and called by CreamFinanceflashloan when sending loaned amount
   */
  function onFlashLoan(
    address sender,
    address underlying,
    uint256 amount,
    uint256 fee,
    bytes calldata params
  ) external override returns (bytes32) {
    // Check Msg. Sender is crToken Lending Contract
    // from IronBank because ETH on Cream cannot perform a flashloan
    address crToken = underlying == _WFTM
      ? 0xd528697008aC67A21818751A5e3c58C8daE54696
      : _crMappings.addressMapping(underlying);
    require(msg.sender == crToken && address(this) == sender, Errors.VL_NOT_AUTHORIZED);
    require(IERC20(underlying).balanceOf(address(this)) >= amount, Errors.VL_FLASHLOAN_FAILED);
    FlashLoan.Info memory info = abi.decode(params, (FlashLoan.Info));
    uint256 _value;
    if (info.asset == _FTM) {
      // Convert WFTM to FTM and assign amount to be set as msg.value
      _convertWethToEth(amount);
      _value = amount;
    } else {
      // Transfer to Vault the flashloan Amount
      // _value is 0
      IERC20(underlying).univTransfer(payable(info.vault), amount);
    }
    // Do task according to CallType
    _executeAction(info, amount, fee, _value);

    if (info.asset == _FTM) _convertEthToWeth(amount + fee);
    // Transfer flashloan + fee back to crToken Lending Contract
    IERC20(underlying).univApprove(payable(crToken), amount + fee);

    return keccak256("ERC3156FlashBorrowerInterface.onFlashLoan");
  }

  // ========================================================
  //
  // flash loans come here....
  //
  // ========================================================

  function _executeAction(
    FlashLoan.Info memory _info,
    uint256 _amount,
    uint256 _fee,
    uint256 _value
  ) internal {
    if (_info.callType == FlashLoan.CallType.Switch) {
      IVault(_info.vault).executeSwitch{ value: _value }(_info.newProvider, _amount, _fee);
    } else if (_info.callType == FlashLoan.CallType.Close) {
      IFliquidator(_info.fliquidator).executeFlashClose{ value: _value }(
        _info.userAddrs[0],
        _info.vault,
        _amount,
        _fee
      );
    } else {
      IFliquidator(_info.fliquidator).executeFlashBatchLiquidation{ value: _value }(
        _info.userAddrs,
        _info.userBalances,
        _info.userliquidator,
        _info.vault,
        _amount,
        _fee
      );
    }
  }

  function _approveBeforeRepay(
    bool _isFTM,
    address _asset,
    uint256 _amount,
    address _spender
  ) internal {
    if (_isFTM) {
      _convertEthToWeth(_amount);
      IERC20(_WFTM).univApprove(payable(_spender), _amount);
    } else {
      IERC20(_asset).univApprove(payable(_spender), _amount);
    }
  }

  function _convertEthToWeth(uint256 _amount) internal {
    IWETH(_WFTM).deposit{ value: _amount }();
  }

  function _convertWethToEth(uint256 _amount) internal {
    IWETH token = IWETH(_WFTM);
    token.withdraw(_amount);
  }
}

File 2 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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 19 : Claimable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Context.sol";

abstract contract Claimable is Context {
  address private _owner;
  address public pendingOwner;

  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
  event NewPendingOwner(address indexed owner);

  constructor() {
    address msgSender = _msgSender();
    _owner = msgSender;
    emit OwnershipTransferred(address(0), msgSender);
  }

  function owner() public view virtual returns (address) {
    return _owner;
  }

  modifier onlyOwner() {
    require(_msgSender() == owner(), "Ownable: caller is not the owner");
    _;
  }

  modifier onlyPendingOwner() {
    require(_msgSender() == pendingOwner);
    _;
  }

  function renounceOwnership() public virtual onlyOwner {
    emit OwnershipTransferred(owner(), address(0));
    _owner = address(0);
  }

  function transferOwnership(address newOwner) public virtual onlyOwner {
    require(pendingOwner == address(0));
    pendingOwner = newOwner;
    emit NewPendingOwner(newOwner);
  }

  function cancelTransferOwnership() public onlyOwner {
    require(pendingOwner != address(0));
    delete pendingOwner;
    emit NewPendingOwner(address(0));
  }

  function claimOwnership() public onlyPendingOwner {
    emit OwnershipTransferred(owner(), pendingOwner);
    _owner = pendingOwner;
    delete pendingOwner;
  }
}

File 4 of 19 : IFujiAdmin.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IFujiAdmin {
  function validVault(address _vaultAddr) external view returns (bool);

  function getFlasher() external view returns (address);

  function getFliquidator() external view returns (address);

  function getController() external view returns (address);

  function getTreasury() external view returns (address payable);

  function getVaultHarvester() external view returns (address);

  function getSwapper() external view returns (address);
}

File 5 of 19 : IVault.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IVault {
  // Events

  // Log Users Deposit
  event Deposit(address indexed userAddrs, address indexed asset, uint256 amount);
  // Log Users withdraw
  event Withdraw(address indexed userAddrs, address indexed asset, uint256 amount);
  // Log Users borrow
  event Borrow(address indexed userAddrs, address indexed asset, uint256 amount);
  // Log Users debt repay
  event Payback(address indexed userAddrs, address indexed asset, uint256 amount);

  // Log New active provider
  event SetActiveProvider(address providerAddr);
  // Log Switch providers
  event Switch(
    address fromProviderAddrs,
    address toProviderAddr,
    uint256 debtamount,
    uint256 collattamount
  );

  // Core Vault Functions

  function deposit(uint256 _collateralAmount) external payable;

  function withdraw(int256 _withdrawAmount) external;

  function withdrawLiq(int256 _withdrawAmount) external;

  function borrow(uint256 _borrowAmount) external;

  function payback(int256 _repayAmount) external payable;

  function paybackLiq(address[] memory _users, uint256 _repayAmount) external payable;

  function executeSwitch(
    address _newProvider,
    uint256 _flashLoanDebt,
    uint256 _fee
  ) external payable;

  //Getter Functions

  function activeProvider() external view returns (address);

  function borrowBalance(address _provider) external view returns (uint256);

  function depositBalance(address _provider) external view returns (uint256);

  function userDebtBalance(address _user) external view returns (uint256);

  function userProtocolFee(address _user) external view returns (uint256);

  function userDepositBalance(address _user) external view returns (uint256);

  function getNeededCollateralFor(uint256 _amount, bool _withFactors)
    external
    view
    returns (uint256);

  function getLiquidationBonusFor(uint256 _amount) external view returns (uint256);

  function getProviders() external view returns (address[] memory);

  function fujiERC1155() external view returns (address);

  //Setter Functions

  function setActiveProvider(address _provider) external;

  function updateF1155Balances() external;

  function protocolFee() external view returns (uint64, uint64);
}

File 6 of 19 : IFlasher.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../libraries/FlashLoans.sol";

interface IFlasher {
  function initiateFlashloan(FlashLoan.Info calldata info, uint8 amount) external;
}

File 7 of 19 : IFliquidator.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IFliquidator {
  function executeFlashClose(
    address _userAddr,
    address _vault,
    uint256 _amount,
    uint256 _flashloanfee
  ) external payable;

  function executeFlashBatchLiquidation(
    address[] calldata _userAddrs,
    uint256[] calldata _usrsBals,
    address _liquidatorAddr,
    address _vault,
    uint256 _amount,
    uint256 _flashloanFee
  ) external payable;
}

File 8 of 19 : IFujiMappings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IFujiMappings {
  function addressMapping(address) external view returns (address);
}

File 9 of 19 : IWETH.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IWETH {
  function approve(address, uint256) external;

  function deposit() external payable;

  function withdraw(uint256) external;
}

File 10 of 19 : FlashLoans.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library Account {
  enum Status {
    Normal,
    Liquid,
    Vapor
  }
  struct Info {
    address owner; // The address that owns the account
    uint256 number; // A nonce that allows a single address to control many accounts
  }
}

library Actions {
  enum ActionType {
    Deposit, // supply tokens
    Withdraw, // borrow tokens
    Transfer, // transfer balance between accounts
    Buy, // buy an amount of some token (publicly)
    Sell, // sell an amount of some token (publicly)
    Trade, // trade tokens against another account
    Liquidate, // liquidate an undercollateralized or expiring account
    Vaporize, // use excess tokens to zero-out a completely negative account
    Call // send arbitrary data to an address
  }

  struct ActionArgs {
    ActionType actionType;
    uint256 accountId;
    Types.AssetAmount amount;
    uint256 primaryMarketId;
    uint256 secondaryMarketId;
    address otherAddress;
    uint256 otherAccountId;
    bytes data;
  }
}

library Types {
  enum AssetDenomination {
    Wei, // the amount is denominated in wei
    Par // the amount is denominated in par
  }

  enum AssetReference {
    Delta, // the amount is given as a delta from the current value
    Target // the amount is given as an exact number to end up at
  }

  struct AssetAmount {
    bool sign; // true if positive
    AssetDenomination denomination;
    AssetReference ref;
    uint256 value;
  }
}

library FlashLoan {
  /**
   * @dev Used to determine which vault's function to call post-flashloan:
   * - Switch for executeSwitch(...)
   * - Close for executeFlashClose(...)
   * - Liquidate for executeFlashLiquidation(...)
   * - BatchLiquidate for executeFlashBatchLiquidation(...)
   */
  enum CallType {
    Switch,
    Close,
    BatchLiquidate
  }

  /**
   * @dev Struct of params to be passed between functions executing flashloan logic
   * @param asset: Address of asset to be borrowed with flashloan
   * @param amount: Amount of asset to be borrowed with flashloan
   * @param vault: Vault's address on which the flashloan logic to be executed
   * @param newProvider: New provider's address. Used when callType is Switch
   * @param userAddrs: User's address array Used when callType is BatchLiquidate
   * @param userBals:  Array of user's balances, Used when callType is BatchLiquidate
   * @param userliquidator: The user's address who is  performing liquidation. Used when callType is Liquidate
   * @param fliquidator: Fujis Liquidator's address.
   */
  struct Info {
    CallType callType;
    address asset;
    uint256 amount;
    address vault;
    address newProvider;
    address[] userAddrs;
    uint256[] userBalances;
    address userliquidator;
    address fliquidator;
  }
}

File 11 of 19 : Errors.sol
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.0;

/**
 * @title Errors library
 * @author Fuji
 * @notice Defines the error messages emitted by the different contracts of the Aave protocol
 * @dev Error messages prefix glossary:
 *  - VL = Validation Logic 100 series
 *  - MATH = Math libraries 200 series
 *  - RF = Refinancing 300 series
 *  - VLT = vault 400 series
 *  - SP = Special 900 series
 */
library Errors {
  //Errors
  string public constant VL_INDEX_OVERFLOW = "100"; // index overflows uint128
  string public constant VL_INVALID_MINT_AMOUNT = "101"; //invalid amount to mint
  string public constant VL_INVALID_BURN_AMOUNT = "102"; //invalid amount to burn
  string public constant VL_AMOUNT_ERROR = "103"; //Input value >0, and for ETH msg.value and amount shall match
  string public constant VL_INVALID_WITHDRAW_AMOUNT = "104"; //Withdraw amount exceeds provided collateral, or falls undercollaterized
  string public constant VL_INVALID_BORROW_AMOUNT = "105"; //Borrow amount does not meet collaterization
  string public constant VL_NO_DEBT_TO_PAYBACK = "106"; //Msg sender has no debt amount to be payback
  string public constant VL_MISSING_ERC20_ALLOWANCE = "107"; //Msg sender has not approved ERC20 full amount to transfer
  string public constant VL_USER_NOT_LIQUIDATABLE = "108"; //User debt position is not liquidatable
  string public constant VL_DEBT_LESS_THAN_AMOUNT = "109"; //User debt is less than amount to partial close
  string public constant VL_PROVIDER_ALREADY_ADDED = "110"; // Provider is already added in Provider Array
  string public constant VL_NOT_AUTHORIZED = "111"; //Not authorized
  string public constant VL_INVALID_COLLATERAL = "112"; //There is no Collateral, or Collateral is not in active in vault
  string public constant VL_NO_ERC20_BALANCE = "113"; //User does not have ERC20 balance
  string public constant VL_INPUT_ERROR = "114"; //Check inputs. For ERC1155 batch functions, array sizes should match.
  string public constant VL_ASSET_EXISTS = "115"; //Asset intended to be added already exists in FujiERC1155
  string public constant VL_ZERO_ADDR_1155 = "116"; //ERC1155: balance/transfer for zero address
  string public constant VL_NOT_A_CONTRACT = "117"; //Address is not a contract.
  string public constant VL_INVALID_ASSETID_1155 = "118"; //ERC1155 Asset ID is invalid.
  string public constant VL_NO_ERC1155_BALANCE = "119"; //ERC1155: insufficient balance for transfer.
  string public constant VL_MISSING_ERC1155_APPROVAL = "120"; //ERC1155: transfer caller is not owner nor approved.
  string public constant VL_RECEIVER_REJECT_1155 = "121"; //ERC1155Receiver rejected tokens
  string public constant VL_RECEIVER_CONTRACT_NON_1155 = "122"; //ERC1155: transfer to non ERC1155Receiver implementer
  string public constant VL_OPTIMIZER_FEE_SMALL = "123"; //Fuji OptimizerFee has to be > 1 RAY (1e27)
  string public constant VL_UNDERCOLLATERIZED_ERROR = "124"; // Flashloan-Flashclose cannot be used when User's collateral is worth less than intended debt position to close.
  string public constant VL_MINIMUM_PAYBACK_ERROR = "125"; // Minimum Amount payback should be at least Fuji Optimizerfee accrued interest.
  string public constant VL_HARVESTING_FAILED = "126"; // Harvesting Function failed, check provided _farmProtocolNum or no claimable balance.
  string public constant VL_FLASHLOAN_FAILED = "127"; // Flashloan failed
  string public constant VL_ERC1155_NOT_TRANSFERABLE = "128"; // ERC1155: Not Transferable
  string public constant VL_SWAP_SLIPPAGE_LIMIT_EXCEED = "129"; // ERC1155: Not Transferable
  string public constant VL_ZERO_ADDR = "130"; // Zero Address

  string public constant MATH_DIVISION_BY_ZERO = "201";
  string public constant MATH_ADDITION_OVERFLOW = "202";
  string public constant MATH_MULTIPLICATION_OVERFLOW = "203";

  string public constant RF_INVALID_RATIO_VALUES = "301"; // Ratio Value provided is invalid, _ratioA/_ratioB <= 1, and > 0, or activeProvider borrowBalance = 0

  string public constant VLT_CALLER_MUST_BE_VAULT = "401"; // The caller of this function must be a vault

  string public constant ORACLE_INVALID_LENGTH = "501"; // The assets length and price feeds length doesn't match
  string public constant ORACLE_NONE_PRICE_FEED = "502"; // The price feed is not found
}

File 12 of 19 : IFlashLoanReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IFlashLoanReceiver {
  function executeOperation(
    address[] calldata assets,
    uint256[] calldata amounts,
    uint256[] calldata premiums,
    address initiator,
    bytes calldata params
  ) external returns (bool);
}

File 13 of 19 : IAaveLendingPool.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IAaveLendingPool {
  function flashLoan(
    address receiverAddress,
    address[] calldata assets,
    uint256[] calldata amounts,
    uint256[] calldata modes,
    address onBehalfOf,
    bytes calldata params,
    uint16 referralCode
  ) external;

  function deposit(
    address _asset,
    uint256 _amount,
    address _onBehalfOf,
    uint16 _referralCode
  ) external;

  function withdraw(
    address _asset,
    uint256 _amount,
    address _to
  ) external;

  function borrow(
    address _asset,
    uint256 _amount,
    uint256 _interestRateMode,
    uint16 _referralCode,
    address _onBehalfOf
  ) external;

  function repay(
    address _asset,
    uint256 _amount,
    uint256 _rateMode,
    address _onBehalfOf
  ) external;

  function setUserUseReserveAsCollateral(address _asset, bool _useAsCollateral) external;
}

File 14 of 19 : ICTokenFlashloan.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface ICTokenFlashloan {
  function flashLoan(
    address receiver,
    address initiator,
    uint256 amount,
    bytes calldata params
  ) external;
}

File 15 of 19 : ICFlashloanReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface ICFlashloanReceiver {
  function onFlashLoan(
    address sender,
    address underlying,
    uint256 amount,
    uint256 fee,
    bytes calldata params
  ) external returns (bytes32);
}

File 16 of 19 : LibUniversalERC20FTM.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

library LibUniversalERC20FTM {
  using SafeERC20 for IERC20;

  IERC20 private constant _FTM_ADDRESS = IERC20(0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF);
  IERC20 private constant _ZERO_ADDRESS = IERC20(0x0000000000000000000000000000000000000000);

  function isFTM(IERC20 token) internal pure returns (bool) {
    return (token == _ZERO_ADDRESS || token == _FTM_ADDRESS);
  }

  function univBalanceOf(IERC20 token, address account) internal view returns (uint256) {
    if (isFTM(token)) {
      return account.balance;
    } else {
      return token.balanceOf(account);
    }
  }

  function univTransfer(
    IERC20 token,
    address payable to,
    uint256 amount
  ) internal {
    if (amount > 0) {
      if (isFTM(token)) {
        (bool sent, ) = to.call{ value: amount }("");
        require(sent, "Failed to send Ether");
      } else {
        token.safeTransfer(to, amount);
      }
    }
  }

  function univApprove(
    IERC20 token,
    address to,
    uint256 amount
  ) internal {
    require(!isFTM(token), "Approve called on ETH");

    if (amount == 0) {
      token.safeApprove(to, 0);
    } else {
      uint256 allowance = token.allowance(address(this), to);
      if (allowance < amount) {
        if (allowance > 0) {
          token.safeApprove(to, 0);
        }
        token.safeApprove(to, amount);
      }
    }
  }
}

File 17 of 19 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 18 of 19 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 19 of 19 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"NewPendingOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"cancelTransferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"premiums","type":"uint256[]"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"executeOperation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"enum FlashLoan.CallType","name":"callType","type":"uint8"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"newProvider","type":"address"},{"internalType":"address[]","name":"userAddrs","type":"address[]"},{"internalType":"uint256[]","name":"userBalances","type":"uint256[]"},{"internalType":"address","name":"userliquidator","type":"address"},{"internalType":"address","name":"fliquidator","type":"address"}],"internalType":"struct FlashLoan.Info","name":"info","type":"tuple"},{"internalType":"uint8","name":"_flashnum","type":"uint8"}],"name":"initiateFlashloan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"underlying","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"onFlashLoan","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newFujiAdmin","type":"address"}],"name":"setFujiAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040527f9fad24f572045c7869117160a571b2e50b10d06800000000000000000000000060805272f76f225c8ba8499e4b69092db3abe27c4f31f160651b60a05234801561004e57600080fd5b5060006100596100a8565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506100ac565b3390565b60805160601c60a05160601c6123736100ec6000396000818161025301526112a301526000818161088f01528181610ae801526110a601526123736000f3fe6080604052600436106100b55760003560e01c806391c154321161006957806392fede001161004e57806392fede00146101b2578063e30c3978146101c7578063f2fde38b146101dc576100bc565b806391c1543214610165578063920f5c8414610185576100bc565b80635ccd808c1161009a5780635ccd808c1461010e578063715018a61461012e5780638da5cb5b14610143576100bc565b806323e30c8b146100c15780634e71e0c8146100f7576100bc565b366100bc57005b600080fd5b3480156100cd57600080fd5b506100e16100dc36600461190e565b6101fc565b6040516100ee9190611f18565b60405180910390f35b34801561010357600080fd5b5061010c610523565b005b34801561011a57600080fd5b5061010c610129366004611a7e565b6105ba565b34801561013a57600080fd5b5061010c610782565b34801561014f57600080fd5b50610158610812565b6040516100ee9190611d6d565b34801561017157600080fd5b5061010c6101803660046118d6565b610821565b34801561019157600080fd5b506101a56101a0366004611988565b610882565b6040516100ee9190611f0d565b3480156101be57600080fd5b5061010c610b1e565b3480156101d357600080fd5b50610158610baf565b3480156101e857600080fd5b5061010c6101f73660046118d6565b610bbe565b6000806001600160a01b0387167321be370d5312f44cb42ce377bc9b8a0cef1a4c83146102dd576040517f0494cd9a0000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630494cd9a90610288908a90600401611d6d565b60206040518083038186803b1580156102a057600080fd5b505afa1580156102b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d891906118f2565b6102f3565b73d528697008ac67a21818751a5e3c58c8dae546965b9050336001600160a01b0382161480156103155750306001600160a01b038916145b6040518060400160405280600381526020016231313160e81b815250906103585760405162461bcd60e51b815260040161034f9190611f21565b60405180910390fd5b506040517f70a0823100000000000000000000000000000000000000000000000000000000815286906001600160a01b038916906370a08231906103a0903090600401611d6d565b60206040518083038186803b1580156103b857600080fd5b505afa1580156103cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f09190611bdf565b10156040518060400160405280600381526020017f3132370000000000000000000000000000000000000000000000000000000000815250906104465760405162461bcd60e51b815260040161034f9190611f21565b50600061045584860186611ad8565b905060006001600160a01b03801682602001516001600160a01b031614156104875761048088610c5d565b50866104a1565b60608201516104a1906001600160a01b038b16908a610ce5565b6104ad82898984610d94565b60208201516001600160a01b0390811614156104d5576104d56104d0888a6122bf565b610f43565b6104f4836104e3898b6122bf565b6001600160a01b038c169190610f92565b507f7968ba28153757de2da7bce4c2ba9ebaf94445061f3050de1b0de5c34bb7d5d89998505050505050505050565b6001546001600160a01b0316610537611091565b6001600160a01b03161461054a57600080fd5b6001546001600160a01b031661055e610812565b6001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b600260009054906101000a90046001600160a01b03166001600160a01b0316633018205f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561060857600080fd5b505afa15801561061c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064091906118f2565b6001600160a01b0316336001600160a01b031614806106f55750600260009054906101000a90046001600160a01b03166001600160a01b031663b8491a846040518163ffffffff1660e01b815260040160206040518083038186803b1580156106a857600080fd5b505afa1580156106bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e091906118f2565b6001600160a01b0316336001600160a01b0316145b806107185750610703610812565b6001600160a01b0316336001600160a01b0316145b6040518060400160405280600381526020016231313160e81b815250906107525760405162461bcd60e51b815260040161034f9190611f21565b5060ff81166107695761076482611095565b61077e565b8060ff166002141561077e5761077e82611271565b5050565b61078a610812565b6001600160a01b031661079b611091565b6001600160a01b0316146107c15760405162461bcd60e51b815260040161034f90611fff565b60006107cb610812565b6001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610829610812565b6001600160a01b031661083a611091565b6001600160a01b0316146108605760405162461bcd60e51b815260040161034f90611fff565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156108c457506001600160a01b03841630145b6040518060400160405280600381526020016231313160e81b815250906108fe5760405162461bcd60e51b815260040161034f9190611f21565b50600061090d83850185611ad8565b905060006001600160a01b03801682602001516001600160a01b0316141561096a5761095f8a8a600081811061095357634e487b7160e01b600052603260045260246000fd5b90506020020135610c5d565b5060408101516109e0565b6109e082606001518b8b600081811061099357634e487b7160e01b600052603260045260246000fd5b905060200201358e8e60008181106109bb57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906109d091906118d6565b6001600160a01b03169190610ce5565b610a3a828b8b6000818110610a0557634e487b7160e01b600052603260045260246000fd5b905060200201358a8a6000818110610a2d57634e487b7160e01b600052603260045260246000fd5b9050602002013584610d94565b610b0c6001600160a01b03801683602001516001600160a01b0316148d8d6000818110610a7757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a8c91906118d6565b8a8a6000818110610aad57634e487b7160e01b600052603260045260246000fd5b905060200201358d8d6000818110610ad557634e487b7160e01b600052603260045260246000fd5b90506020020135610ae691906122bf565b7f0000000000000000000000000000000000000000000000000000000000000000611408565b5060019b9a5050505050505050505050565b610b26610812565b6001600160a01b0316610b37611091565b6001600160a01b031614610b5d5760405162461bcd60e51b815260040161034f90611fff565b6001546001600160a01b0316610b7257600080fd5b600180546001600160a01b03191690556040516000907f69737d41162474a7ca514809b07d7becaecf72eae8c23bceb071f0e09af93ffc908290a2565b6001546001600160a01b031681565b610bc6610812565b6001600160a01b0316610bd7611091565b6001600160a01b031614610bfd5760405162461bcd60e51b815260040161034f90611fff565b6001546001600160a01b031615610c1357600080fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f69737d41162474a7ca514809b07d7becaecf72eae8c23bceb071f0e09af93ffc90600090a250565b6040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081527321be370d5312f44cb42ce377bc9b8a0cef1a4c83908190632e1a7d4d90610caf908590600401611f18565b600060405180830381600087803b158015610cc957600080fd5b505af1158015610cdd573d6000803e3d6000fd5b505050505050565b8015610d8f57610cf48361144f565b15610d7b576000826001600160a01b031682604051610d1290611d6a565b60006040518083038185875af1925050503d8060008114610d4f576040519150601f19603f3d011682016040523d82523d6000602084013e610d54565b606091505b5050905080610d755760405162461bcd60e51b815260040161034f90611f34565b50610d8f565b610d8f6001600160a01b0384168383611477565b505050565b600084516002811115610db757634e487b7160e01b600052602160045260246000fd5b1415610e2d5783606001516001600160a01b031663cf4f445882866080015186866040518563ffffffff1660e01b8152600401610df693929190611e98565b6000604051808303818588803b158015610e0f57600080fd5b505af1158015610e23573d6000803e3d6000fd5b5050505050610f3d565b600184516002811115610e5057634e487b7160e01b600052602160045260246000fd5b1415610ebe578361010001516001600160a01b0316639df97b04828660a00151600081518110610e9057634e487b7160e01b600052603260045260246000fd5b6020026020010151876060015187876040518663ffffffff1660e01b8152600401610df69493929190611dd7565b8361010001516001600160a01b0316639c6ce5aa828660a001518760c001518860e00151896060015189896040518863ffffffff1660e01b8152600401610f0a96959493929190611eb9565b6000604051808303818588803b158015610f2357600080fd5b505af1158015610f37573d6000803e3d6000fd5b50505050505b50505050565b7321be370d5312f44cb42ce377bc9b8a0cef1a4c836001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610cc957600080fd5b610f9b8361144f565b15610fb85760405162461bcd60e51b815260040161034f90611fc8565b80610fd757610fd26001600160a01b0384168360006114fa565b610d8f565b604051636eb1769f60e11b81526000906001600160a01b0385169063dd62ed3e906110089030908790600401611d81565b60206040518083038186803b15801561102057600080fd5b505afa158015611034573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110589190611bdf565b905081811015610f3d57801561107d5761107d6001600160a01b0385168460006114fa565b610f3d6001600160a01b03851684846114fa565b3390565b6040805160018082528183019092527f0000000000000000000000000000000000000000000000000000000000000000913091600091602080830190803683370190505090506001600160a01b036110f360408601602087016118d6565b6001600160a01b0316146111165761111160408501602086016118d6565b61112c565b7321be370d5312f44cb42ce377bc9b8a0cef1a4c835b8160008151811061114d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392909216602092830291909101909101526040805160018082528183019092526000918160200160208202803683370190505090508460400135816000815181106111b057634e487b7160e01b600052603260045260246000fd5b6020908102919091010152604080516001808252818301909252600091816020016020820280368337019050509050846001600160a01b031663ab9c4b5d85858585308c6040516020016112049190612125565b60405160208183030381529060405260006040518863ffffffff1660e01b81526004016112379796959493929190611e00565b600060405180830381600087803b15801561125157600080fd5b505af1158015611265573d6000803e3d6000fd5b50505050505050505050565b60006001600160a01b0361128b60408401602085016118d6565b6001600160a01b031614611349576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016630494cd9a6112d860408501602086016118d6565b6040518263ffffffff1660e01b81526004016112f49190611d6d565b60206040518083038186803b15801561130c57600080fd5b505afa158015611320573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134491906118f2565b61135f565b73d528697008ac67a21818751a5e3c58c8dae546965b90506000826040516020016113749190612125565b60408051601f198184030181528282527f5cffe9de00000000000000000000000000000000000000000000000000000000835292506001600160a01b03841691635cffe9de916113d1913091829190890135908790600401611d9b565b600060405180830381600087803b1580156113eb57600080fd5b505af11580156113ff573d6000803e3d6000fd5b50505050505050565b831561143b5761141782610f43565b6114367321be370d5312f44cb42ce377bc9b8a0cef1a4c838284610f92565b610f3d565b610f3d6001600160a01b0384168284610f92565b60006001600160a01b038216158061146f57506001600160a01b03828116145b90505b919050565b610d8f8363a9059cbb60e01b8484604051602401611496929190611e7f565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526115bd565b8015806115825750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906115309030908690600401611d81565b60206040518083038186803b15801561154857600080fd5b505afa15801561155c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115809190611bdf565b155b61159e5760405162461bcd60e51b815260040161034f906120c8565b610d8f8363095ea7b360e01b8484604051602401611496929190611e7f565b6000611612826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661164c9092919063ffffffff16565b805190915015610d8f57808060200190518101906116309190611a5e565b610d8f5760405162461bcd60e51b815260040161034f9061206b565b606061165b8484600085611665565b90505b9392505050565b6060824710156116875760405162461bcd60e51b815260040161034f90611f6b565b61169085611725565b6116ac5760405162461bcd60e51b815260040161034f90612034565b600080866001600160a01b031685876040516116c89190611d4e565b60006040518083038185875af1925050503d8060008114611705576040519150601f19603f3d011682016040523d82523d6000602084013e61170a565b606091505b509150915061171a82828661172b565b979650505050505050565b3b151590565b6060831561173a57508161165e565b82511561174a5782518084602001fd5b8160405162461bcd60e51b815260040161034f9190611f21565b803561147281612325565b60008083601f840112611780578182fd5b50813567ffffffffffffffff811115611797578182fd5b60208301915083602080830285010111156117b157600080fd5b9250929050565b600082601f8301126117c8578081fd5b813560206117dd6117d883612253565b612229565b82815281810190858301838502870184018810156117f9578586fd5b855b8581101561182057813561180e81612325565b845292840192908401906001016117fb565b5090979650505050505050565b600082601f83011261183d578081fd5b8135602061184d6117d883612253565b8281528181019085830183850287018401881015611869578586fd5b855b858110156118205781358452928401929084019060010161186b565b60008083601f840112611898578182fd5b50813567ffffffffffffffff8111156118af578182fd5b6020830191508360208285010111156117b157600080fd5b80356003811061147257600080fd5b6000602082840312156118e7578081fd5b813561165e81612325565b600060208284031215611903578081fd5b815161165e81612325565b60008060008060008060a08789031215611926578182fd5b863561193181612325565b9550602087013561194181612325565b94506040870135935060608701359250608087013567ffffffffffffffff81111561196a578283fd5b61197689828a01611887565b979a9699509497509295939492505050565b600080600080600080600080600060a08a8c0312156119a5578283fd5b893567ffffffffffffffff808211156119bc578485fd5b6119c88d838e0161176f565b909b50995060208c01359150808211156119e0578485fd5b6119ec8d838e0161176f565b909950975060408c0135915080821115611a04578485fd5b611a108d838e0161176f565b909750955060608c01359150611a2582612325565b90935060808b01359080821115611a3a578384fd5b50611a478c828d01611887565b915080935050809150509295985092959850929598565b600060208284031215611a6f578081fd5b8151801515811461165e578182fd5b60008060408385031215611a90578182fd5b823567ffffffffffffffff811115611aa6578283fd5b83016101208186031215611ab8578283fd5b9150602083013560ff81168114611acd578182fd5b809150509250929050565b600060208284031215611ae9578081fd5b813567ffffffffffffffff80821115611b00578283fd5b8184019150610120808387031215611b16578384fd5b611b1f81612229565b9050611b2a836118c7565b8152611b3860208401611764565b602082015260408301356040820152611b5360608401611764565b6060820152611b6460808401611764565b608082015260a083013582811115611b7a578485fd5b611b86878286016117b8565b60a08301525060c083013582811115611b9d578485fd5b611ba98782860161182d565b60c083015250611bbb60e08401611764565b60e08201526101009150611bd0828401611764565b91810191909152949350505050565b600060208284031215611bf0578081fd5b5051919050565b6001600160a01b03169052565b60008284526020808501945082825b85811015611c41578135611c2681612325565b6001600160a01b031687529582019590820190600101611c13565b509495945050505050565b6000815180845260208085019450808401835b83811015611c415781516001600160a01b031687529582019590820190600101611c5f565b60008284527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115611cb5578081fd5b6020830280836020870137939093016020019283525090919050565b6000815180845260208085019450808401835b83811015611c4157815187529582019590820190600101611ce4565b60008151808452611d188160208601602086016122e3565b601f01601f19169290920160200192915050565b60038110611d4a57634e487b7160e01b600052602160045260246000fd5b9052565b60008251611d608184602087016122e3565b9190910192915050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152611dcd6080830184611d00565b9695505050505050565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b60006001600160a01b03808a16835260e06020840152611e2360e084018a611c4c565b8381036040850152611e35818a611cd1565b90508381036060850152611e498189611cd1565b9050818716608085015283810360a0850152611e658187611d00565b9250505061ffff831660c083015298975050505050505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b600060c08252611ecc60c0830189611c4c565b8281036020840152611ede8189611cd1565b6001600160a01b03978816604085015295909616606083015250608081019290925260a0909101529392505050565b901515815260200190565b90815260200190565b60006020825261165e6020830184611d00565b60208082526014908201527f4661696c656420746f2073656e64204574686572000000000000000000000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526015908201527f417070726f76652063616c6c6564206f6e204554480000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b6000602082526121406020830161213b856118c7565b611d2c565b61214c60208401611764565b6121596040840182611bf7565b506040830135606083015261217060608401611764565b61217d6080840182611bf7565b5061218a60808401611764565b61219760a0840182611bf7565b506121a560a0840184612277565b6101208060c08601526121bd61014086018385611c04565b92506121cc60c0870187612277565b868503601f190160e088015292506121e5848483611c84565b9350506121f460e08701611764565b915061010061220581870184611bf7565b612210818801611764565b92505061221f81860183611bf7565b5090949350505050565b60405181810167ffffffffffffffff8111828210171561224b5761224b61230f565b604052919050565b600067ffffffffffffffff82111561226d5761226d61230f565b5060209081020190565b6000808335601e1984360301811261228d578283fd5b830160208101925035905067ffffffffffffffff8111156122ad57600080fd5b6020810236038313156117b157600080fd5b600082198211156122de57634e487b7160e01b81526011600452602481fd5b500190565b60005b838110156122fe5781810151838201526020016122e6565b83811115610f3d5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461233a57600080fd5b5056fea26469706673582212206d65af17e87249a6e6339febb7100350693847113b9746fb62a6183a55c96da764736f6c63430008000033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
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.