Contract 0xbD59574E9203F5e532a2894a56c31286416c0ac9 1

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2597a8080e5bdba6a45a20949876f41d3c6c652559e412b4e884bb07dacc6793Do Refinancing513379892022-11-23 11:13:5212 days 3 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.1744323
0x968269331ba83e75ebdc4d5bc95c4368572ea5ad20cf4120adbecd26c93b5a22Do Refinancing513377092022-11-23 11:05:2812 days 3 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.172023568
0xf3a1ce099f4f42cdf4e035165b4c88fdd45c060b154816fbbab37381b9e1bd4aDo Refinancing513375892022-11-23 11:01:4012 days 3 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.17218305
0x7e4d8003889d5f090f8395875361b400645f5a7a0e1fa283e59be53b52da449cDo Refinancing513375812022-11-23 11:01:2412 days 3 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.1901994
0xc2e191fbdd898639b806a7a2e353acabc2d6dd096629de1f40032cebe3a38500Do Refinancing513375732022-11-23 11:01:0912 days 3 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.13540035
0x91ae2605109b21aa7dc6a5959da5fad2affcf16664ac68135b392197698a2562Do Refinancing426317212022-07-13 0:21:47145 days 14 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.003105802
0x85d497409802ac9ec003227473c11388d56d458da00b724bb732e615c1e73c62Do Refinancing426315412022-07-13 0:18:41145 days 14 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.00624594
0x3ec0ebd82584ffd2bd6bfd8273076f4a2430b5e1da17d6ee43e9981665a41f1eDo Refinancing426314192022-07-13 0:16:18145 days 14 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.004033854
0xf6f01f2dc230ff986bb89a3c5ce5df0a893487d9728f8ad16cbf334e5a7ef0a2Do Refinancing426300552022-07-12 23:45:24145 days 14 hrs ago0x0ef585802c9911b43844e9706f7edb0111bcd0a1 IN  Fuji DAO: Controller0 FTM0.000113127059
0x556df029519f6645361588949f581ab0195d0ed39aedc8d531fb12e5f15ac5c7Do Refinancing419862282022-07-04 9:29:57154 days 4 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.38664453
0xec53fdd436e630f87c3537ad95a3387e2a2843b678dece7d8fad62265fa913e1Do Refinancing419862102022-07-04 9:29:35154 days 4 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.333890862
0x49e986a9b545f7166f78b93c764dbc4b15fd0447bbbb4a328275ac3a6941922aDo Refinancing400425472022-06-08 5:46:16180 days 8 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.010589688
0x3d25661f407581635d580cc7da15e12f0190b20ac5e845336d440ac2afa36d9bDo Refinancing398990682022-06-06 7:19:13182 days 7 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.021863979
0xc585a450e58b9383d57882f95580bb31c967df15568946582cec56e3dace1b2bDo Refinancing387927902022-05-22 8:20:24197 days 6 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.38232164
0x1184e756a2c4a572029a2b6fb253d3187b5702e1e0693a90d8bac01917362fa9Do Refinancing387927702022-05-22 8:19:57197 days 6 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.353309624
0xf8acae5dd3384b3543be8f33c1b0a92b7e306e9158f06c43c48828a9914500c4Do Refinancing387927472022-05-22 8:19:14197 days 6 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.084291108
0xfb424979620d353752a8c2b27f0d8617f8efbc699b1a13bac45c2fe1d25b62daDo Refinancing387926972022-05-22 8:18:09197 days 6 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.084391428
0x1d34be0fb602f3a5e22e5906597ab1926c9c10c1a77115753b8c771664d30d2aDo Refinancing387926782022-05-22 8:17:45197 days 6 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.18503367
0x6a42bf4ff4eef65951baf15f2f1bfe8b72106b1687a05e4ae7edbfd6252d4528Do Refinancing369262292022-04-25 11:25:57224 days 2 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.6384682883
0x068fa5d6ab01ef78771ecefaf16811cb9e6cbd65240bcf6316c83accc3214d0cDo Refinancing369262032022-04-25 11:25:08224 days 2 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM0.55455345
0xa65a7bdd68bdc123e8367d88676b65e7d45126f2638a616be14e220374f8dc65Do Refinancing366275962022-04-21 14:48:44227 days 23 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM1.2720373134
0x711cd33dfa5670cde6fa41704465653ea25960f5ca4b6a258e7daf089e120882Do Refinancing366275642022-04-21 14:48:13227 days 23 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM1.2035579661
0xacdd0e75c22523e1ff638a639d307cfed7faf59cdf9717d4824f33273d443b2bDo Refinancing366275032022-04-21 14:47:19227 days 23 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM1.2664859185
0x5291d3695152accbd13222888482405de86afca82f7ba389b84710adf1ba2a28Do Refinancing344554892022-03-26 15:02:29253 days 23 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM1.3450381896
0x576b8eb07c423903924e10b9a4bdf2477a0b59b0dfb799d695c11f85b65684fcDo Refinancing344554602022-03-26 15:01:58253 days 23 hrs ago0x5e0a4e608e136a81136ed5833148c29da0ea949f IN  Fuji DAO: Controller0 FTM1.4526733308
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x0ba6eb8c7b6ef0b55623a6a2d07df2165e82a01f98839f3a7a330f2cf65d9301192458142021-10-16 12:55:16415 days 1 hr ago 0xb98d4d4e205aff4d4755e9df19bd0b8bd4e0f148  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Controller

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 10 : Controller.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./abstracts/claimable/Claimable.sol";
import "./interfaces/IFlasher.sol";
import "./interfaces/IVault.sol";
import "./interfaces/IVaultControl.sol";
import "./interfaces/IProvider.sol";
import "./interfaces/IFujiAdmin.sol";
import "./libraries/FlashLoans.sol";
import "./libraries/Errors.sol";

