Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Get All Strategy... | 21160962 | 15 days ago | IN | 0 ETH | 0.00080569 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
21273889 | 2 hrs ago | 130.24058584 ETH | ||||
21273889 | 2 hrs ago | 30.3460565 ETH | ||||
21273889 | 2 hrs ago | 9.1819613 ETH | ||||
21273889 | 2 hrs ago | 0.06512029 ETH | ||||
21273889 | 2 hrs ago | 1.30240585 ETH | ||||
21273889 | 2 hrs ago | 89.34504188 ETH | ||||
21273853 | 2 hrs ago | 6.73047131 ETH | ||||
21273853 | 2 hrs ago | 1.56819981 ETH | ||||
21273853 | 2 hrs ago | 0.47449822 ETH | ||||
21273853 | 2 hrs ago | 0.00336523 ETH | ||||
21273853 | 2 hrs ago | 0.06730471 ETH | ||||
21273853 | 2 hrs ago | 4.61710331 ETH | ||||
21273816 | 2 hrs ago | 120.98005926 ETH | ||||
21273816 | 2 hrs ago | 28.1883538 ETH | ||||
21273816 | 2 hrs ago | 8.52909417 ETH | ||||
21273816 | 2 hrs ago | 0.06049002 ETH | ||||
21273816 | 2 hrs ago | 1.20980059 ETH | ||||
21273816 | 2 hrs ago | 82.99232065 ETH | ||||
21273805 | 2 hrs ago | 6,763.13347714 ETH | ||||
21273805 | 2 hrs ago | 1,576.05799504 ETH | ||||
21273805 | 2 hrs ago | 476.46076871 ETH | ||||
21273805 | 2 hrs ago | 3.35059615 ETH | ||||
21273805 | 2 hrs ago | 67.01192303 ETH | ||||
21273805 | 2 hrs ago | 4,640.25219419 ETH | ||||
21269158 | 17 hrs ago | 0.00030434 ETH |
Loading...
Loading
Contract Name:
StrategyController
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 10 runs
Other Settings:
shanghai EvmVersion, Audited
Contract Source Code (Solidity Standard Json-Input format)Audit Report
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import {TransferHelper} from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; import {Strategy} from "./Strategy.sol"; import {AssetsVault} from "../AssetsVault.sol"; contract StrategyController { using EnumerableSet for EnumerableSet.AddressSet; uint256 internal constant ONE_HUNDRED_PERCENT = 1e6; address public stoneVault; address payable public immutable assetsVault; EnumerableSet.AddressSet private strategies; mapping(address => uint256) public ratios; struct StrategyDiff { address strategy; bool isDeposit; uint256 amount; } modifier onlyVault() { require(stoneVault == msg.sender, "not vault"); _; } constructor( address payable _assetsVault, address[] memory _strategies, uint256[] memory _ratios ) { require(_assetsVault != address(0), "ZERO ADDRESS"); uint256 length = _strategies.length; for (uint256 i; i < length; i++) { require(_strategies[i] != address(0), "ZERO ADDRESS"); } stoneVault = msg.sender; assetsVault = _assetsVault; _initStrategies(_strategies, _ratios); } function onlyRebaseStrategies() external { _rebase(0, 0); } function forceWithdraw( uint256 _amount ) external onlyVault returns (uint256 actualAmount) { uint256 balanceBeforeRepay = address(this).balance; if (balanceBeforeRepay >= _amount) { _repayToVault(); actualAmount = balanceBeforeRepay; } else { actualAmount = _forceWithdraw(_amount - balanceBeforeRepay) + balanceBeforeRepay; } } function setStrategies( address[] memory _strategies, uint256[] memory _ratios ) external onlyVault { _setStrategies(_strategies, _ratios); } function addStrategy(address _strategy) external onlyVault { require(!strategies.contains(_strategy), "already exist"); strategies.add(_strategy); } function rebaseStrategies( uint256 _in, uint256 _out ) external payable onlyVault { _rebase(_in, _out); } function destroyStrategy(address _strategy) external onlyVault { _destoryStrategy(_strategy); } function _rebase(uint256 _in, uint256 _out) internal { require(_in == 0 || _out == 0, "only deposit or withdraw"); if (_in != 0) { AssetsVault(assetsVault).withdraw(address(this), _in); } uint256 total = getAllStrategyValidValue(); if (total < _out) { total = 0; } else { total = total + _in - _out; } uint256 length = strategies.length(); StrategyDiff[] memory diffs = new StrategyDiff[](length); uint256 head; uint256 tail = length - 1; for (uint i; i < length; i++) { address strategy = strategies.at(i); if (ratios[strategy] == 0) { _clearStrategy(strategy, true); continue; } uint256 newPosition = (total * ratios[strategy]) / ONE_HUNDRED_PERCENT; uint256 position = getStrategyValidValue(strategy); if (newPosition < position) { diffs[head] = StrategyDiff( strategy, false, position - newPosition ); head++; } else if (newPosition > position) { diffs[tail] = StrategyDiff( strategy, true, newPosition - position ); if (tail != 0) { tail--; } } } length = diffs.length; for (uint256 i; i < length; i++) { StrategyDiff memory diff = diffs[i]; if (diff.amount == 0) { continue; } if (diff.isDeposit) { if (address(this).balance < diff.amount) { diff.amount = address(this).balance; } _depositToStrategy(diff.strategy, diff.amount); } else { _withdrawFromStrategy(diff.strategy, diff.amount); } } _repayToVault(); } function _repayToVault() internal { if (address(this).balance != 0) { TransferHelper.safeTransferETH(assetsVault, address(this).balance); } } function _depositToStrategy(address _strategy, uint256 _amount) internal { Strategy(_strategy).deposit{value: _amount}(); } function _withdrawFromStrategy( address _strategy, uint256 _amount ) internal { Strategy(_strategy).withdraw(_amount); } function _forceWithdraw( uint256 _amount ) internal returns (uint256 actualAmount) { uint256 length = strategies.length(); for (uint i; i < length; i++) { address strategy = strategies.at(i); uint256 withAmount = (_amount * ratios[strategy]) / ONE_HUNDRED_PERCENT; if (withAmount != 0) { actualAmount = Strategy(strategy).instantWithdraw(withAmount) + actualAmount; } } _repayToVault(); } function getStrategyValue( address _strategy ) public returns (uint256 _value) { return Strategy(_strategy).getAllValue(); } function getStrategyValidValue( address _strategy ) public returns (uint256 _value) { return Strategy(_strategy).getInvestedValue(); } function getStrategyPendingValue( address _strategy ) public returns (uint256 _value) { return Strategy(_strategy).getPendingValue(); } function getAllStrategiesValue() public returns (uint256 _value) { uint256 length = strategies.length(); for (uint i; i < length; i++) { _value = _value + getStrategyValue(strategies.at(i)); } } function getAllStrategyValidValue() public returns (uint256 _value) { uint256 length = strategies.length(); for (uint i; i < length; i++) { _value = _value + getStrategyValidValue(strategies.at(i)); } } function getAllStrategyPendingValue() public returns (uint256 _value) { uint256 length = strategies.length(); for (uint i; i < length; i++) { _value = _value + getStrategyPendingValue(strategies.at(i)); } } function getStrategies() public view returns (address[] memory addrs, uint256[] memory portions) { uint256 length = strategies.length(); addrs = new address[](length); portions = new uint256[](length); for (uint256 i; i < length; i++) { address addr = strategies.at(i); addrs[i] = addr; portions[i] = ratios[addr]; } } function _initStrategies( address[] memory _strategies, uint256[] memory _ratios ) internal { require(_strategies.length == _ratios.length, "invalid length"); uint256 totalRatio; uint256 length = _strategies.length; for (uint i; i < length; i++) { strategies.add(_strategies[i]); ratios[_strategies[i]] = _ratios[i]; totalRatio = totalRatio + _ratios[i]; } require(totalRatio <= ONE_HUNDRED_PERCENT, "exceed 100%"); } function _setStrategies( address[] memory _strategies, uint256[] memory _ratios ) internal { uint256 length = _strategies.length; require(length == _ratios.length, "invalid length"); uint256 oldLength = strategies.length(); for (uint i; i < oldLength; i++) { ratios[strategies.at(i)] = 0; } uint256 totalRatio; for (uint i; i < length; i++) { require( Strategy(_strategies[i]).controller() == address(this), "controller mismatch" ); strategies.add(_strategies[i]); ratios[_strategies[i]] = _ratios[i]; totalRatio = totalRatio + _ratios[i]; } require(totalRatio <= ONE_HUNDRED_PERCENT, "exceed 100%"); } function clearStrategy(address _strategy) public onlyVault { _clearStrategy(_strategy, false); } function _clearStrategy(address _strategy, bool _isRebase) internal { Strategy(_strategy).clear(); if (!_isRebase) { _repayToVault(); } } function _destoryStrategy(address _strategy) internal { require(_couldDestroyStrategy(_strategy), "still active"); strategies.remove(_strategy); _repayToVault(); } function _couldDestroyStrategy( address _strategy ) internal returns (bool status) { return ratios[_strategy] == 0 && Strategy(_strategy).getAllValue() < 1e4; } function setNewVault(address _vault) external onlyVault { stoneVault = _vault; } receive() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import {StrategyController} from "../strategies/StrategyController.sol"; abstract contract Strategy { address payable public immutable controller; address public governance; string public name; modifier onlyGovernance() { require(governance == msg.sender, "not governace"); _; } event TransferGovernance(address oldOwner, address newOwner); constructor(address payable _controller, string memory _name) { require(_controller != address(0), "ZERO ADDRESS"); governance = msg.sender; controller = _controller; name = _name; } modifier onlyController() { require(controller == msg.sender, "not controller"); _; } function deposit() public payable virtual onlyController {} function withdraw( uint256 _amount ) public virtual onlyController returns (uint256 actualAmount) {} function instantWithdraw( uint256 _amount ) public virtual onlyController returns (uint256 actualAmount) {} function clear() public virtual onlyController returns (uint256 amount) {} function execPendingRequest( uint256 _amount ) public virtual returns (uint256 amount) {} function getAllValue() public virtual returns (uint256 value) {} function getPendingValue() public virtual returns (uint256 value) {} function getInvestedValue() public virtual returns (uint256 value) {} function checkPendingStatus() public virtual returns (uint256 pending, uint256 executable) {} function setGovernance(address governance_) external onlyGovernance { emit TransferGovernance(governance, governance_); governance = governance_; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.21; import {TransferHelper} from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; contract AssetsVault { address public stoneVault; address public strategyController; modifier onlyPermit() { require( stoneVault == msg.sender || strategyController == msg.sender, "not permit" ); _; } constructor(address _stoneVault, address _strategyController) { require( _stoneVault != address(0) && _strategyController != address(0), "ZERO ADDRESS" ); stoneVault = _stoneVault; strategyController = _strategyController; } function deposit() external payable { require(msg.value != 0, "too small"); } function withdraw(address _to, uint256 _amount) external onlyPermit { TransferHelper.safeTransferETH(_to, _amount); } function setNewVault(address _vault) external onlyPermit { stoneVault = _vault; } function getBalance() external view returns (uint256 amount) { amount = address(this).balance; } receive() external payable {} }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; library TransferHelper { /// @notice Transfers tokens from the targeted address to the given destination /// @notice Errors with 'STF' if transfer fails /// @param token The contract address of the token to be transferred /// @param from The originating address from which the tokens will be transferred /// @param to The destination address of the transfer /// @param value The amount to be transferred function safeTransferFrom( address token, address from, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF'); } /// @notice Transfers tokens from msg.sender to a recipient /// @dev Errors with ST if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST'); } /// @notice Approves the stipulated contract to spend the given allowance in the given token /// @dev Errors with 'SA' if transfer fails /// @param token The contract address of the token to be approved /// @param to The target of the approval /// @param value The amount of the given token the target will be allowed to spend function safeApprove( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA'); } /// @notice Transfers ETH to the recipient address /// @dev Fails with `STE` /// @param to The destination of the transfer /// @param value The value to be transferred function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'STE'); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool); }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 10 }, "evmVersion": "shanghai", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- Quantstamp - July 13th, 2024 - Security Audit Report
[{"inputs":[{"internalType":"address payable","name":"_assetsVault","type":"address"},{"internalType":"address[]","name":"_strategies","type":"address[]"},{"internalType":"uint256[]","name":"_ratios","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"addStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"assetsVault","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"clearStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"destroyStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"forceWithdraw","outputs":[{"internalType":"uint256","name":"actualAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllStrategiesValue","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllStrategyPendingValue","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllStrategyValidValue","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getStrategies","outputs":[{"internalType":"address[]","name":"addrs","type":"address[]"},{"internalType":"uint256[]","name":"portions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"getStrategyPendingValue","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"getStrategyValidValue","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategy","type":"address"}],"name":"getStrategyValue","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"onlyRebaseStrategies","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ratios","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_in","type":"uint256"},{"internalType":"uint256","name":"_out","type":"uint256"}],"name":"rebaseStrategies","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setNewVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_strategies","type":"address[]"},{"internalType":"uint256[]","name":"_ratios","type":"uint256[]"}],"name":"setStrategies","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stoneVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a060405234801562000010575f80fd5b5060405162001d1f38038062001d1f8339810160408190526200003391620003df565b6001600160a01b038316620000655760405162461bcd60e51b81526004016200005c90620004c0565b60405180910390fd5b81515f5b81811015620000d7575f6001600160a01b0316848281518110620000915762000091620004e6565b60200260200101516001600160a01b031603620000c25760405162461bcd60e51b81526004016200005c90620004c0565b80620000ce816200050e565b91505062000069565b505f80546001600160a01b031916331790556001600160a01b0384166080526200010283836200010c565b505050506200053f565b8051825114620001505760405162461bcd60e51b815260206004820152600e60248201526d0d2dcecc2d8d2c840d8cadccee8d60931b60448201526064016200005c565b81515f90815b81811015620002335762000191858281518110620001785762000178620004e6565b602002602001015160016200027d60201b90919060201c565b50838181518110620001a757620001a7620004e6565b602002602001015160035f878481518110620001c757620001c7620004e6565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2081905550838181518110620002075762000207620004e6565b6020026020010151836200021c919062000529565b9250806200022a816200050e565b91505062000156565b50620f4240821115620002775760405162461bcd60e51b815260206004820152600b60248201526a657863656564203130302560a81b60448201526064016200005c565b50505050565b5f62000293836001600160a01b0384166200029c565b90505b92915050565b5f818152600183016020526040812054620002e357508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915562000296565b505f62000296565b6001600160a01b038116811462000300575f80fd5b50565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171562000342576200034262000303565b604052919050565b5f6001600160401b0382111562000365576200036562000303565b5060051b60200190565b5f82601f8301126200037f575f80fd5b815160206200039862000392836200034a565b62000317565b82815260059290921b84018101918181019086841115620003b7575f80fd5b8286015b84811015620003d45780518352918301918301620003bb565b509695505050505050565b5f805f60608486031215620003f2575f80fd5b8351620003ff81620002eb565b602085810151919450906001600160401b03808211156200041e575f80fd5b818701915087601f83011262000432575f80fd5b81516200044362000392826200034a565b81815260059190911b8301840190848101908a83111562000462575f80fd5b938501935b828510156200048d5784516200047d81620002eb565b8252938501939085019062000467565b60408a01519097509450505080831115620004a6575f80fd5b5050620004b6868287016200036f565b9150509250925092565b6020808252600c908201526b5a45524f204144445245535360a01b604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f60018201620005225762000522620004fa565b5060010190565b80820180821115620002965762000296620004fa565b6080516117b9620005665f395f81816101e50152818161083c01526109fa01526117b95ff3fe6080604052600436106100db575f3560e01c80630fcc56f7146100e6578063223e54791461011857806324c71ece146101395780633b30f9c4146101645780633fea70a714610177578063717dd44514610196578063768aac5d146101b55780637b0c1f29146101d457806397663b741461021f5780639841ab00146102335780639d241e7a14610252578063b49a60bb14610266578063ba93ec2914610288578063e7b77f70146102a6578063f111a5c3146102c5578063f25ddb62146102e4578063f41d7a1814610303578063f837df2514610317575f80fd5b366100e257005b5f80fd5b3480156100f1575f80fd5b506101056101003660046113cc565b61032b565b6040519081526020015b60405180910390f35b348015610123575f80fd5b506101376101323660046113f7565b61039c565b005b348015610144575f80fd5b506101056101533660046113f7565b60036020525f908152604090205481565b610137610172366004611412565b61041c565b348015610182575f80fd5b50610137610191366004611500565b61044f565b3480156101a1575f80fd5b506101376101b03660046113f7565b610482565b3480156101c0575f80fd5b506101376101cf3660046113f7565b6104b7565b3480156101df575f80fd5b506102077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161010f565b34801561022a575f80fd5b506101376104ea565b34801561023e575f80fd5b5061010561024d3660046113f7565b6104f6565b34801561025d575f80fd5b5061010561055e565b348015610271575f80fd5b5061027a6105a7565b60405161010f9291906115bb565b348015610293575f80fd5b505f54610207906001600160a01b031681565b3480156102b1575f80fd5b506101376102c03660046113f7565b6106e4565b3480156102d0575f80fd5b506101056102df3660046113f7565b61072e565b3480156102ef575f80fd5b506101056102fe3660046113f7565b61076b565b34801561030e575f80fd5b506101056107a9565b348015610322575f80fd5b506101056107ed565b5f80546001600160a01b0316331461035e5760405162461bcd60e51b81526004016103559061163d565b60405180910390fd5b478281106103765761036e610831565b809150610396565b806103896103848286611674565b610861565b6103939190611687565b91505b50919050565b5f546001600160a01b031633146103c55760405162461bcd60e51b81526004016103559061163d565b6103d0600182610957565b1561040d5760405162461bcd60e51b815260206004820152600d60248201526c185b1c9958591e48195e1a5cdd609a1b6044820152606401610355565b610418600182610972565b5050565b5f546001600160a01b031633146104455760405162461bcd60e51b81526004016103559061163d565b6104188282610986565b5f546001600160a01b031633146104785760405162461bcd60e51b81526004016103559061163d565b6104188282610d1b565b5f546001600160a01b031633146104ab5760405162461bcd60e51b81526004016103559061163d565b6104b481610f94565b50565b5f546001600160a01b031633146104e05760405162461bcd60e51b81526004016103559061163d565b6104b4815f610fec565b6104f45f80610986565b565b5f816001600160a01b0316637654f7ab6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610534573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610558919061169a565b92915050565b5f8061056a600161105b565b90505f5b818110156105a25761058461024d600183611064565b61058e9084611687565b92508061059a816116b1565b91505061056e565b505090565b6060805f6105b5600161105b565b9050806001600160401b038111156105cf576105cf611432565b6040519080825280602002602001820160405280156105f8578160200160208202803683370190505b509250806001600160401b0381111561061357610613611432565b60405190808252806020026020018201604052801561063c578160200160208202803683370190505b5091505f5b818110156106de575f610655600183611064565b90508085838151811061066a5761066a6116c9565b60200260200101906001600160a01b031690816001600160a01b03168152505060035f826001600160a01b03166001600160a01b031681526020019081526020015f20548483815181106106c0576106c06116c9565b602090810291909101015250806106d6816116b1565b915050610641565b50509091565b5f546001600160a01b0316331461070d5760405162461bcd60e51b81526004016103559061163d565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f816001600160a01b0316621a55976040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610534573d5f803e3d5ffd5b5f816001600160a01b0316636c23ab4c6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610534573d5f803e3d5ffd5b5f806107b5600161105b565b90505f5b818110156105a2576107cf6102df600183611064565b6107d99084611687565b9250806107e5816116b1565b9150506107b9565b5f806107f9600161105b565b90505f5b818110156105a2576108136102fe600183611064565b61081d9084611687565b925080610829816116b1565b9150506107fd565b47156104f4576104f47f00000000000000000000000000000000000000000000000000000000000000004761106f565b5f8061086d600161105b565b90505f5b8181101561094e575f610885600183611064565b6001600160a01b0381165f9081526003602052604081205491925090620f4240906108b090886116dd565b6108ba91906116f4565b9050801561093957604051637ec95ff960e11b81526004810182905285906001600160a01b0384169063fd92bff2906024016020604051808303815f875af1158015610908573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061092c919061169a565b6109369190611687565b94505b50508080610946906116b1565b915050610871565b50610396610831565b5f61096b836001600160a01b038416611113565b9392505050565b5f61096b836001600160a01b03841661112a565b811580610991575080155b6109d85760405162461bcd60e51b81526020600482015260186024820152776f6e6c79206465706f736974206f7220776974686472617760401b6044820152606401610355565b8115610a5a5760405163f3fef3a360e01b8152306004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f3fef3a3906044015f604051808303815f87803b158015610a43575f80fd5b505af1158015610a55573d5f803e3d5ffd5b505050505b5f610a636107ed565b905081811015610a7457505f610a8c565b81610a7f8483611687565b610a899190611674565b90505b5f610a97600161105b565b90505f816001600160401b03811115610ab257610ab2611432565b604051908082528060200260200182016040528015610afb57816020015b604080516060810182525f80825260208083018290529282015282525f19909201910181610ad05790505b5090505f80610b0b600185611674565b90505f5b84811015610c74575f610b23600183611064565b6001600160a01b0381165f9081526003602052604081205491925003610b5457610b4e816001610fec565b50610c62565b6001600160a01b0381165f90815260036020526040812054620f424090610b7b908a6116dd565b610b8591906116f4565b90505f610b918361076b565b905080821015610bf757604080516060810182526001600160a01b03851681525f6020820152908101610bc48484611674565b815250878781518110610bd957610bd96116c9565b60200260200101819052508580610bef906116b1565b965050610c5e565b80821115610c5e57604080516060810182526001600160a01b038516815260016020820152908101610c298385611674565b815250878681518110610c3e57610c3e6116c9565b6020026020010181905250845f14610c5e5784610c5a81611713565b9550505b5050505b80610c6c816116b1565b915050610b0f565b50825193505f5b84811015610d09575f848281518110610c9657610c966116c9565b6020026020010151905080604001515f03610cb15750610cf7565b806020015115610ce4578060400151471015610cce574760408201525b610cdf815f01518260400151611171565b610cf5565b610cf5815f015182604001516111bc565b505b80610d01816116b1565b915050610c7b565b50610d12610831565b50505050505050565b815181518114610d5e5760405162461bcd60e51b815260206004820152600e60248201526d0d2dcecc2d8d2c840d8cadccee8d60931b6044820152606401610355565b5f610d69600161105b565b90505f5b81811015610daf575f600381610d84600185611064565b6001600160a01b0316815260208101919091526040015f205580610da7816116b1565b915050610d6d565b505f805b83811015610f4b57306001600160a01b0316868281518110610dd757610dd76116c9565b60200260200101516001600160a01b031663f77c47916040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e1a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e3e9190611728565b6001600160a01b031614610e8a5760405162461bcd60e51b81526020600482015260136024820152720c6dedce8e4ded8d8cae440dad2e6dac2e8c6d606b1b6044820152606401610355565b610eb7868281518110610e9f57610e9f6116c9565b6020026020010151600161097290919063ffffffff16565b50848181518110610eca57610eca6116c9565b602002602001015160035f888481518110610ee757610ee76116c9565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2081905550848181518110610f2457610f246116c9565b602002602001015182610f379190611687565b915080610f43816116b1565b915050610db3565b50620f4240811115610f8d5760405162461bcd60e51b815260206004820152600b60248201526a657863656564203130302560a81b6044820152606401610355565b5050505050565b610f9d81611224565b610fd85760405162461bcd60e51b815260206004820152600c60248201526b7374696c6c2061637469766560a01b6044820152606401610355565b610fe36001826112af565b506104b4610831565b816001600160a01b03166352efea6e6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611029573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061104d919061169a565b508061041857610418610831565b5f610558825490565b5f61096b83836112c3565b604080515f808252602082019092526001600160a01b0384169083906040516110989190611743565b5f6040518083038185875af1925050503d805f81146110d2576040519150601f19603f3d011682016040523d82523d5f602084013e6110d7565b606091505b505090508061110e5760405162461bcd60e51b815260206004820152600360248201526253544560e81b6044820152606401610355565b505050565b5f9081526001919091016020526040902054151590565b5f6111358383611113565b61116a57508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610558565b505f610558565b816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b1580156111aa575f80fd5b505af1158015610d12573d5f803e3d5ffd5b604051632e1a7d4d60e01b8152600481018290526001600160a01b03831690632e1a7d4d906024016020604051808303815f875af1158015611200573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061110e919061169a565b6001600160a01b0381165f908152600360205260408120541580156105585750612710826001600160a01b0316637654f7ab6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611284573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112a8919061169a565b1092915050565b5f61096b836001600160a01b0384166112e9565b5f825f0182815481106112d8576112d86116c9565b905f5260205f200154905092915050565b5f81815260018301602052604081205480156113c3575f61130b600183611674565b85549091505f9061131e90600190611674565b905081811461137d575f865f01828154811061133c5761133c6116c9565b905f5260205f200154905080875f01848154811061135c5761135c6116c9565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061138e5761138e61176f565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610558565b5f915050610558565b5f602082840312156113dc575f80fd5b5035919050565b6001600160a01b03811681146104b4575f80fd5b5f60208284031215611407575f80fd5b813561096b816113e3565b5f8060408385031215611423575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561146e5761146e611432565b604052919050565b5f6001600160401b0382111561148e5761148e611432565b5060051b60200190565b5f82601f8301126114a7575f80fd5b813560206114bc6114b783611476565b611446565b82815260059290921b840181019181810190868411156114da575f80fd5b8286015b848110156114f557803583529183019183016114de565b509695505050505050565b5f8060408385031215611511575f80fd5b82356001600160401b0380821115611527575f80fd5b818501915085601f83011261153a575f80fd5b8135602061154a6114b783611476565b82815260059290921b84018101918181019089841115611568575f80fd5b948201945b8386101561158f578535611580816113e3565b8252948201949082019061156d565b965050860135925050808211156115a4575f80fd5b506115b185828601611498565b9150509250929050565b604080825283519082018190525f906020906060840190828701845b828110156115fc5781516001600160a01b0316845292840192908401906001016115d7565b505050838103828501528451808252858301918301905f5b8181101561163057835183529284019291840191600101611614565b5090979650505050505050565b6020808252600990820152681b9bdd081d985d5b1d60ba1b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561055857610558611660565b8082018082111561055857610558611660565b5f602082840312156116aa575f80fd5b5051919050565b5f600182016116c2576116c2611660565b5060010190565b634e487b7160e01b5f52603260045260245ffd5b808202811582820484141761055857610558611660565b5f8261170e57634e487b7160e01b5f52601260045260245ffd5b500490565b5f8161172157611721611660565b505f190190565b5f60208284031215611738575f80fd5b815161096b816113e3565b5f82515f5b818110156117625760208186018101518583015201611748565b505f920191825250919050565b634e487b7160e01b5f52603160045260245ffdfea2646970667358221220c3b133e34d49b8d48a24baaba288593e602faa536b943886e53af085ebcbe5ec64736f6c634300081500330000000000000000000000009485711f11b17f73f2ccc8561bcae05bdc7e9ad9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000363d200e54fe86985790f4e210df9bfb142342020000000000000000000000009221fbe66be06f43dcbda3fc17cdd66ef1b236f9000000000000000000000000a66723d951f15423ef2c9c11edcb821e38301836000000000000000000000000856edf1b835ea02bf11b16f041df5a13ef1ec3d10000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000c35000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061a800000000000000000000000000000000000000000000000000000000000086470
Deployed Bytecode
0x6080604052600436106100db575f3560e01c80630fcc56f7146100e6578063223e54791461011857806324c71ece146101395780633b30f9c4146101645780633fea70a714610177578063717dd44514610196578063768aac5d146101b55780637b0c1f29146101d457806397663b741461021f5780639841ab00146102335780639d241e7a14610252578063b49a60bb14610266578063ba93ec2914610288578063e7b77f70146102a6578063f111a5c3146102c5578063f25ddb62146102e4578063f41d7a1814610303578063f837df2514610317575f80fd5b366100e257005b5f80fd5b3480156100f1575f80fd5b506101056101003660046113cc565b61032b565b6040519081526020015b60405180910390f35b348015610123575f80fd5b506101376101323660046113f7565b61039c565b005b348015610144575f80fd5b506101056101533660046113f7565b60036020525f908152604090205481565b610137610172366004611412565b61041c565b348015610182575f80fd5b50610137610191366004611500565b61044f565b3480156101a1575f80fd5b506101376101b03660046113f7565b610482565b3480156101c0575f80fd5b506101376101cf3660046113f7565b6104b7565b3480156101df575f80fd5b506102077f0000000000000000000000009485711f11b17f73f2ccc8561bcae05bdc7e9ad981565b6040516001600160a01b03909116815260200161010f565b34801561022a575f80fd5b506101376104ea565b34801561023e575f80fd5b5061010561024d3660046113f7565b6104f6565b34801561025d575f80fd5b5061010561055e565b348015610271575f80fd5b5061027a6105a7565b60405161010f9291906115bb565b348015610293575f80fd5b505f54610207906001600160a01b031681565b3480156102b1575f80fd5b506101376102c03660046113f7565b6106e4565b3480156102d0575f80fd5b506101056102df3660046113f7565b61072e565b3480156102ef575f80fd5b506101056102fe3660046113f7565b61076b565b34801561030e575f80fd5b506101056107a9565b348015610322575f80fd5b506101056107ed565b5f80546001600160a01b0316331461035e5760405162461bcd60e51b81526004016103559061163d565b60405180910390fd5b478281106103765761036e610831565b809150610396565b806103896103848286611674565b610861565b6103939190611687565b91505b50919050565b5f546001600160a01b031633146103c55760405162461bcd60e51b81526004016103559061163d565b6103d0600182610957565b1561040d5760405162461bcd60e51b815260206004820152600d60248201526c185b1c9958591e48195e1a5cdd609a1b6044820152606401610355565b610418600182610972565b5050565b5f546001600160a01b031633146104455760405162461bcd60e51b81526004016103559061163d565b6104188282610986565b5f546001600160a01b031633146104785760405162461bcd60e51b81526004016103559061163d565b6104188282610d1b565b5f546001600160a01b031633146104ab5760405162461bcd60e51b81526004016103559061163d565b6104b481610f94565b50565b5f546001600160a01b031633146104e05760405162461bcd60e51b81526004016103559061163d565b6104b4815f610fec565b6104f45f80610986565b565b5f816001600160a01b0316637654f7ab6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610534573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610558919061169a565b92915050565b5f8061056a600161105b565b90505f5b818110156105a25761058461024d600183611064565b61058e9084611687565b92508061059a816116b1565b91505061056e565b505090565b6060805f6105b5600161105b565b9050806001600160401b038111156105cf576105cf611432565b6040519080825280602002602001820160405280156105f8578160200160208202803683370190505b509250806001600160401b0381111561061357610613611432565b60405190808252806020026020018201604052801561063c578160200160208202803683370190505b5091505f5b818110156106de575f610655600183611064565b90508085838151811061066a5761066a6116c9565b60200260200101906001600160a01b031690816001600160a01b03168152505060035f826001600160a01b03166001600160a01b031681526020019081526020015f20548483815181106106c0576106c06116c9565b602090810291909101015250806106d6816116b1565b915050610641565b50509091565b5f546001600160a01b0316331461070d5760405162461bcd60e51b81526004016103559061163d565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b5f816001600160a01b0316621a55976040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610534573d5f803e3d5ffd5b5f816001600160a01b0316636c23ab4c6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610534573d5f803e3d5ffd5b5f806107b5600161105b565b90505f5b818110156105a2576107cf6102df600183611064565b6107d99084611687565b9250806107e5816116b1565b9150506107b9565b5f806107f9600161105b565b90505f5b818110156105a2576108136102fe600183611064565b61081d9084611687565b925080610829816116b1565b9150506107fd565b47156104f4576104f47f0000000000000000000000009485711f11b17f73f2ccc8561bcae05bdc7e9ad94761106f565b5f8061086d600161105b565b90505f5b8181101561094e575f610885600183611064565b6001600160a01b0381165f9081526003602052604081205491925090620f4240906108b090886116dd565b6108ba91906116f4565b9050801561093957604051637ec95ff960e11b81526004810182905285906001600160a01b0384169063fd92bff2906024016020604051808303815f875af1158015610908573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061092c919061169a565b6109369190611687565b94505b50508080610946906116b1565b915050610871565b50610396610831565b5f61096b836001600160a01b038416611113565b9392505050565b5f61096b836001600160a01b03841661112a565b811580610991575080155b6109d85760405162461bcd60e51b81526020600482015260186024820152776f6e6c79206465706f736974206f7220776974686472617760401b6044820152606401610355565b8115610a5a5760405163f3fef3a360e01b8152306004820152602481018390527f0000000000000000000000009485711f11b17f73f2ccc8561bcae05bdc7e9ad96001600160a01b03169063f3fef3a3906044015f604051808303815f87803b158015610a43575f80fd5b505af1158015610a55573d5f803e3d5ffd5b505050505b5f610a636107ed565b905081811015610a7457505f610a8c565b81610a7f8483611687565b610a899190611674565b90505b5f610a97600161105b565b90505f816001600160401b03811115610ab257610ab2611432565b604051908082528060200260200182016040528015610afb57816020015b604080516060810182525f80825260208083018290529282015282525f19909201910181610ad05790505b5090505f80610b0b600185611674565b90505f5b84811015610c74575f610b23600183611064565b6001600160a01b0381165f9081526003602052604081205491925003610b5457610b4e816001610fec565b50610c62565b6001600160a01b0381165f90815260036020526040812054620f424090610b7b908a6116dd565b610b8591906116f4565b90505f610b918361076b565b905080821015610bf757604080516060810182526001600160a01b03851681525f6020820152908101610bc48484611674565b815250878781518110610bd957610bd96116c9565b60200260200101819052508580610bef906116b1565b965050610c5e565b80821115610c5e57604080516060810182526001600160a01b038516815260016020820152908101610c298385611674565b815250878681518110610c3e57610c3e6116c9565b6020026020010181905250845f14610c5e5784610c5a81611713565b9550505b5050505b80610c6c816116b1565b915050610b0f565b50825193505f5b84811015610d09575f848281518110610c9657610c966116c9565b6020026020010151905080604001515f03610cb15750610cf7565b806020015115610ce4578060400151471015610cce574760408201525b610cdf815f01518260400151611171565b610cf5565b610cf5815f015182604001516111bc565b505b80610d01816116b1565b915050610c7b565b50610d12610831565b50505050505050565b815181518114610d5e5760405162461bcd60e51b815260206004820152600e60248201526d0d2dcecc2d8d2c840d8cadccee8d60931b6044820152606401610355565b5f610d69600161105b565b90505f5b81811015610daf575f600381610d84600185611064565b6001600160a01b0316815260208101919091526040015f205580610da7816116b1565b915050610d6d565b505f805b83811015610f4b57306001600160a01b0316868281518110610dd757610dd76116c9565b60200260200101516001600160a01b031663f77c47916040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e1a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e3e9190611728565b6001600160a01b031614610e8a5760405162461bcd60e51b81526020600482015260136024820152720c6dedce8e4ded8d8cae440dad2e6dac2e8c6d606b1b6044820152606401610355565b610eb7868281518110610e9f57610e9f6116c9565b6020026020010151600161097290919063ffffffff16565b50848181518110610eca57610eca6116c9565b602002602001015160035f888481518110610ee757610ee76116c9565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f2081905550848181518110610f2457610f246116c9565b602002602001015182610f379190611687565b915080610f43816116b1565b915050610db3565b50620f4240811115610f8d5760405162461bcd60e51b815260206004820152600b60248201526a657863656564203130302560a81b6044820152606401610355565b5050505050565b610f9d81611224565b610fd85760405162461bcd60e51b815260206004820152600c60248201526b7374696c6c2061637469766560a01b6044820152606401610355565b610fe36001826112af565b506104b4610831565b816001600160a01b03166352efea6e6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611029573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061104d919061169a565b508061041857610418610831565b5f610558825490565b5f61096b83836112c3565b604080515f808252602082019092526001600160a01b0384169083906040516110989190611743565b5f6040518083038185875af1925050503d805f81146110d2576040519150601f19603f3d011682016040523d82523d5f602084013e6110d7565b606091505b505090508061110e5760405162461bcd60e51b815260206004820152600360248201526253544560e81b6044820152606401610355565b505050565b5f9081526001919091016020526040902054151590565b5f6111358383611113565b61116a57508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610558565b505f610558565b816001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b1580156111aa575f80fd5b505af1158015610d12573d5f803e3d5ffd5b604051632e1a7d4d60e01b8152600481018290526001600160a01b03831690632e1a7d4d906024016020604051808303815f875af1158015611200573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061110e919061169a565b6001600160a01b0381165f908152600360205260408120541580156105585750612710826001600160a01b0316637654f7ab6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611284573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112a8919061169a565b1092915050565b5f61096b836001600160a01b0384166112e9565b5f825f0182815481106112d8576112d86116c9565b905f5260205f200154905092915050565b5f81815260018301602052604081205480156113c3575f61130b600183611674565b85549091505f9061131e90600190611674565b905081811461137d575f865f01828154811061133c5761133c6116c9565b905f5260205f200154905080875f01848154811061135c5761135c6116c9565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061138e5761138e61176f565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610558565b5f915050610558565b5f602082840312156113dc575f80fd5b5035919050565b6001600160a01b03811681146104b4575f80fd5b5f60208284031215611407575f80fd5b813561096b816113e3565b5f8060408385031215611423575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561146e5761146e611432565b604052919050565b5f6001600160401b0382111561148e5761148e611432565b5060051b60200190565b5f82601f8301126114a7575f80fd5b813560206114bc6114b783611476565b611446565b82815260059290921b840181019181810190868411156114da575f80fd5b8286015b848110156114f557803583529183019183016114de565b509695505050505050565b5f8060408385031215611511575f80fd5b82356001600160401b0380821115611527575f80fd5b818501915085601f83011261153a575f80fd5b8135602061154a6114b783611476565b82815260059290921b84018101918181019089841115611568575f80fd5b948201945b8386101561158f578535611580816113e3565b8252948201949082019061156d565b965050860135925050808211156115a4575f80fd5b506115b185828601611498565b9150509250929050565b604080825283519082018190525f906020906060840190828701845b828110156115fc5781516001600160a01b0316845292840192908401906001016115d7565b505050838103828501528451808252858301918301905f5b8181101561163057835183529284019291840191600101611614565b5090979650505050505050565b6020808252600990820152681b9bdd081d985d5b1d60ba1b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561055857610558611660565b8082018082111561055857610558611660565b5f602082840312156116aa575f80fd5b5051919050565b5f600182016116c2576116c2611660565b5060010190565b634e487b7160e01b5f52603260045260245ffd5b808202811582820484141761055857610558611660565b5f8261170e57634e487b7160e01b5f52601260045260245ffd5b500490565b5f8161172157611721611660565b505f190190565b5f60208284031215611738575f80fd5b815161096b816113e3565b5f82515f5b818110156117625760208186018101518583015201611748565b505f920191825250919050565b634e487b7160e01b5f52603160045260245ffdfea2646970667358221220c3b133e34d49b8d48a24baaba288593e602faa536b943886e53af085ebcbe5ec64736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009485711f11b17f73f2ccc8561bcae05bdc7e9ad9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000363d200e54fe86985790f4e210df9bfb142342020000000000000000000000009221fbe66be06f43dcbda3fc17cdd66ef1b236f9000000000000000000000000a66723d951f15423ef2c9c11edcb821e38301836000000000000000000000000856edf1b835ea02bf11b16f041df5a13ef1ec3d10000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000c35000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061a800000000000000000000000000000000000000000000000000000000000086470
-----Decoded View---------------
Arg [0] : _assetsVault (address): 0x9485711f11B17f73f2CCc8561bcae05BDc7E9ad9
Arg [1] : _strategies (address[]): 0x363D200E54FE86985790f4E210dF9BfB14234202,0x9221FbE66Be06F43dCBda3FC17CdD66ef1b236f9,0xa66723D951F15423Ef2C9C11edcb821E38301836,0x856EdF1B835ea02Bf11B16F041DF5A13Ef1EC3d1
Arg [2] : _ratios (uint256[]): 50000,0,400000,550000
-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 0000000000000000000000009485711f11b17f73f2ccc8561bcae05bdc7e9ad9
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [4] : 000000000000000000000000363d200e54fe86985790f4e210df9bfb14234202
Arg [5] : 0000000000000000000000009221fbe66be06f43dcbda3fc17cdd66ef1b236f9
Arg [6] : 000000000000000000000000a66723d951f15423ef2c9c11edcb821e38301836
Arg [7] : 000000000000000000000000856edf1b835ea02bf11b16f041df5a13ef1ec3d1
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [9] : 000000000000000000000000000000000000000000000000000000000000c350
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000061a80
Arg [12] : 0000000000000000000000000000000000000000000000000000000000086470
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.