POL Price: $0.378214 (+0.52%)
 

Overview

Max Total Supply

6.930668151777877669 bfDMM-LP agEURjEUR-f-agDEN-JUL22

Holders

39

Total Transfers

-

Market

Price

$0.00 @ 0.000000 POL

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

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

Contract Name:
VaultProxy

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at polygonscan.com on 2021-07-09
*/

// Sources flattened with hardhat v2.1.1 https://hardhat.org

// File public/contracts/base/interface/IUpgradeSource.sol

//SPDX-License-Identifier: Unlicense

pragma solidity 0.6.12;

interface IUpgradeSource {
  function shouldUpgrade() external view returns (bool, address);
  function finalizeUpgrade() external;
}


// File public/contracts/base/upgradability/Proxy.sol

pragma solidity 0.6.12;

/**
 * @title Proxy
 * @dev Implements delegation of calls to other contracts, with proper
 * forwarding of return values and bubbling of failures.
 * It defines a fallback function that delegates all calls to the address
 * returned by the abstract _implementation() internal function.
 */
abstract contract Proxy {
  /**
   * @dev Fallback function.
   * Implemented entirely in `_fallback`.
   */
  fallback () payable external {
    _fallback();
  }

  receive () payable external {}

  /**
   * @return The Address of the implementation.
   */
  function _implementation() internal view virtual returns (address);

  /**
   * @dev Delegates execution to an implementation contract.
   * This is a low level function that doesn't return to its internal call site.
   * It will return to the external caller whatever the implementation returns.
   * @param implementation Address to delegate.
   */
  function _delegate(address implementation) internal {
    assembly {
      // Copy msg.data. We take full control of memory in this inline assembly
      // block because it will not return to Solidity code. We overwrite the
      // Solidity scratch pad at memory position 0.
      calldatacopy(0, 0, calldatasize())

      // Call the implementation.
      // out and outsize are 0 because we don't know the size yet.
      let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)

      // Copy the returned data.
      returndatacopy(0, 0, returndatasize())

      switch result
      // delegatecall returns 0 on error.
      case 0 { revert(0, returndatasize()) }
      default { return(0, returndatasize()) }
    }
  }

  /**
   * @dev Function that is run as the first thing in the fallback function.
   * Can be redefined in derived contracts to add functionality.
   * Redefinitions must call super._willFallback().
   */
  function _willFallback() internal {
  }

  /**
   * @dev fallback implementation.
   * Extracted to enable manual triggering.
   */
  function _fallback() internal {
    _willFallback();
    _delegate(_implementation());
  }
}


// File public/contracts/base/upgradability/Address.sol

pragma solidity 0.6.12;

/**
 * Utility library of inline functions on addresses
 *
 * Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/utils/Address.sol
 * This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts
 * when the user imports a zos-lib contract (that transitively causes this contract to be compiled and added to the
 * build/artifacts folder) as well as the vanilla Address implementation from an openzeppelin version.
 */
library OpenZeppelinUpgradesAddress {
    /**
     * Returns whether the target address is a contract
     * @dev This function will return false if invoked during the constructor of a contract,
     * as the code is not actually created until after the constructor finishes.
     * @param account address of the account to check
     * @return whether the target address is a contract
     */
    function isContract(address account) internal view returns (bool) {
        uint256 size;
        // XXX Currently there is no better way to check if there is a contract in an address
        // than to check the size of the code at that address.
        // See https://ethereum.stackexchange.com/a/14016/36603
        // for more details about how this works.
        // TODO Check this again before the Serenity release, because all addresses will be
        // contracts then.
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }
}


// File public/contracts/base/upgradability/BaseUpgradeabilityProxy.sol

pragma solidity 0.6.12;


/**
 * @title BaseUpgradeabilityProxy
 * @dev This contract implements a proxy that allows to change the
 * implementation address to which it will delegate.
 * Such a change is called an implementation upgrade.
 */