contract Controller is Claimable {
  IFujiAdmin private _fujiAdmin;
  mapping(address => bool) public isExecutor;

  modifier isValidVault(address _vaultAddr) {
    require(_fujiAdmin.validVault(_vaultAddr), "Invalid vault!");
    _;
  }

  modifier onlyOwnerOrExecutor() {
    require(msg.sender == owner() || isExecutor[msg.sender], "Not executor!");
    _;
  }

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

  /**
   * @dev Performs a forced refinancing routine
   * @param _vaultAddr: fuji Vault address
   * @param _newProvider: new provider address
   * @param _ratioA: ratio to determine how much of debtposition to move
   * @param _ratioB: _ratioA/_ratioB <= 1, and > 0
   * @param _flashNum: integer identifier of flashloan provider
   */
  function doRefinancing(
    address _vaultAddr,
    address _newProvider,
    uint256 _ratioA,
    uint256 _ratioB,
    uint8 _flashNum
  ) external isValidVault(_vaultAddr) onlyOwnerOrExecutor {
    IVault vault = IVault(_vaultAddr);
    IVaultControl.VaultAssets memory vAssets = IVaultControl(_vaultAddr).vAssets();
    vault.updateF1155Balances();

    // Check Vault borrowbalance and apply ratio (consider compound or not)
    uint256 debtPosition = IProvider(vault.activeProvider()).getBorrowBalanceOf(
      vAssets.borrowAsset,
      _vaultAddr
    );
    uint256 applyRatiodebtPosition = (debtPosition * _ratioA) / _ratioB;

    // Check Ratio Input and Vault Balance at ActiveProvider
    require(
      debtPosition >= applyRatiodebtPosition && applyRatiodebtPosition > 0,
      Errors.RF_INVALID_RATIO_VALUES
    );

    //Initiate Flash Loan Struct
    FlashLoan.Info memory info = FlashLoan.Info({
      callType: FlashLoan.CallType.Switch,
      asset: vAssets.borrowAsset,
      amount: applyRatiodebtPosition,
      vault: _vaultAddr,
      newProvider: _newProvider,
      userAddrs: new address[](0),
      userBalances: new uint256[](0),
      userliquidator: address(0),
      fliquidator: address(0)
    });

    IFlasher(payable(_fujiAdmin.getFlasher())).initiateFlashloan(info, _flashNum);

    IVault(_vaultAddr).setActiveProvider(_newProvider);
  }

  function setExecutors(address[] calldata _executors, bool _isExecutor) external onlyOwner {
    for (uint256 i = 0; i < _executors.length; i++) {
      isExecutor[_executors[i]] = _isExecutor;
    }
  }
}

File 2 of 10 : 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 3 of 10 : 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 4 of 10 : 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 5 of 10 : IVaultControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IVaultControl {
  struct VaultAssets {
    address collateralAsset;
    address borrowAsset;
    uint64 collateralID;
    uint64 borrowID;
  }

  function vAssets() external view returns (VaultAssets memory);
}

