Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Deposit | 15285155 | 1312 days ago | 0.01 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
AuraBalZaps
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "SafeERC20.sol";
import "ERC20.sol";
import "StrategyBase.sol";
import "IGenericVault.sol";
import "IUniV2Router.sol";
import "IWETH.sol";
contract AuraBalZaps is AuraBalStrategyBase {
using SafeERC20 for IERC20;
address public immutable vault;
bytes32 private constant BAL_ETH_POOL_ID =
0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014;
bytes32 private constant AURABAL_BAL_ETH_BPT_POOL_ID =
0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249;
constructor(address _vault) {
vault = _vault;
}
/// @notice Set approvals for the contracts used when swapping & staking
function setApprovals() external {
IERC20(BAL_TOKEN).safeApprove(BAL_VAULT, 0);
IERC20(BAL_TOKEN).safeApprove(BAL_VAULT, type(uint256).max);
IERC20(WETH_TOKEN).safeApprove(BAL_VAULT, 0);
IERC20(WETH_TOKEN).safeApprove(BAL_VAULT, type(uint256).max);
IERC20(AURABAL_TOKEN).safeApprove(BAL_VAULT, 0);
IERC20(AURABAL_TOKEN).safeApprove(BAL_VAULT, type(uint256).max);
IERC20(AURABAL_TOKEN).safeApprove(vault, 0);
IERC20(AURABAL_TOKEN).safeApprove(vault, type(uint256).max);
IERC20(BAL_ETH_POOL_TOKEN).safeApprove(AURABAL_PT_DEPOSIT, 0);
IERC20(BAL_ETH_POOL_TOKEN).safeApprove(
AURABAL_PT_DEPOSIT,
type(uint256).max
);
}
/// @notice Deposit from BAL and/or WETH
/// @param _amounts - the amounts of FXS and cvxFXS to deposit respectively
/// @param _minAmountOut - min amount of LP tokens expected
/// @param _to - address to stake on behalf of
function depositFromUnderlyingAssets(
uint256[2] calldata _amounts,
uint256 _minAmountOut,
address _to
) external notToZeroAddress(_to) {
if (_amounts[0] > 0) {
IERC20(BAL_TOKEN).safeTransferFrom(
msg.sender,
address(this),
_amounts[0]
);
}
if (_amounts[1] > 0) {
IERC20(WETH_TOKEN).safeTransferFrom(
msg.sender,
address(this),
_amounts[1]
);
}
_addAndDeposit(_amounts, _minAmountOut, _to);
}
function _addAndDeposit(
uint256[2] memory _amounts,
uint256 _minAmountOut,
address _to
) internal {
_depositToBalEthPool(_amounts[0], _amounts[1], _minAmountOut);
bptDepositor.deposit(
IERC20(BAL_ETH_POOL_TOKEN).balanceOf(address(this)),
true,
address(0)
);
IGenericVault(vault).depositAll(_to);
}
/// @notice Deposit into the pounder from ETH
/// @param _minAmountOut - min amount of lp tokens expected
/// @param _to - address to stake on behalf of
function depositFromEth(uint256 _minAmountOut, address _to)
external
payable
notToZeroAddress(_to)
{
require(msg.value > 0, "cheap");
_depositFromEth(msg.value, _minAmountOut, _to);
}
/// @notice Internal function to deposit ETH to the pounder
/// @param _amount - amount of ETH
/// @param _minAmountOut - min amount of lp tokens expected
/// @param _to - address to stake on behalf of
function _depositFromEth(
uint256 _amount,
uint256 _minAmountOut,
address _to
) internal {
IWETH(WETH_TOKEN).deposit{value: _amount}();
_addAndDeposit([0, _amount], _minAmountOut, _to);
}
/// @notice Deposit into the pounder from any token via Uni interface
/// @notice Use at your own risk
/// @dev Zap contract needs approval for spending of inputToken
/// @param _amount - min amount of input token
/// @param _minAmountOut - min amount of cvxCRV expected
/// @param _router - address of the router to use. e.g. 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F for Sushi
/// @param _inputToken - address of the token to swap from, needs to have an ETH pair on router used
/// @param _to - address to stake on behalf of
function depositViaUniV2EthPair(
uint256 _amount,
uint256 _minAmountOut,
address _router,
address _inputToken,
address _to
) external notToZeroAddress(_to) {
require(_router != address(0));
IERC20(_inputToken).safeTransferFrom(
msg.sender,
address(this),
_amount
);
address[] memory _path = new address[](2);
_path[0] = _inputToken;
_path[1] = WETH_TOKEN;
IERC20(_inputToken).safeApprove(_router, 0);
IERC20(_inputToken).safeApprove(_router, _amount);
IUniV2Router(_router).swapExactTokensForETH(
_amount,
1,
_path,
address(this),
block.timestamp + 1
);
_depositFromEth(address(this).balance, _minAmountOut, _to);
}
/// @notice Retrieves a user's vault shares and withdraw all
/// then converts auraBal back to LP token
/// @param _amount - amount of shares to retrieve
/// @return amount of 80ETH-20BAL BPT obtained after the swap
function _claimAndWithdraw(uint256 _amount) internal returns (uint256) {
IERC20(vault).safeTransferFrom(msg.sender, address(this), _amount);
IGenericVault(vault).withdrawAll(address(this));
IBalancerVault.SingleSwap memory _auraBalSwapParams = IBalancerVault
.SingleSwap({
poolId: AURABAL_BAL_ETH_BPT_POOL_ID,
kind: IBalancerVault.SwapKind.GIVEN_IN,
assetIn: IAsset(AURABAL_TOKEN),
assetOut: IAsset(BAL_ETH_POOL_TOKEN),
amount: IERC20(AURABAL_TOKEN).balanceOf(address(this)),
userData: new bytes(0)
});
return
balVault.swap(
_auraBalSwapParams,
_createSwapFunds(),
0,
block.timestamp + 1
);
}
/// @notice Claim as either BAL or WETH/ETH
/// @param _amount - amount to withdraw
/// @param _assetIndex - asset to withdraw (0: BAL, 1: ETH)
/// @param _minAmountOut - minimum amount of underlying tokens expected
/// @param _to - address to send withdrawn underlying to
/// @param _useWrappedEth - whether to use WETH or unwrap
function claimFromVaultAsUnderlying(
uint256 _amount,
uint256 _assetIndex,
uint256 _minAmountOut,
address _to,
bool _useWrappedEth
) public notToZeroAddress(_to) {
_claimAndWithdraw(_amount);
IAsset[] memory _assets = new IAsset[](2);
_assets[0] = IAsset(BAL_TOKEN);
_assets[1] = IAsset(_useWrappedEth ? WETH_TOKEN : address(0));
uint256[] memory _amountsOut = new uint256[](2);
_amountsOut[0] = _assetIndex == 0 ? _minAmountOut : 0;
_amountsOut[1] = _assetIndex == 1 ? _minAmountOut : 0;
balVault.exitPool(
BAL_ETH_POOL_ID,
address(this),
payable(_to),
IBalancerVault.ExitPoolRequest(
_assets,
_amountsOut,
abi.encode(
ExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,
IERC20(BAL_ETH_POOL_TOKEN).balanceOf(address(this)),
_assetIndex
),
false
)
);
}
/// @notice Claim to any token via a univ2 router
/// @notice Use at your own risk
/// @param _amount - amount of uFXS to unstake
/// @param _minAmountOut - min amount of output token expected
/// @param _router - address of the router to use. e.g. 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F for Sushi
/// @param _outputToken - address of the token to swap to
/// @param _to - address of the final recipient of the swapped tokens
function claimFromVaultViaUniV2EthPair(
uint256 _amount,
uint256 _minAmountOut,
address _router,
address _outputToken,
address _to
) public notToZeroAddress(_to) {
require(_router != address(0));
claimFromVaultAsUnderlying(_amount, 1, 0, address(this), false);
address[] memory _path = new address[](2);
_path[0] = WETH_TOKEN;
_path[1] = _outputToken;
IUniV2Router(_router).swapExactETHForTokens{
value: address(this).balance
}(_minAmountOut, _path, _to, block.timestamp + 1);
}
modifier notToZeroAddress(address _to) {
require(_to != address(0), "Invalid address!");
_;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "IERC20.sol";
import "Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "IERC20.sol";
import "IERC20Metadata.sol";
import "Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The defaut value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
_approve(sender, _msgSender(), currentAllowance - amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
_balances[sender] = senderBalance - amount;
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
_balances[account] = accountBalance - amount;
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// 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) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "IBasicRewards.sol";
import "IBalancer.sol";
import "IAsset.sol";
import "IBalPtDeposit.sol";
contract AuraBalStrategyBase {
address public constant AURABAL_PT_DEPOSIT =
0xeAd792B55340Aa20181A80d6a16db6A0ECd1b827;
address public constant AURABAL_STAKING =
0x5e5ea2048475854a5702F5B8468A51Ba1296EFcC;
address public constant BAL_VAULT =
0xBA12222222228d8Ba445958a75a0704d566BF2C8;
address public constant BBUSD_TOKEN =
0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2;
address public constant AURA_TOKEN =
0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF;
address public constant AURABAL_TOKEN =
0x616e8BfA43F920657B3497DBf40D6b1A02D4608d;
address public constant WETH_TOKEN =
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address public constant BAL_TOKEN =
0xba100000625a3754423978a60c9317c58a424e3D;
address public constant BAL_ETH_POOL_TOKEN =
0x5c6Ee304399DBdB9C8Ef030aB642B10820DB8F56;
bytes32 private constant BAL_ETH_POOL_ID =
0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014;
IBasicRewards public auraBalStaking = IBasicRewards(AURABAL_STAKING);
IBalancerVault public balVault = IBalancerVault(BAL_VAULT);
IBalPtDeposit public bptDepositor = IBalPtDeposit(AURABAL_PT_DEPOSIT);
/// @notice Deposit BAL and WETH to the BAL-ETH pool
/// @param _wethAmount - amount of wETH to deposit
/// @param _balAmount - amount of BAL to deposit
/// @param _minAmountOut - min amount of BPT expected
function _depositToBalEthPool(
uint256 _balAmount,
uint256 _wethAmount,
uint256 _minAmountOut
) internal {
IAsset[] memory _assets = new IAsset[](2);
_assets[0] = IAsset(BAL_TOKEN);
_assets[1] = IAsset(WETH_TOKEN);
uint256[] memory _amountsIn = new uint256[](2);
_amountsIn[0] = _balAmount;
_amountsIn[1] = _wethAmount;
balVault.joinPool(
BAL_ETH_POOL_ID,
address(this),
address(this),
IBalancerVault.JoinPoolRequest(
_assets,
_amountsIn,
abi.encode(
JoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,
_amountsIn,
_minAmountOut
),
false
)
);
}
/// @notice Returns a FundManagement struct used for BAL swaps
function _createSwapFunds()
internal
returns (IBalancerVault.FundManagement memory)
{
return
IBalancerVault.FundManagement({
sender: address(this),
fromInternalBalance: false,
recipient: payable(address(this)),
toInternalBalance: false
});
}
receive() external payable {}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.9;
interface IBasicRewards {
function stakeFor(address, uint256) external returns (bool);
function balanceOf(address) external view returns (uint256);
function earned(address) external view returns (uint256);
function withdrawAll(bool) external returns (bool);
function withdraw(uint256, bool) external returns (bool);
function withdrawAndUnwrap(uint256 amount, bool claim)
external
returns (bool);
function getReward() external returns (bool);
function stake(uint256) external returns (bool);
function extraRewards(uint256) external view returns (address);
function exit() external returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import {IAsset} from "IAsset.sol";
enum ExitKind {
EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,
EXACT_BPT_IN_FOR_TOKENS_OUT,
BPT_IN_FOR_EXACT_TOKENS_OUT
}
enum JoinKind {
INIT,
EXACT_TOKENS_IN_FOR_BPT_OUT,
TOKEN_IN_FOR_EXACT_BPT_OUT,
ALL_TOKENS_IN_FOR_EXACT_BPT_OUT,
ADD_TOKEN // for Managed Pool
}
interface IBalancerVault {
/**
* @dev Called by users to join a Pool, which transfers tokens from `sender` into the Pool's balance. This will
* trigger custom Pool behavior, which will typically grant something in return to `recipient` - often tokenized
* Pool shares.
*
* If the caller is not `sender`, it must be an authorized relayer for them.
*
* The `assets` and `maxAmountsIn` arrays must have the same length, and each entry indicates the maximum amount
* to send for each asset. The amounts to send are decided by the Pool and not the Vault: it just enforces
* these maximums.
*
* If joining a Pool that holds WETH, it is possible to send ETH directly: the Vault will do the wrapping. To enable
* this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead of the
* WETH address. Note that it is not possible to combine ETH and WETH in the same join. Any excess ETH will be sent
* back to the caller (not the sender, which is important for relayers).
*
* `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when
* interacting with Pools that register and deregister tokens frequently. If sending ETH however, the array must be
* sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the final
* `assets` array might not be sorted. Pools with no registered tokens cannot be joined.
*
* If `fromInternalBalance` is true, the caller's Internal Balance will be preferred: ERC20 transfers will only
* be made for the difference between the requested amount and Internal Balance (if any). Note that ETH cannot be
* withdrawn from Internal Balance: attempting to do so will trigger a revert.
*
* This causes the Vault to call the `IBasePool.onJoinPool` hook on the Pool's contract, where Pools implement
* their own custom logic. This typically requires additional information from the user (such as the expected number
* of Pool shares). This can be encoded in the `userData` argument, which is ignored by the Vault and passed
* directly to the Pool's contract, as is `recipient`.
*
* Emits a `PoolBalanceChanged` event.
*/
function joinPool(
bytes32 poolId,
address sender,
address recipient,
JoinPoolRequest memory request
) external payable;
struct JoinPoolRequest {
IAsset[] assets;
uint256[] maxAmountsIn;
bytes userData;
bool fromInternalBalance;
}
/**
* @dev Called by users to exit a Pool, which transfers tokens from the Pool's balance to `recipient`. This will
* trigger custom Pool behavior, which will typically ask for something in return from `sender` - often tokenized
* Pool shares. The amount of tokens that can be withdrawn is limited by the Pool's `cash` balance (see
* `getPoolTokenInfo`).
*
* If the caller is not `sender`, it must be an authorized relayer for them.
*
* The `tokens` and `minAmountsOut` arrays must have the same length, and each entry in these indicates the minimum
* token amount to receive for each token contract. The amounts to send are decided by the Pool and not the Vault:
* it just enforces these minimums.
*
* If exiting a Pool that holds WETH, it is possible to receive ETH directly: the Vault will do the unwrapping. To
* enable this mechanism, the IAsset sentinel value (the zero address) must be passed in the `assets` array instead
* of the WETH address. Note that it is not possible to combine ETH and WETH in the same exit.
*
* `assets` must have the same length and order as the array returned by `getPoolTokens`. This prevents issues when
* interacting with Pools that register and deregister tokens frequently. If receiving ETH however, the array must
* be sorted *before* replacing the WETH address with the ETH sentinel value (the zero address), which means the
* final `assets` array might not be sorted. Pools with no registered tokens cannot be exited.
*
* If `toInternalBalance` is true, the tokens will be deposited to `recipient`'s Internal Balance. Otherwise,
* an ERC20 transfer will be performed. Note that ETH cannot be deposited to Internal Balance: attempting to
* do so will trigger a revert.
*
* `minAmountsOut` is the minimum amount of tokens the user expects to get out of the Pool, for each token in the
* `tokens` array. This array must match the Pool's registered tokens.
*
* This causes the Vault to call the `IBasePool.onExitPool` hook on the Pool's contract, where Pools implement
* their own custom logic. This typically requires additional information from the user (such as the expected number
* of Pool shares to return). This can be encoded in the `userData` argument, which is ignored by the Vault and
* passed directly to the Pool's contract.
*
* Emits a `PoolBalanceChanged` event.
*/
function exitPool(
bytes32 poolId,
address sender,
address payable recipient,
ExitPoolRequest memory request
) external;
struct ExitPoolRequest {
IAsset[] assets;
uint256[] minAmountsOut;
bytes userData;
bool toInternalBalance;
}
// Swaps
//
// Users can swap tokens with Pools by calling the `swap` and `batchSwap` functions. To do this,
// they need not trust Pool contracts in any way: all security checks are made by the Vault. They must however be
// aware of the Pools' pricing algorithms in order to estimate the prices Pools will quote.
//
// The `swap` function executes a single swap, while `batchSwap` can perform multiple swaps in sequence.
// In each individual swap, tokens of one kind are sent from the sender to the Pool (this is the 'token in'),
// and tokens of another kind are sent from the Pool to the recipient in exchange (this is the 'token out').
// More complex swaps, such as one token in to multiple tokens out can be achieved by batching together
// individual swaps.
//
// There are two swap kinds:
// - 'given in' swaps, where the amount of tokens in (sent to the Pool) is known, and the Pool determines (via the
// `onSwap` hook) the amount of tokens out (to send to the recipient).
// - 'given out' swaps, where the amount of tokens out (received from the Pool) is known, and the Pool determines
// (via the `onSwap` hook) the amount of tokens in (to receive from the sender).
//
// Additionally, it is possible to chain swaps using a placeholder input amount, which the Vault replaces with
// the calculated output of the previous swap. If the previous swap was 'given in', this will be the calculated
// tokenOut amount. If the previous swap was 'given out', it will use the calculated tokenIn amount. These extended
// swaps are known as 'multihop' swaps, since they 'hop' through a number of intermediate tokens before arriving at
// the final intended token.
//
// In all cases, tokens are only transferred in and out of the Vault (or withdrawn from and deposited into Internal
// Balance) after all individual swaps have been completed, and the net token balance change computed. This makes
// certain swap patterns, such as multihops, or swaps that interact with the same token pair in multiple Pools, cost
// much less gas than they would otherwise.
//
// It also means that under certain conditions it is possible to perform arbitrage by swapping with multiple
// Pools in a way that results in net token movement out of the Vault (profit), with no tokens being sent in (only
// updating the Pool's internal accounting).
//
// To protect users from front-running or the market changing rapidly, they supply a list of 'limits' for each token
// involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the
// minimum amount of tokens to receive (by passing a negative value) is specified.
//
// Additionally, a 'deadline' timestamp can also be provided, forcing the swap to fail if it occurs after
// this point in time (e.g. if the transaction failed to be included in a block promptly).
//
// If interacting with Pools that hold WETH, it is possible to both send and receive ETH directly: the Vault will do
// the wrapping and unwrapping. To enable this mechanism, the IAsset sentinel value (the zero address) must be
// passed in the `assets` array instead of the WETH address. Note that it is possible to combine ETH and WETH in the
// same swap. Any excess ETH will be sent back to the caller (not the sender, which is relevant for relayers).
//
// Finally, Internal Balance can be used when either sending or receiving tokens.
enum SwapKind {
GIVEN_IN,
GIVEN_OUT
}
/**
* @dev Performs a swap with a single Pool.
*
* If the swap is 'given in' (the number of tokens to send to the Pool is known), it returns the amount of tokens
* taken from the Pool, which must be greater than or equal to `limit`.
*
* If the swap is 'given out' (the number of tokens to take from the Pool is known), it returns the amount of tokens
* sent to the Pool, which must be less than or equal to `limit`.
*
* Internal Balance usage and the recipient are determined by the `funds` struct.
*
* Emits a `Swap` event.
*/
function swap(
SingleSwap memory singleSwap,
FundManagement memory funds,
uint256 limit,
uint256 deadline
) external payable returns (uint256);
/**
* @dev Data for a single swap executed by `swap`. `amount` is either `amountIn` or `amountOut` depending on
* the `kind` value.
*
* `assetIn` and `assetOut` are either token addresses, or the IAsset sentinel value for ETH (the zero address).
* Note that Pools never interact with ETH directly: it will be wrapped to or unwrapped from WETH by the Vault.
*
* The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be
* used to extend swap behavior.
*/
struct SingleSwap {
bytes32 poolId;
SwapKind kind;
IAsset assetIn;
IAsset assetOut;
uint256 amount;
bytes userData;
}
/**
* @dev Simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be
* simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.
*
* Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)
* the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it
* receives are the same that an equivalent `batchSwap` call would receive.
*
* Unlike `batchSwap`, this function performs no checks on the sender or recipient field in the `funds` struct.
* This makes it suitable to be called by off-chain applications via eth_call without needing to hold tokens,
* approve them for the Vault, or even know a user's address.
*
* Note that this function is not 'view' (due to implementation details): the client code must explicitly execute
* eth_call instead of eth_sendTransaction.
*/
function queryBatchSwap(
SwapKind kind,
BatchSwapStep[] memory swaps,
IAsset[] memory assets,
FundManagement memory funds
) external returns (int256[] memory assetDeltas);
/**
* @dev Performs a series of swaps with one or multiple Pools. In each individual swap, the caller determines either
* the amount of tokens sent to or received from the Pool, depending on the `kind` value.
*
* Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the
* Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at
* the same index in the `assets` array.
*
* Swaps are executed sequentially, in the order specified by the `swaps` array. Each array element describes a
* Pool, the token to be sent to this Pool, the token to receive from it, and an amount that is either `amountIn` or
* `amountOut` depending on the swap kind.
*
* Multihop swaps can be executed by passing an `amount` value of zero for a swap. This will cause the amount in/out
* of the previous swap to be used as the amount in for the current one. In a 'given in' swap, 'tokenIn' must equal
* the previous swap's `tokenOut`. For a 'given out' swap, `tokenOut` must equal the previous swap's `tokenIn`.
*
* The `assets` array contains the addresses of all assets involved in the swaps. These are either token addresses,
* or the IAsset sentinel value for ETH (the zero address). Each entry in the `swaps` array specifies tokens in and
* out by referencing an index in `assets`. Note that Pools never interact with ETH directly: it will be wrapped to
* or unwrapped from WETH by the Vault.
*
* Internal Balance usage, sender, and recipient are determined by the `funds` struct. The `limits` array specifies
* the minimum or maximum amount of each token the vault is allowed to transfer.
*
* `batchSwap` can be used to make a single swap, like `swap` does, but doing so requires more gas than the
* equivalent `swap` call.
*
* Emits `Swap` events.
*/
function batchSwap(
SwapKind kind,
BatchSwapStep[] memory swaps,
IAsset[] memory assets,
FundManagement memory funds,
int256[] memory limits,
uint256 deadline
) external payable returns (int256[] memory);
/**
* @dev Data for each individual swap executed by `batchSwap`. The asset in and out fields are indexes into the
* `assets` array passed to that function, and ETH assets are converted to WETH.
*
* If `amount` is zero, the multihop mechanism is used to determine the actual amount based on the amount in/out
* from the previous swap, depending on the swap kind.
*
* The `userData` field is ignored by the Vault, but forwarded to the Pool in the `onSwap` hook, and may be
* used to extend swap behavior.
*/
struct BatchSwapStep {
bytes32 poolId;
uint256 assetInIndex;
uint256 assetOutIndex;
uint256 amount;
bytes userData;
}
/**
* @dev All tokens in a swap are either sent from the `sender` account to the Vault, or from the Vault to the
* `recipient` account.
*
* If the caller is not `sender`, it must be an authorized relayer for them.
*
* If `fromInternalBalance` is true, the `sender`'s Internal Balance will be preferred, performing an ERC20
* transfer for the difference between the requested amount and the User's Internal Balance (if any). The `sender`
* must have allowed the Vault to use their tokens via `IERC20.approve()`. This matches the behavior of
* `joinPool`.
*
* If `toInternalBalance` is true, tokens will be deposited to `recipient`'s internal balance instead of
* transferred. This matches the behavior of `exitPool`.
*
* Note that ETH cannot be deposited to or withdrawn from Internal Balance: attempting to do so will trigger a
* revert.
*/
struct FundManagement {
address sender;
bool fromInternalBalance;
address payable recipient;
bool toInternalBalance;
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
/**
* @dev This is an empty interface used to represent either ERC20-conforming token contracts or ETH (using the zero
* address sentinel value). We're just relying on the fact that `interface` can be used to declare new address-like
* types.
*
* This concept is unrelated to a Pool's Asset Managers.
*/
interface IAsset {
// solhint-disable-previous-line no-empty-blocks
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
interface IBalPtDeposit {
function deposit(
uint256 _amount,
bool _lock,
address _stakeAddress
) external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
interface IGenericVault {
function withdraw(address _to, uint256 _shares)
external
returns (uint256 withdrawn);
function withdrawAll(address _to) external returns (uint256 withdrawn);
function depositAll(address _to) external returns (uint256 _shares);
function deposit(address _to, uint256 _amount)
external
returns (uint256 _shares);
function harvest() external;
function balanceOfUnderlying(address user)
external
view
returns (uint256 amount);
function totalUnderlying() external view returns (uint256 total);
function totalSupply() external view returns (uint256 total);
function underlying() external view returns (address);
function strategy() external view returns (address);
function platform() external view returns (address);
function setPlatform(address _platform) external;
function setPlatformFee(uint256 _fee) external;
function setCallIncentive(uint256 _incentive) external;
function setWithdrawalPenalty(uint256 _penalty) external;
function setApprovals() external;
function callIncentive() external view returns (uint256);
function platformFee() external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
interface IUniV2Router {
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function getAmountsOut(uint256 amountIn, address[] memory path)
external
view
returns (uint256[] memory amounts);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
interface IWETH {
function deposit() external payable;
function transfer(address to, uint256 value) external returns (bool);
function withdraw(uint256) external;
}{
"evmVersion": "istanbul",
"optimizer": {
"enabled": true,
"runs": 200
},
"libraries": {
"StrategyZaps.sol": {}
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AURABAL_PT_DEPOSIT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AURABAL_STAKING","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AURABAL_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AURA_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BAL_ETH_POOL_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BAL_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BAL_VAULT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BBUSD_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auraBalStaking","outputs":[{"internalType":"contract IBasicRewards","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balVault","outputs":[{"internalType":"contract IBalancerVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bptDepositor","outputs":[{"internalType":"contract IBalPtDeposit","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_assetIndex","type":"uint256"},{"internalType":"uint256","name":"_minAmountOut","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"bool","name":"_useWrappedEth","type":"bool"}],"name":"claimFromVaultAsUnderlying","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_minAmountOut","type":"uint256"},{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_outputToken","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"claimFromVaultViaUniV2EthPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minAmountOut","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"depositFromEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"_amounts","type":"uint256[2]"},{"internalType":"uint256","name":"_minAmountOut","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"depositFromUnderlyingAssets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_minAmountOut","type":"uint256"},{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_inputToken","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"depositViaUniV2EthPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setApprovals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60a0604052600080546001600160a01b0319908116735e5ea2048475854a5702f5b8468a51ba1296efcc1790915560018054821673ba12222222228d8ba445958a75a0704d566bf2c81790556002805490911673ead792b55340aa20181a80d6a16db6a0ecd1b82717905534801561007657600080fd5b50604051611f32380380611f32833981016040819052610095916100a6565b6001600160a01b03166080526100d6565b6000602082840312156100b857600080fd5b81516001600160a01b03811681146100cf57600080fd5b9392505050565b608051611e1e610114600039600081816103c401528181610b9e01528181610bde01528181610db801528181610df501526112fd0152611e1e6000f3fe6080604052600436106101185760003560e01c80637c6b513f116100a0578063b57fa9b311610064578063b57fa9b31461031a578063c584d40e1461033a578063ce0744ed14610362578063d1e1a8671461038a578063fbfa77cf146103b257600080fd5b80637c6b513f1461026d5780638702ca5c146102955780638757b15b146102b55780638a5a167e146102ca5780639ccd9e9d146102f257600080fd5b80634128f86e116100e75780634128f86e146101cd578063415d8d29146101ed578063749ef7521461020d57806377aba2131461022d57806379e8aeeb1461024d57600080fd5b80630762a3dd1461012457806326600ecb146101685780632abc2a991461017d57806337d277d4146101a557600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b5061014c735c6ee304399dbdb9c8ef030ab642b10820db8f5681565b6040516001600160a01b03909116815260200160405180910390f35b61017b6101763660046117d7565b6103e6565b005b34801561018957600080fd5b5061014c73ba100000625a3754423978a60c9317c58a424e3d81565b3480156101b157600080fd5b5061014c73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156101d957600080fd5b5060005461014c906001600160a01b031681565b3480156101f957600080fd5b5061017b610208366004611814565b61045e565b34801561021957600080fd5b5060025461014c906001600160a01b031681565b34801561023957600080fd5b5060015461014c906001600160a01b031681565b34801561025957600080fd5b5061017b610268366004611868565b61072a565b34801561027957600080fd5b5061014c737b50775383d3d6f0215a8f290f2c9e2eebbeceb281565b3480156102a157600080fd5b5061017b6102b0366004611868565b6108d7565b3480156102c157600080fd5b5061017b610a49565b3480156102d657600080fd5b5061014c73616e8bfa43f920657b3497dbf40d6b1a02d4608d81565b3480156102fe57600080fd5b5061014c735e5ea2048475854a5702f5b8468a51ba1296efcc81565b34801561032657600080fd5b5061017b6103353660046118bf565b610c70565b34801561034657600080fd5b5061014c73ba12222222228d8ba445958a75a0704d566bf2c881565b34801561036e57600080fd5b5061014c73ead792b55340aa20181a80d6a16db6a0ecd1b82781565b34801561039657600080fd5b5061014c73c0c293ce456ff0ed870add98a0828dd4d2903dbf81565b3480156103be57600080fd5b5061014c7f000000000000000000000000000000000000000000000000000000000000000081565b806001600160a01b0381166104165760405162461bcd60e51b815260040161040d90611900565b60405180910390fd5b6000341161044e5760405162461bcd60e51b8152602060048201526005602482015264063686561760dc1b604482015260640161040d565b610459348484610d21565b505050565b816001600160a01b0381166104855760405162461bcd60e51b815260040161040d90611900565b61048e86610da9565b5060408051600280825260608201835260009260208301908036833701905050905073ba100000625a3754423978a60c9317c58a424e3d816000815181106104d8576104d8611940565b60200260200101906001600160a01b031690816001600160a01b0316815250508261050457600061051a565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b8160018151811061052d5761052d611940565b6001600160a01b039290921660209283029190910182015260408051600280825260608201835260009391929091830190803683370190505090508615610575576000610577565b855b8160008151811061058a5761058a611940565b602002602001018181525050866001146105a55760006105a7565b855b816001815181106105ba576105ba611940565b6020908102919091018101919091526001546040805160808101825285815292830184905280516370a0823160e01b815230600482018190526001600160a01b0390931693638bdb3913937f5c6ee304399dbdb9c8ef030ab642b10820db8f560002000000000000000000149390928b9291820190600090735c6ee304399dbdb9c8ef030ab642b10820db8f56906370a082319060240160206040518083038186803b15801561066957600080fd5b505afa15801561067d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a19190611956565b8f6040516020016106b493929190611985565b6040516020818303038152906040528152602001600015158152506040518563ffffffff1660e01b81526004016106ee9493929190611ad7565b600060405180830381600087803b15801561070857600080fd5b505af115801561071c573d6000803e3d6000fd5b505050505050505050505050565b806001600160a01b0381166107515760405162461bcd60e51b815260040161040d90611900565b6001600160a01b03841661076457600080fd5b6107796001600160a01b038416333089611049565b60408051600280825260608201835260009260208301908036833701905050905083816000815181106107ae576107ae611940565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816001815181106107f6576107f6611940565b6001600160a01b03928316602091820292909201015261081a9085168660006110b4565b61082e6001600160a01b03851686896110b4565b6001600160a01b0385166318cbafe5886001843061084c4284611b13565b6040518663ffffffff1660e01b815260040161086c959493929190611b72565b600060405180830381600087803b15801561088657600080fd5b505af115801561089a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108c29190810190611bae565b506108ce478785610d21565b50505050505050565b806001600160a01b0381166108fe5760405162461bcd60e51b815260040161040d90611900565b6001600160a01b03841661091157600080fd5b610921866001600030600061045e565b60408051600280825260608201835260009260208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28160008151811061096a5761096a611940565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061099e5761099e611940565b6001600160a01b0392831660209182029290920101528516637ff36ab5478884876109ca426001611b13565b6040518663ffffffff1660e01b81526004016109e99493929190611c6c565b6000604051808303818588803b158015610a0257600080fd5b505af1158015610a16573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610a3f9190810190611bae565b5050505050505050565b610a7d73ba100000625a3754423978a60c9317c58a424e3d73ba12222222228d8ba445958a75a0704d566bf2c860006110b4565b610ab273ba100000625a3754423978a60c9317c58a424e3d73ba12222222228d8ba445958a75a0704d566bf2c86000196110b4565b610ae673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ba12222222228d8ba445958a75a0704d566bf2c860006110b4565b610b1b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ba12222222228d8ba445958a75a0704d566bf2c86000196110b4565b610b4f73616e8bfa43f920657b3497dbf40d6b1a02d4608d73ba12222222228d8ba445958a75a0704d566bf2c860006110b4565b610b8473616e8bfa43f920657b3497dbf40d6b1a02d4608d73ba12222222228d8ba445958a75a0704d566bf2c86000196110b4565b610bc473616e8bfa43f920657b3497dbf40d6b1a02d4608d7f000000000000000000000000000000000000000000000000000000000000000060006110b4565b610c0573616e8bfa43f920657b3497dbf40d6b1a02d4608d7f00000000000000000000000000000000000000000000000000000000000000006000196110b4565b610c39735c6ee304399dbdb9c8ef030ab642b10820db8f5673ead792b55340aa20181a80d6a16db6a0ecd1b82760006110b4565b610c6e735c6ee304399dbdb9c8ef030ab642b10820db8f5673ead792b55340aa20181a80d6a16db6a0ecd1b8276000196110b4565b565b806001600160a01b038116610c975760405162461bcd60e51b815260040161040d90611900565b833515610cbf57610cbf73ba100000625a3754423978a60c9317c58a424e3d33308735611049565b602084013515610ced57610ced73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc233306020880135611049565b604080518082018252610d1b91869060029083908390808284376000920191909152508691508590506111d8565b50505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004016000604051808303818588803b158015610d7057600080fd5b505af1158015610d84573d6000803e3d6000fd5b50505050506104596040518060400160405280600081526020018581525083836111d8565b6000610de06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611049565b604051630fa09e6360e41b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063fa09e63090602401602060405180830381600087803b158015610e4157600080fd5b505af1158015610e55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e799190611956565b506040805160c0810182527f3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249815260006020820181905273616e8bfa43f920657b3497dbf40d6b1a02d4608d828401819052735c6ee304399dbdb9c8ef030ab642b10820db8f56606084015292516370a0823160e01b8152306004820152909260808301916370a082319060240160206040518083038186803b158015610f1f57600080fd5b505afa158015610f33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f579190611956565b815260408051600080825260208083018452938401919091526001548251608080820185528382528186018490528185018490526060918201849052845190810185523080825295810184905293840194909452928201529192506001600160a01b0316906352bbbe299083906000610fd1426001611b13565b6040518563ffffffff1660e01b8152600401610ff09493929190611ca1565b602060405180830381600087803b15801561100a57600080fd5b505af115801561101e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110429190611956565b9392505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610d1b9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261137b565b80158061113d5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561110357600080fd5b505afa158015611117573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113b9190611956565b155b6111a85760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161040d565b6040516001600160a01b03831660248201526044810182905261045990849063095ea7b360e01b9060640161107d565b825160208401516111ea91908461144d565b6002546040516370a0823160e01b81523060048201526001600160a01b03909116906380ed71e490735c6ee304399dbdb9c8ef030ab642b10820db8f56906370a082319060240160206040518083038186803b15801561124957600080fd5b505afa15801561125d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112819190611956565b6040516001600160e01b031960e084901b16815260048101919091526001602482015260006044820152606401600060405180830381600087803b1580156112c857600080fd5b505af11580156112dc573d6000803e3d6000fd5b5050604051639f0d5f2760e01b81526001600160a01b0384811660048301527f0000000000000000000000000000000000000000000000000000000000000000169250639f0d5f279150602401602060405180830381600087803b15801561134357600080fd5b505af1158015611357573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1b9190611956565b60006113d0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116439092919063ffffffff16565b80519091501561045957808060200190518101906113ee9190611d63565b6104595760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161040d565b60408051600280825260608201835260009260208301908036833701905050905073ba100000625a3754423978a60c9317c58a424e3d8160008151811061149657611496611940565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816001815181106114de576114de611940565b6001600160a01b03929092166020928302919091018201526040805160028082526060820183526000939192909183019080368337019050509050848160008151811061152d5761152d611940565b602002602001018181525050838160018151811061154d5761154d611940565b602002602001018181525050600160009054906101000a90046001600160a01b03166001600160a01b031663b95cac287f5c6ee304399dbdb9c8ef030ab642b10820db8f5600020000000000000000001460001b303060405180608001604052808881526020018781526020016001888b6040516020016115d093929190611d80565b6040516020818303038152906040528152602001600015158152506040518563ffffffff1660e01b815260040161160a9493929190611ad7565b600060405180830381600087803b15801561162457600080fd5b505af1158015611638573d6000803e3d6000fd5b505050505050505050565b6060611652848460008561165a565b949350505050565b6060824710156116bb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161040d565b843b6117095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161040d565b600080866001600160a01b031685876040516117259190611db9565b60006040518083038185875af1925050503d8060008114611762576040519150601f19603f3d011682016040523d82523d6000602084013e611767565b606091505b5091509150611777828286611782565b979650505050505050565b60608315611791575081611042565b8251156117a15782518084602001fd5b8160405162461bcd60e51b815260040161040d9190611dd5565b80356001600160a01b03811681146117d257600080fd5b919050565b600080604083850312156117ea57600080fd5b823591506117fa602084016117bb565b90509250929050565b801515811461181157600080fd5b50565b600080600080600060a0868803121561182c57600080fd5b85359450602086013593506040860135925061184a606087016117bb565b9150608086013561185a81611803565b809150509295509295909350565b600080600080600060a0868803121561188057600080fd5b8535945060208601359350611897604087016117bb565b92506118a5606087016117bb565b91506118b3608087016117bb565b90509295509295909350565b6000806000608084860312156118d457600080fd5b60408401858111156118e557600080fd5b8493503591506118f7606084016117bb565b90509250925092565b60208082526010908201526f496e76616c696420616464726573732160801b604082015260600190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561196857600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b60608101600385106119995761199961196f565b938152602081019290925260409091015290565b600081518084526020808501945080840160005b838110156119dd578151875295820195908201906001016119c1565b509495945050505050565b60005b83811015611a035781810151838201526020016119eb565b83811115610d1b5750506000910152565b60008151808452611a2c8160208601602086016119e8565b601f01601f19169290920160200192915050565b8051608080845281519084018190526000916020919082019060a0860190845b81811015611a855783516001600160a01b031683529284019291840191600101611a60565b505082850151915085810383870152611a9e81836119ad565b9250505060408301518482036040860152611ab98282611a14565b9150506060830151611acf606086018215159052565b509392505050565b8481526001600160a01b03848116602083015283166040820152608060608201819052600090611b0990830184611a40565b9695505050505050565b60008219821115611b3457634e487b7160e01b600052601160045260246000fd5b500190565b600081518084526020808501945080840160005b838110156119dd5781516001600160a01b031687529582019590820190600101611b4d565b85815284602082015260a060408201526000611b9160a0830186611b39565b6001600160a01b0394909416606083015250608001529392505050565b60006020808385031215611bc157600080fd5b825167ffffffffffffffff80821115611bd957600080fd5b818501915085601f830112611bed57600080fd5b815181811115611bff57611bff61192a565b8060051b604051601f19603f83011681018181108582111715611c2457611c2461192a565b604052918252848201925083810185019188831115611c4257600080fd5b938501935b82851015611c6057845184529385019392850192611c47565b98975050505050505050565b848152608060208201526000611c856080830186611b39565b6001600160a01b03949094166040830152506060015292915050565b60e08152845160e08201526000602086015160028110611cc357611cc361196f565b61010083015260408601516001600160a01b03908116610120840152606087015116610140830152608086015161016083015260a086015160c0610180840152611d116101a0840182611a14565b915050611d51602083018680516001600160a01b039081168352602080830151151590840152604080830151909116908301526060908101511515910152565b60a082019390935260c0015292915050565b600060208284031215611d7557600080fd5b815161104281611803565b600060058510611d9257611d9261196f565b84825260606020830152611da960608301856119ad565b9050826040830152949350505050565b60008251611dcb8184602087016119e8565b9190910192915050565b6020815260006110426020830184611a1456fea2646970667358221220cf328588b57f1c782c2f43e7c9cdf2503bf79cd46e454b87761bfefbe423150064736f6c6343000809003300000000000000000000000077e5bb2c91cac7c7a8a74c38804fdb372baf7328
Deployed Bytecode
0x6080604052600436106101185760003560e01c80637c6b513f116100a0578063b57fa9b311610064578063b57fa9b31461031a578063c584d40e1461033a578063ce0744ed14610362578063d1e1a8671461038a578063fbfa77cf146103b257600080fd5b80637c6b513f1461026d5780638702ca5c146102955780638757b15b146102b55780638a5a167e146102ca5780639ccd9e9d146102f257600080fd5b80634128f86e116100e75780634128f86e146101cd578063415d8d29146101ed578063749ef7521461020d57806377aba2131461022d57806379e8aeeb1461024d57600080fd5b80630762a3dd1461012457806326600ecb146101685780632abc2a991461017d57806337d277d4146101a557600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b5061014c735c6ee304399dbdb9c8ef030ab642b10820db8f5681565b6040516001600160a01b03909116815260200160405180910390f35b61017b6101763660046117d7565b6103e6565b005b34801561018957600080fd5b5061014c73ba100000625a3754423978a60c9317c58a424e3d81565b3480156101b157600080fd5b5061014c73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156101d957600080fd5b5060005461014c906001600160a01b031681565b3480156101f957600080fd5b5061017b610208366004611814565b61045e565b34801561021957600080fd5b5060025461014c906001600160a01b031681565b34801561023957600080fd5b5060015461014c906001600160a01b031681565b34801561025957600080fd5b5061017b610268366004611868565b61072a565b34801561027957600080fd5b5061014c737b50775383d3d6f0215a8f290f2c9e2eebbeceb281565b3480156102a157600080fd5b5061017b6102b0366004611868565b6108d7565b3480156102c157600080fd5b5061017b610a49565b3480156102d657600080fd5b5061014c73616e8bfa43f920657b3497dbf40d6b1a02d4608d81565b3480156102fe57600080fd5b5061014c735e5ea2048475854a5702f5b8468a51ba1296efcc81565b34801561032657600080fd5b5061017b6103353660046118bf565b610c70565b34801561034657600080fd5b5061014c73ba12222222228d8ba445958a75a0704d566bf2c881565b34801561036e57600080fd5b5061014c73ead792b55340aa20181a80d6a16db6a0ecd1b82781565b34801561039657600080fd5b5061014c73c0c293ce456ff0ed870add98a0828dd4d2903dbf81565b3480156103be57600080fd5b5061014c7f00000000000000000000000077e5bb2c91cac7c7a8a74c38804fdb372baf732881565b806001600160a01b0381166104165760405162461bcd60e51b815260040161040d90611900565b60405180910390fd5b6000341161044e5760405162461bcd60e51b8152602060048201526005602482015264063686561760dc1b604482015260640161040d565b610459348484610d21565b505050565b816001600160a01b0381166104855760405162461bcd60e51b815260040161040d90611900565b61048e86610da9565b5060408051600280825260608201835260009260208301908036833701905050905073ba100000625a3754423978a60c9317c58a424e3d816000815181106104d8576104d8611940565b60200260200101906001600160a01b031690816001600160a01b0316815250508261050457600061051a565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25b8160018151811061052d5761052d611940565b6001600160a01b039290921660209283029190910182015260408051600280825260608201835260009391929091830190803683370190505090508615610575576000610577565b855b8160008151811061058a5761058a611940565b602002602001018181525050866001146105a55760006105a7565b855b816001815181106105ba576105ba611940565b6020908102919091018101919091526001546040805160808101825285815292830184905280516370a0823160e01b815230600482018190526001600160a01b0390931693638bdb3913937f5c6ee304399dbdb9c8ef030ab642b10820db8f560002000000000000000000149390928b9291820190600090735c6ee304399dbdb9c8ef030ab642b10820db8f56906370a082319060240160206040518083038186803b15801561066957600080fd5b505afa15801561067d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a19190611956565b8f6040516020016106b493929190611985565b6040516020818303038152906040528152602001600015158152506040518563ffffffff1660e01b81526004016106ee9493929190611ad7565b600060405180830381600087803b15801561070857600080fd5b505af115801561071c573d6000803e3d6000fd5b505050505050505050505050565b806001600160a01b0381166107515760405162461bcd60e51b815260040161040d90611900565b6001600160a01b03841661076457600080fd5b6107796001600160a01b038416333089611049565b60408051600280825260608201835260009260208301908036833701905050905083816000815181106107ae576107ae611940565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816001815181106107f6576107f6611940565b6001600160a01b03928316602091820292909201015261081a9085168660006110b4565b61082e6001600160a01b03851686896110b4565b6001600160a01b0385166318cbafe5886001843061084c4284611b13565b6040518663ffffffff1660e01b815260040161086c959493929190611b72565b600060405180830381600087803b15801561088657600080fd5b505af115801561089a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108c29190810190611bae565b506108ce478785610d21565b50505050505050565b806001600160a01b0381166108fe5760405162461bcd60e51b815260040161040d90611900565b6001600160a01b03841661091157600080fd5b610921866001600030600061045e565b60408051600280825260608201835260009260208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28160008151811061096a5761096a611940565b60200260200101906001600160a01b031690816001600160a01b031681525050838160018151811061099e5761099e611940565b6001600160a01b0392831660209182029290920101528516637ff36ab5478884876109ca426001611b13565b6040518663ffffffff1660e01b81526004016109e99493929190611c6c565b6000604051808303818588803b158015610a0257600080fd5b505af1158015610a16573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052610a3f9190810190611bae565b5050505050505050565b610a7d73ba100000625a3754423978a60c9317c58a424e3d73ba12222222228d8ba445958a75a0704d566bf2c860006110b4565b610ab273ba100000625a3754423978a60c9317c58a424e3d73ba12222222228d8ba445958a75a0704d566bf2c86000196110b4565b610ae673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ba12222222228d8ba445958a75a0704d566bf2c860006110b4565b610b1b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ba12222222228d8ba445958a75a0704d566bf2c86000196110b4565b610b4f73616e8bfa43f920657b3497dbf40d6b1a02d4608d73ba12222222228d8ba445958a75a0704d566bf2c860006110b4565b610b8473616e8bfa43f920657b3497dbf40d6b1a02d4608d73ba12222222228d8ba445958a75a0704d566bf2c86000196110b4565b610bc473616e8bfa43f920657b3497dbf40d6b1a02d4608d7f00000000000000000000000077e5bb2c91cac7c7a8a74c38804fdb372baf732860006110b4565b610c0573616e8bfa43f920657b3497dbf40d6b1a02d4608d7f00000000000000000000000077e5bb2c91cac7c7a8a74c38804fdb372baf73286000196110b4565b610c39735c6ee304399dbdb9c8ef030ab642b10820db8f5673ead792b55340aa20181a80d6a16db6a0ecd1b82760006110b4565b610c6e735c6ee304399dbdb9c8ef030ab642b10820db8f5673ead792b55340aa20181a80d6a16db6a0ecd1b8276000196110b4565b565b806001600160a01b038116610c975760405162461bcd60e51b815260040161040d90611900565b833515610cbf57610cbf73ba100000625a3754423978a60c9317c58a424e3d33308735611049565b602084013515610ced57610ced73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc233306020880135611049565b604080518082018252610d1b91869060029083908390808284376000920191909152508691508590506111d8565b50505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0846040518263ffffffff1660e01b81526004016000604051808303818588803b158015610d7057600080fd5b505af1158015610d84573d6000803e3d6000fd5b50505050506104596040518060400160405280600081526020018581525083836111d8565b6000610de06001600160a01b037f00000000000000000000000077e5bb2c91cac7c7a8a74c38804fdb372baf732816333085611049565b604051630fa09e6360e41b81523060048201527f00000000000000000000000077e5bb2c91cac7c7a8a74c38804fdb372baf73286001600160a01b03169063fa09e63090602401602060405180830381600087803b158015610e4157600080fd5b505af1158015610e55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e799190611956565b506040805160c0810182527f3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249815260006020820181905273616e8bfa43f920657b3497dbf40d6b1a02d4608d828401819052735c6ee304399dbdb9c8ef030ab642b10820db8f56606084015292516370a0823160e01b8152306004820152909260808301916370a082319060240160206040518083038186803b158015610f1f57600080fd5b505afa158015610f33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f579190611956565b815260408051600080825260208083018452938401919091526001548251608080820185528382528186018490528185018490526060918201849052845190810185523080825295810184905293840194909452928201529192506001600160a01b0316906352bbbe299083906000610fd1426001611b13565b6040518563ffffffff1660e01b8152600401610ff09493929190611ca1565b602060405180830381600087803b15801561100a57600080fd5b505af115801561101e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110429190611956565b9392505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610d1b9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261137b565b80158061113d5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561110357600080fd5b505afa158015611117573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113b9190611956565b155b6111a85760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161040d565b6040516001600160a01b03831660248201526044810182905261045990849063095ea7b360e01b9060640161107d565b825160208401516111ea91908461144d565b6002546040516370a0823160e01b81523060048201526001600160a01b03909116906380ed71e490735c6ee304399dbdb9c8ef030ab642b10820db8f56906370a082319060240160206040518083038186803b15801561124957600080fd5b505afa15801561125d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112819190611956565b6040516001600160e01b031960e084901b16815260048101919091526001602482015260006044820152606401600060405180830381600087803b1580156112c857600080fd5b505af11580156112dc573d6000803e3d6000fd5b5050604051639f0d5f2760e01b81526001600160a01b0384811660048301527f00000000000000000000000077e5bb2c91cac7c7a8a74c38804fdb372baf7328169250639f0d5f279150602401602060405180830381600087803b15801561134357600080fd5b505af1158015611357573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1b9190611956565b60006113d0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116439092919063ffffffff16565b80519091501561045957808060200190518101906113ee9190611d63565b6104595760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161040d565b60408051600280825260608201835260009260208301908036833701905050905073ba100000625a3754423978a60c9317c58a424e3d8160008151811061149657611496611940565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816001815181106114de576114de611940565b6001600160a01b03929092166020928302919091018201526040805160028082526060820183526000939192909183019080368337019050509050848160008151811061152d5761152d611940565b602002602001018181525050838160018151811061154d5761154d611940565b602002602001018181525050600160009054906101000a90046001600160a01b03166001600160a01b031663b95cac287f5c6ee304399dbdb9c8ef030ab642b10820db8f5600020000000000000000001460001b303060405180608001604052808881526020018781526020016001888b6040516020016115d093929190611d80565b6040516020818303038152906040528152602001600015158152506040518563ffffffff1660e01b815260040161160a9493929190611ad7565b600060405180830381600087803b15801561162457600080fd5b505af1158015611638573d6000803e3d6000fd5b505050505050505050565b6060611652848460008561165a565b949350505050565b6060824710156116bb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161040d565b843b6117095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161040d565b600080866001600160a01b031685876040516117259190611db9565b60006040518083038185875af1925050503d8060008114611762576040519150601f19603f3d011682016040523d82523d6000602084013e611767565b606091505b5091509150611777828286611782565b979650505050505050565b60608315611791575081611042565b8251156117a15782518084602001fd5b8160405162461bcd60e51b815260040161040d9190611dd5565b80356001600160a01b03811681146117d257600080fd5b919050565b600080604083850312156117ea57600080fd5b823591506117fa602084016117bb565b90509250929050565b801515811461181157600080fd5b50565b600080600080600060a0868803121561182c57600080fd5b85359450602086013593506040860135925061184a606087016117bb565b9150608086013561185a81611803565b809150509295509295909350565b600080600080600060a0868803121561188057600080fd5b8535945060208601359350611897604087016117bb565b92506118a5606087016117bb565b91506118b3608087016117bb565b90509295509295909350565b6000806000608084860312156118d457600080fd5b60408401858111156118e557600080fd5b8493503591506118f7606084016117bb565b90509250925092565b60208082526010908201526f496e76616c696420616464726573732160801b604082015260600190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561196857600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b60608101600385106119995761199961196f565b938152602081019290925260409091015290565b600081518084526020808501945080840160005b838110156119dd578151875295820195908201906001016119c1565b509495945050505050565b60005b83811015611a035781810151838201526020016119eb565b83811115610d1b5750506000910152565b60008151808452611a2c8160208601602086016119e8565b601f01601f19169290920160200192915050565b8051608080845281519084018190526000916020919082019060a0860190845b81811015611a855783516001600160a01b031683529284019291840191600101611a60565b505082850151915085810383870152611a9e81836119ad565b9250505060408301518482036040860152611ab98282611a14565b9150506060830151611acf606086018215159052565b509392505050565b8481526001600160a01b03848116602083015283166040820152608060608201819052600090611b0990830184611a40565b9695505050505050565b60008219821115611b3457634e487b7160e01b600052601160045260246000fd5b500190565b600081518084526020808501945080840160005b838110156119dd5781516001600160a01b031687529582019590820190600101611b4d565b85815284602082015260a060408201526000611b9160a0830186611b39565b6001600160a01b0394909416606083015250608001529392505050565b60006020808385031215611bc157600080fd5b825167ffffffffffffffff80821115611bd957600080fd5b818501915085601f830112611bed57600080fd5b815181811115611bff57611bff61192a565b8060051b604051601f19603f83011681018181108582111715611c2457611c2461192a565b604052918252848201925083810185019188831115611c4257600080fd5b938501935b82851015611c6057845184529385019392850192611c47565b98975050505050505050565b848152608060208201526000611c856080830186611b39565b6001600160a01b03949094166040830152506060015292915050565b60e08152845160e08201526000602086015160028110611cc357611cc361196f565b61010083015260408601516001600160a01b03908116610120840152606087015116610140830152608086015161016083015260a086015160c0610180840152611d116101a0840182611a14565b915050611d51602083018680516001600160a01b039081168352602080830151151590840152604080830151909116908301526060908101511515910152565b60a082019390935260c0015292915050565b600060208284031215611d7557600080fd5b815161104281611803565b600060058510611d9257611d9261196f565b84825260606020830152611da960608301856119ad565b9050826040830152949350505050565b60008251611dcb8184602087016119e8565b9190910192915050565b6020815260006110426020830184611a1456fea2646970667358221220cf328588b57f1c782c2f43e7c9cdf2503bf79cd46e454b87761bfefbe423150064736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000077e5bb2c91cac7c7a8a74c38804fdb372baf7328
-----Decoded View---------------
Arg [0] : _vault (address): 0x77E5Bb2c91CaC7c7A8a74c38804fdB372Baf7328
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000077e5bb2c91cac7c7a8a74c38804fdb372baf7328
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.