contract BaseUpgradeabilityProxy is Proxy {
  /**
   * @dev Emitted when the implementation is upgraded.
   * @param implementation Address of the new implementation.
   */
  event Upgraded(address indexed implementation);

  /**
   * @dev Storage slot with the address of the current implementation.
   * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
   * validated in the constructor.
   */
  bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

  /**
   * @dev Returns the current implementation.
   * @return impl Address of the current implementation
   */
  function _implementation() internal view override returns (address impl) {
    bytes32 slot = IMPLEMENTATION_SLOT;
    assembly {
      impl := sload(slot)
    }
  }

  /**
   * @dev Upgrades the proxy to a new implementation.
   * @param newImplementation Address of the new implementation.
   */
  function _upgradeTo(address newImplementation) internal {
    _setImplementation(newImplementation);
    emit Upgraded(newImplementation);
  }

  /**
   * @dev Sets the implementation address of the proxy.
   * @param newImplementation Address of the new implementation.
   */
  function _setImplementation(address newImplementation) internal {
    require(OpenZeppelinUpgradesAddress.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");

    bytes32 slot = IMPLEMENTATION_SLOT;

    assembly {
      sstore(slot, newImplementation)
    }
  }
}


// File public/contracts/base/VaultProxy.sol

pragma solidity 0.6.12;


contract VaultProxy is BaseUpgradeabilityProxy {

  constructor(address _implementation) public {
    _setImplementation(_implementation);
  }

  /**
  * The main logic. If the timer has elapsed and there is a schedule upgrade,
  * the governance can upgrade the vault
  */
  function upgrade() external {
    (bool should, address newImplementation) = IUpgradeSource(address(this)).shouldUpgrade();
    require(should, "Upgrade not scheduled");
    _upgradeTo(newImplementation);

    // the finalization needs to be executed on itself to update the storage of this proxy
    // it also needs to be invoked by the governance, not by address(this), so delegatecall is needed
    (bool success,) = address(this).delegatecall(
      abi.encodeWithSignature("finalizeUpgrade()")
    );

    require(success, "Issue when finalizing the upgrade");
  }

  function implementation() external view returns (address) {
    return _implementation();
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_implementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506040516105053803806105058339818101604052602081101561003357600080fd5b505161003e81610044565b506100bc565b610057816100b660201b6102761760201c565b6100925760405162461bcd60e51b815260040180806020018281038252603b8152602001806104ca603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b3b151590565b6103ff806100cb6000396000f3fe60806040526004361061002d5760003560e01c80635c60da1b1461003e578063d55ec6971461006f57610034565b3661003457005b61003c610084565b005b34801561004a57600080fd5b5061005361009e565b604080516001600160a01b039092168252519081900360200190f35b34801561007b57600080fd5b5061003c6100ad565b61008c61009c565b61009c61009761027c565b6102a1565b565b60006100a861027c565b905090565b600080306001600160a01b0316639d16acfd6040518163ffffffff1660e01b8152600401604080518083038186803b1580156100e857600080fd5b505afa1580156100fc573d6000803e3d6000fd5b505050506040513d604081101561011257600080fd5b50805160209091015190925090508161016a576040805162461bcd60e51b8152602060048201526015602482015274155c19dc985919481b9bdd081cd8da19591d5b1959605a1b604482015290519081900360640190fd5b610173816102c5565b60408051600481526024810182526020810180516001600160e01b0316634d28464760e11b17815291518151600093309392918291908083835b602083106101cc5780518252601f1990920191602091820191016101ad565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461022c576040519150601f19603f3d011682016040523d82523d6000602084013e610231565b606091505b50509050806102715760405162461bcd60e51b815260040180806020018281038252602181526020018061036e6021913960400191505060405180910390fd5b505050565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156102c0573d6000f35b3d6000fd5b6102ce81610305565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b61030e81610276565b6103495760405162461bcd60e51b815260040180806020018281038252603b81526020018061038f603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe4973737565207768656e2066696e616c697a696e6720746865207570677261646543616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220d2053a6c9616e179ccb90fec846d81788be248bd131b23a9e1e891c0c94a7cd564736f6c634300060c003343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373000000000000000000000000cf5f83f8fe0ab0f9e9c1db07e6606dd598b2bbf5

Deployed Bytecode

0x60806040526004361061002d5760003560e01c80635c60da1b1461003e578063d55ec6971461006f57610034565b3661003457005b61003c610084565b005b34801561004a57600080fd5b5061005361009e565b604080516001600160a01b039092168252519081900360200190f35b34801561007b57600080fd5b5061003c6100ad565b61008c61009c565b61009c61009761027c565b6102a1565b565b60006100a861027c565b905090565b600080306001600160a01b0316639d16acfd6040518163ffffffff1660e01b8152600401604080518083038186803b1580156100e857600080fd5b505afa1580156100fc573d6000803e3d6000fd5b505050506040513d604081101561011257600080fd5b50805160209091015190925090508161016a576040805162461bcd60e51b8152602060048201526015602482015274155c19dc985919481b9bdd081cd8da19591d5b1959605a1b604482015290519081900360640190fd5b610173816102c5565b60408051600481526024810182526020810180516001600160e01b0316634d28464760e11b17815291518151600093309392918291908083835b602083106101cc5780518252601f1990920191602091820191016101ad565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461022c576040519150601f19603f3d011682016040523d82523d6000602084013e610231565b606091505b50509050806102715760405162461bcd60e51b815260040180806020018281038252602181526020018061036e6021913960400191505060405180910390fd5b505050565b3b151590565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156102c0573d6000f35b3d6000fd5b6102ce81610305565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b61030e81610276565b6103495760405162461bcd60e51b815260040180806020018281038252603b81526020018061038f603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe4973737565207768656e2066696e616c697a696e6720746865207570677261646543616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220d2053a6c9616e179ccb90fec846d81788be248bd131b23a9e1e891c0c94a7cd564736f6c634300060c0033

Deployed Bytecode Sourcemap

6220:972:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;869:11;:9;:11::i;:::-;6220:972;7094:95;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;7094:95:0;;;;;;;;;;;;;;6506:582;;;;;;;;;;;;;:::i;2471:93::-;2508:15;:13;:15::i;:::-;2530:28;2540:17;:15;:17::i;:::-;2530:9;:28::i;:::-;2471:93::o;7094:95::-;7143:7;7166:17;:15;:17::i;:::-;7159:24;;7094:95;:::o;6506:582::-;6542:11;6555:25;6607:4;-1:-1:-1;;;;;6584:43:0;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6584:45:0;;;;;;;;;-1:-1:-1;6584:45:0;-1:-1:-1;6584:45:0;6636:40;;;;;-1:-1:-1;;;6636:40:0;;;;;;;;;;;;-1:-1:-1;;;6636:40:0;;;;;;;;;;;;;;;6683:29;6694:17;6683:10;:29::i;:::-;6969:44;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6969:44:0;-1:-1:-1;;;6969:44:0;;;6934:86;;;;6917:12;;6942:4;;6969:44;6934:86;;;6969:44;6934:86;;6969:44;6934:86;;;;;;;;;;-1:-1:-1;;6934:86:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6916:104;;;7037:7;7029:53;;;;-1:-1:-1;;;7029:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6506:582;;;:::o;3574:627::-;4146:20;4185:8;;;3574:627::o;5222:170::-;5031:66;5369:11;;5352:35::o;1352:762::-;1659:14;1656:1;1653;1640:34;1859:1;1856;1840:14;1837:1;1821:14;1814:5;1801:60;1926:16;1923:1;1920;1905:38;1960:6;2017:38;;;;2083:16;2080:1;2073:27;2017:38;2036:16;2033:1;2026:27;5533:145;5596:37;5615:17;5596:18;:37::i;:::-;5645:27;;-1:-1:-1;;;;;5645:27:0;;;;;;;;5533:145;:::o;5821:313::-;5900:57;5939:17;5900:38;:57::i;:::-;5892:129;;;;-1:-1:-1;;;5892:129:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5031:66;6091:31;6082:47::o

Swarm Source

ipfs://d2053a6c9616e179ccb90fec846d81788be248bd131b23a9e1e891c0c94a7cd5
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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