File 6 of 10 : IProvider.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IProvider {
  //Basic Core Functions

  function deposit(address _collateralAsset, uint256 _collateralAmount) external payable;

  function borrow(address _borrowAsset, uint256 _borrowAmount) external payable;

  function withdraw(address _collateralAsset, uint256 _collateralAmount) external payable;

  function payback(address _borrowAsset, uint256 _borrowAmount) external payable;

  // returns the borrow annualized rate for an asset in ray (1e27)
  //Example 8.5% annual interest = 0.085 x 10^27 = 85000000000000000000000000 or 85*(10**24)
  function getBorrowRateFor(address _asset) external view returns (uint256);

  function getBorrowBalance(address _asset) external view returns (uint256);

  function getDepositBalance(address _asset) external view returns (uint256);

  function getBorrowBalanceOf(address _asset, address _who) external returns (uint256);
}

File 7 of 10 : 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 8 of 10 : 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 9 of 10 : 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 10 of 10 : 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;
    }
}

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":"_vaultAddr","type":"address"},{"internalType":"address","name":"_newProvider","type":"address"},{"internalType":"uint256","name":"_ratioA","type":"uint256"},{"internalType":"uint256","name":"_ratioB","type":"uint256"},{"internalType":"uint8","name":"_flashNum","type":"uint8"}],"name":"doRefinancing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExecutor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"_executors","type":"address[]"},{"internalType":"bool","name":"_isExecutor","type":"bool"}],"name":"setExecutors","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"}]

608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b61103c8061007d6000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c806391c1543211610076578063debfda301161005b578063debfda3014610134578063e30c397814610154578063f2fde38b1461015c576100be565b806391c154321461011957806392fede001461012c576100be565b8063518f10b9116100a7578063518f10b9146100e0578063715018a6146100f35780638da5cb5b146100fb576100be565b806337016ad1146100c35780634e71e0c8146100d8575b600080fd5b6100d66100d1366004610b8d565b61016f565b005b6100d661023c565b6100d66100ee366004610b2a565b6102d3565b6100d6610876565b610103610906565b6040516101109190610d75565b60405180910390f35b6100d6610127366004610aeb565b610915565b6100d6610976565b610147610142366004610aeb565b610a07565b6040516101109190610da3565b610103610a1c565b6100d661016a366004610aeb565b610a2b565b610177610906565b6001600160a01b0316610188610aca565b6001600160a01b0316146101b75760405162461bcd60e51b81526004016101ae90610e38565b60405180910390fd5b60005b828110156102365781600360008686858181106101e757634e487b7160e01b600052603260045260246000fd5b90506020020160208101906101fc9190610aeb565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061022e81610faf565b9150506101ba565b50505050565b6001546001600160a01b0316610250610aca565b6001600160a01b03161461026357600080fd5b6001546001600160a01b0316610277610906565b6001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6002546040517f0f6ec81f00000000000000000000000000000000000000000000000000000000815286916001600160a01b031690630f6ec81f9061031c908490600401610d75565b60206040518083038186803b15801561033457600080fd5b505afa158015610348573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036c9190610c0d565b6103885760405162461bcd60e51b81526004016101ae90610e6d565b610390610906565b6001600160a01b0316336001600160a01b031614806103be57503360009081526003602052604090205460ff165b6103da5760405162461bcd60e51b81526004016101ae90610e01565b60008690506000876001600160a01b031663d8df4ce76040518163ffffffff1660e01b815260040160806040518083038186803b15801561041a57600080fd5b505afa15801561042e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104529190610c29565b9050816001600160a01b03166367ac280a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561048f57600080fd5b505af11580156104a3573d6000803e3d6000fd5b505050506000826001600160a01b03166397f75dd96040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e257600080fd5b505afa1580156104f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051a9190610b0e565b6001600160a01b0316635172437783602001518b6040518363ffffffff1660e01b815260040161054b929190610d89565b602060405180830381600087803b15801561056557600080fd5b505af1158015610579573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059d9190610cb5565b90506000866105ac8984610f90565b6105b69190610f70565b90508082101580156105c85750600081115b6040518060400160405280600381526020017f33303100000000000000000000000000000000000000000000000000000000008152509061061c5760405162461bcd60e51b81526004016101ae9190610dae565b506040805161012081019091526000908082815260200185602001516001600160a01b031681526020018381526020018c6001600160a01b031681526020018b6001600160a01b03168152602001600067ffffffffffffffff81111561069257634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156106bb578160200160208202803683370190505b50815260200160006040519080825280602002602001820160405280156106ec578160200160208202803683370190505b5081526000602080830182905260409283019190915260025482517f7fabc90b00000000000000000000000000000000000000000000000000000000815292519394506001600160a01b031692637fabc90b926004808201939291829003018186803b15801561075b57600080fd5b505afa15801561076f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107939190610b0e565b6001600160a01b0316635ccd808c82896040518363ffffffff1660e01b81526004016107c0929190610ea4565b600060405180830381600087803b1580156107da57600080fd5b505af11580156107ee573d6000803e3d6000fd5b50506040517f71e114300000000000000000000000000000000000000000000000000000000081526001600160a01b038e1692506371e114309150610837908d90600401610d75565b600060405180830381600087803b15801561085157600080fd5b505af1158015610865573d6000803e3d6000fd5b505050505050505050505050505050565b61087e610906565b6001600160a01b031661088f610aca565b6001600160a01b0316146108b55760405162461bcd60e51b81526004016101ae90610e38565b60006108bf610906565b6001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b61091d610906565b6001600160a01b031661092e610aca565b6001600160a01b0316146109545760405162461bcd60e51b81526004016101ae90610e38565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b61097e610906565b6001600160a01b031661098f610aca565b6001600160a01b0316146109b55760405162461bcd60e51b81526004016101ae90610e38565b6001546001600160a01b03166109ca57600080fd5b600180546001600160a01b03191690556040516000907f69737d41162474a7ca514809b07d7becaecf72eae8c23bceb071f0e09af93ffc908290a2565b60036020526000908152604090205460ff1681565b6001546001600160a01b031681565b610a33610906565b6001600160a01b0316610a44610aca565b6001600160a01b031614610a6a5760405162461bcd60e51b81526004016101ae90610e38565b6001546001600160a01b031615610a8057600080fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f69737d41162474a7ca514809b07d7becaecf72eae8c23bceb071f0e09af93ffc90600090a250565b3390565b805167ffffffffffffffff81168114610ae657600080fd5b919050565b600060208284031215610afc578081fd5b8135610b0781610fe0565b9392505050565b600060208284031215610b1f578081fd5b8151610b0781610fe0565b600080600080600060a08688031215610b41578081fd5b8535610b4c81610fe0565b94506020860135610b5c81610fe0565b93506040860135925060608601359150608086013560ff81168114610b7f578182fd5b809150509295509295909350565b600080600060408486031215610ba1578283fd5b833567ffffffffffffffff80821115610bb8578485fd5b818601915086601f830112610bcb578485fd5b813581811115610bd9578586fd5b8760208083028501011115610bec578586fd5b60209283019550935050840135610c0281610ff8565b809150509250925092565b600060208284031215610c1e578081fd5b8151610b0781610ff8565b600060808284031215610c3a578081fd5b6040516080810181811067ffffffffffffffff82111715610c6957634e487b7160e01b83526041600452602483fd5b6040528251610c7781610fe0565b81526020830151610c8781610fe0565b6020820152610c9860408401610ace565b6040820152610ca960608401610ace565b60608201529392505050565b600060208284031215610cc6578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b83811015610d125781516001600160a01b031687529582019590820190600101610ced565b509495945050505050565b6000815180845260208085019450808401835b83811015610d1257815187529582019590820190600101610d30565b60038110610d6a57634e487b7160e01b600052602160045260246000fd5b9052565b60ff169052565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b901515815260200190565b6000602080835283518082850152825b81811015610dda57858101830151858201604001528201610dbe565b81811115610deb5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252600d908201527f4e6f74206578656375746f722100000000000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201527f496e76616c6964207661756c7421000000000000000000000000000000000000604082015260600190565b600060408252610eb8604083018551610d4c565b6020840151610eca6060840182610ccd565b50604084015160808301526060840151610ee760a0840182610ccd565b506080840151610efa60c0840182610ccd565b5060a08401516101208060e0850152610f17610160850183610cda565b915060c0860151610100603f198685030181870152610f368483610d1d565b935060e08801519150610f4b83870183610ccd565b8701519150610f609050610140850182610ccd565b509050610b076020830184610d6e565b600082610f8b57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610faa57610faa610fca565b500290565b6000600019821415610fc357610fc3610fca565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610ff557600080fd5b50565b8015158114610ff557600080fdfea26469706673582212204c657205c12f7473bd978ffd23c675ad1d5c0e40556b5c99ddc471fa519b89d764736f6c63430008000033

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.