Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
AlchemixIntegration
Compiler Version
v0.8.2+commit.661d1103
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-07-12 */ pragma solidity 0.8.2; interface IPlatformIntegration { /** * @dev Deposit the given bAsset to Lending platform * @param _bAsset bAsset address * @param _amount Amount to deposit */ function deposit( address _bAsset, uint256 _amount, bool isTokenFeeCharged ) external returns (uint256 quantityDeposited); /** * @dev Withdraw given bAsset from Lending platform */ function withdraw( address _receiver, address _bAsset, uint256 _amount, bool _hasTxFee ) external; /** * @dev Withdraw given bAsset from Lending platform */ function withdraw( address _receiver, address _bAsset, uint256 _amount, uint256 _totalAmount, bool _hasTxFee ) external; /** * @dev Withdraw given bAsset from the cache */ function withdrawRaw( address _receiver, address _bAsset, uint256 _amount ) external; /** * @dev Returns the current balance of the given bAsset */ function checkBalance(address _bAsset) external returns (uint256 balance); } interface IAlchemixStakingPools { function claim(uint256 _poolId) external; function deposit(uint256 _poolId, uint256 _depositAmount) external; function exit(uint256 _poolId) external; function getStakeTotalDeposited(address _account, uint256 _poolId) external view returns (uint256); function getStakeTotalUnclaimed(address _account, uint256 _poolId) external view returns (uint256); function getPoolRewardRate(uint256 _poolId) external view returns (uint256); function getPoolRewardWeight(uint256 _poolId) external view returns (uint256); function getPoolToken(uint256 _poolId) external view returns (address); function reward() external view returns (address); function tokenPoolIds(address _token) external view returns (uint256); function withdraw(uint256 _poolId, uint256 _withdrawAmount) external; } contract ModuleKeys { // Governance // =========== // keccak256("Governance"); bytes32 internal constant KEY_GOVERNANCE = 0x9409903de1e6fd852dfc61c9dacb48196c48535b60e25abf92acc92dd689078d; //keccak256("Staking"); bytes32 internal constant KEY_STAKING = 0x1df41cd916959d1163dc8f0671a666ea8a3e434c13e40faef527133b5d167034; //keccak256("ProxyAdmin"); bytes32 internal constant KEY_PROXY_ADMIN = 0x96ed0203eb7e975a4cbcaa23951943fa35c5d8288117d50c12b3d48b0fab48d1; // mStable // ======= // keccak256("OracleHub"); bytes32 internal constant KEY_ORACLE_HUB = 0x8ae3a082c61a7379e2280f3356a5131507d9829d222d853bfa7c9fe1200dd040; // keccak256("Manager"); bytes32 internal constant KEY_MANAGER = 0x6d439300980e333f0256d64be2c9f67e86f4493ce25f82498d6db7f4be3d9e6f; //keccak256("Recollateraliser"); bytes32 internal constant KEY_RECOLLATERALISER = 0x39e3ed1fc335ce346a8cbe3e64dd525cf22b37f1e2104a755e761c3c1eb4734f; //keccak256("MetaToken"); bytes32 internal constant KEY_META_TOKEN = 0xea7469b14936af748ee93c53b2fe510b9928edbdccac3963321efca7eb1a57a2; // keccak256("SavingsManager"); bytes32 internal constant KEY_SAVINGS_MANAGER = 0x12fe936c77a1e196473c4314f3bed8eeac1d757b319abb85bdda70df35511bf1; // keccak256("Liquidator"); bytes32 internal constant KEY_LIQUIDATOR = 0x1e9cb14d7560734a61fa5ff9273953e971ff3cd9283c03d8346e3264617933d4; // keccak256("InterestValidator"); bytes32 internal constant KEY_INTEREST_VALIDATOR = 0xc10a28f028c7f7282a03c90608e38a4a646e136e614e4b07d119280c5f7f839f; } interface INexus { function governor() external view returns (address); function getModule(bytes32 key) external view returns (address); function proposeModule(bytes32 _key, address _addr) external; function cancelProposedModule(bytes32 _key) external; function acceptProposedModule(bytes32 _key) external; function acceptProposedModules(bytes32[] calldata _keys) external; function requestLockModule(bytes32 _key) external; function cancelLockModule(bytes32 _key) external; function lockModule(bytes32 _key) external; } abstract contract ImmutableModule is ModuleKeys { INexus public immutable nexus; /** * @dev Initialization function for upgradable proxy contracts * @param _nexus Nexus contract address */ constructor(address _nexus) { require(_nexus != address(0), "Nexus address is zero"); nexus = INexus(_nexus); } /** * @dev Modifier to allow function calls only from the Governor. */ modifier onlyGovernor() { _onlyGovernor(); _; } function _onlyGovernor() internal view { require(msg.sender == _governor(), "Only governor can execute"); } /** * @dev Modifier to allow function calls only from the Governance. * Governance is either Governor address or Governance address. */ modifier onlyGovernance() { require( msg.sender == _governor() || msg.sender == _governance(), "Only governance can execute" ); _; } /** * @dev Returns Governor address from the Nexus * @return Address of Governor Contract */ function _governor() internal view returns (address) { return nexus.governor(); } /** * @dev Returns Governance Module address from the Nexus * @return Address of the Governance (Phase 2) */ function _governance() internal view returns (address) { return nexus.getModule(KEY_GOVERNANCE); } /** * @dev Return SavingsManager Module address from the Nexus * @return Address of the SavingsManager Module contract */ function _savingsManager() internal view returns (address) { return nexus.getModule(KEY_SAVINGS_MANAGER); } /** * @dev Return Recollateraliser Module address from the Nexus * @return Address of the Recollateraliser Module contract (Phase 2) */ function _recollateraliser() internal view returns (address) { return nexus.getModule(KEY_RECOLLATERALISER); } /** * @dev Return Recollateraliser Module address from the Nexus * @return Address of the Recollateraliser Module contract (Phase 2) */ function _liquidator() internal view returns (address) { return nexus.getModule(KEY_LIQUIDATOR); } /** * @dev Return ProxyAdmin Module address from the Nexus * @return Address of the ProxyAdmin Module contract */ function _proxyAdmin() internal view returns (address) { return nexus.getModule(KEY_PROXY_ADMIN); } } /** * @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); } /** * @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); } } } } 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"); } } } library MassetHelpers { using SafeERC20 for IERC20; function transferReturnBalance( address _sender, address _recipient, address _bAsset, uint256 _qty ) internal returns (uint256 receivedQty, uint256 recipientBalance) { uint256 balBefore = IERC20(_bAsset).balanceOf(_recipient); IERC20(_bAsset).safeTransferFrom(_sender, _recipient, _qty); recipientBalance = IERC20(_bAsset).balanceOf(_recipient); receivedQty = recipientBalance - balBefore; } function safeInfiniteApprove(address _asset, address _spender) internal { IERC20(_asset).safeApprove(_spender, 0); IERC20(_asset).safeApprove(_spender, 2**256 - 1); } } abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } } // SPDX-License-Identifier: AGPL-3.0-or-later /** * @title AlchemixIntegration * @author mStable * @notice A simple connection to farm ALCX rewards with the Alchemix alUSD pool * @dev VERSION: 1.0 * DATE: 2021-07-02 */ contract AlchemixIntegration is IPlatformIntegration, Initializable, ImmutableModule, ReentrancyGuard { using SafeERC20 for IERC20; event Deposit(address indexed _bAsset, address _pToken, uint256 _amount); event Withdrawal(address indexed _bAsset, address _pToken, uint256 _amount); event PlatformWithdrawal( address indexed bAsset, address pToken, uint256 totalAmount, uint256 userAmount ); event RewardsClaimed(); /// @notice mAsset or Feeder Pool using the integration. eg fPmUSD/alUSD /// @dev LP has write access address public immutable lpAddress; /// @notice token the staking rewards are accrued and claimed in. address public immutable rewardToken; /// @notice Alchemix's StakingPools contract IAlchemixStakingPools public immutable stakingPools; /// @notice base asset that is integrated to Alchemix staking pool. eg alUSD address public immutable bAsset; /// @notice Alchemix pool identifier for bAsset deposits. eg pool id 0 for alUSD uint256 public immutable poolId; /** * @dev Modifier to allow function calls only from the Governor. */ modifier onlyLP() { require(msg.sender == lpAddress, "Only the LP can execute"); _; } /** * @param _nexus Address of the Nexus * @param _lp Address of liquidity provider. eg mAsset or feeder pool * @param _rewardToken Reward token, if any. eg ALCX * @param _stakingPools Alchemix StakingPools contract address * @param _bAsset base asset to be deposited to Alchemix's staking pool. eg alUSD */ constructor( address _nexus, address _lp, address _rewardToken, address _stakingPools, address _bAsset ) ImmutableModule(_nexus) { require(_lp != address(0), "Invalid LP address"); require(_rewardToken != address(0), "Invalid reward token"); require(_stakingPools != address(0), "Invalid staking pools"); require(_bAsset != address(0), "Invalid bAsset address"); lpAddress = _lp; rewardToken = _rewardToken; stakingPools = IAlchemixStakingPools(_stakingPools); bAsset = _bAsset; uint256 offsetPoolId = IAlchemixStakingPools(_stakingPools).tokenPoolIds(_bAsset); require(offsetPoolId >= 1, "bAsset can not be farmed"); // Take one off the poolId poolId = offsetPoolId - 1; } /** * @dev Approve the spending of the bAsset by Alchemix's StakingPools contract, * and the spending of the reward token by mStable's Liquidator contract */ function initialize() public initializer { _approveContracts(); } /*************************************** ADMIN ****************************************/ /** * @dev Re-approve the spending of the bAsset by Alchemix's StakingPools contract, * and the spending of the reward token by mStable's Liquidator contract * if for some reason is it necessary. Only callable through Governance. */ function reapproveContracts() external onlyGovernor { _approveContracts(); } function _approveContracts() internal { // Approve Alchemix staking pools contract to transfer bAssets for deposits. MassetHelpers.safeInfiniteApprove(bAsset, address(stakingPools)); // Approve Liquidator to transfer reward token when claiming rewards. address liquidator = nexus.getModule(keccak256("Liquidator")); require(liquidator != address(0), "Liquidator address is zero"); MassetHelpers.safeInfiniteApprove(rewardToken, liquidator); } /*************************************** CORE ****************************************/ /** * @notice Deposit a quantity of bAsset into the platform. Credited cTokens * remain here in the vault. Can only be called by whitelisted addresses * (mAsset and corresponding BasketManager) * @param _bAsset Address for the bAsset * @param _amount Units of bAsset to deposit * @param isTokenFeeCharged Flag that signals if an xfer fee is charged on bAsset * @return quantityDeposited Quantity of bAsset that entered the platform */ function deposit( address _bAsset, uint256 _amount, bool isTokenFeeCharged ) external override onlyLP nonReentrant returns (uint256 quantityDeposited) { require(_amount > 0, "Must deposit something"); require(_bAsset == bAsset, "Invalid bAsset"); quantityDeposited = _amount; if (isTokenFeeCharged) { // If we charge a fee, account for it uint256 prevBal = this.checkBalance(_bAsset); stakingPools.deposit(poolId, _amount); uint256 newBal = this.checkBalance(_bAsset); quantityDeposited = _min(quantityDeposited, newBal - prevBal); } else { // Else just deposit the amount stakingPools.deposit(poolId, _amount); } emit Deposit(_bAsset, address(stakingPools), quantityDeposited); } /** * @notice Withdraw a quantity of bAsset from Alchemix * @param _receiver Address to which the withdrawn bAsset should be sent * @param _bAsset Address of the bAsset * @param _amount Units of bAsset to withdraw * @param _hasTxFee Is the bAsset known to have a tx fee? */ function withdraw( address _receiver, address _bAsset, uint256 _amount, bool _hasTxFee ) external override onlyLP nonReentrant { _withdraw(_receiver, _bAsset, _amount, _amount, _hasTxFee); } /** * @notice Withdraw a quantity of bAsset from Alchemix * @param _receiver Address to which the withdrawn bAsset should be sent * @param _bAsset Address of the bAsset * @param _amount Units of bAsset to withdraw * @param _totalAmount Total units to pull from lending platform * @param _hasTxFee Is the bAsset known to have a tx fee? */ function withdraw( address _receiver, address _bAsset, uint256 _amount, uint256 _totalAmount, bool _hasTxFee ) external override onlyLP nonReentrant { _withdraw(_receiver, _bAsset, _amount, _totalAmount, _hasTxFee); } function _withdraw( address _receiver, address _bAsset, uint256 _amount, uint256 _totalAmount, bool _hasTxFee ) internal { require(_receiver != address(0), "Must specify recipient"); require(_bAsset == bAsset, "Invalid bAsset"); require(_totalAmount > 0, "Must withdraw something"); uint256 userWithdrawal = _amount; if (_hasTxFee) { require(_amount == _totalAmount, "Cache inactive with tx fee"); IERC20 b = IERC20(_bAsset); uint256 prevBal = b.balanceOf(address(this)); stakingPools.withdraw(poolId, _amount); uint256 newBal = b.balanceOf(address(this)); userWithdrawal = _min(userWithdrawal, newBal - prevBal); } else { // Redeem Underlying bAsset amount stakingPools.withdraw(poolId, _totalAmount); } // Send redeemed bAsset to the receiver IERC20(_bAsset).safeTransfer(_receiver, userWithdrawal); emit PlatformWithdrawal(_bAsset, address(stakingPools), _totalAmount, _amount); } /** * @notice Withdraw a quantity of bAsset from the cache. * @param _receiver Address to which the bAsset should be sent * @param _bAsset Address of the bAsset * @param _amount Units of bAsset to withdraw */ function withdrawRaw( address _receiver, address _bAsset, uint256 _amount ) external override onlyLP nonReentrant { require(_receiver != address(0), "Must specify recipient"); require(_bAsset == bAsset, "Invalid bAsset"); require(_amount > 0, "Must withdraw something"); IERC20(_bAsset).safeTransfer(_receiver, _amount); emit Withdrawal(_bAsset, address(0), _amount); } /** * @notice Get the total bAsset value held in the platform * @param _bAsset Address of the bAsset * @return balance Total value of the bAsset in the platform */ function checkBalance(address _bAsset) external view override returns (uint256 balance) { require(_bAsset == bAsset, "Invalid bAsset"); balance = stakingPools.getStakeTotalDeposited(address(this), poolId); } /*************************************** Liquidation ****************************************/ /** * @notice Claims any accrued reward tokens from the Alchemix staking pool. * eg ALCX tokens from the alUSD deposits. * Claimed rewards are sent to this integration contract. * @dev The Alchemix StakingPools will emit event * TokensClaimed(user, poolId, amount) */ function claimRewards() external { stakingPools.claim(poolId); } /*************************************** HELPERS ****************************************/ /** * @dev Simple helper func to get the min of two values */ function _min(uint256 x, uint256 y) internal pure returns (uint256) { return x > y ? y : x; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_nexus","type":"address"},{"internalType":"address","name":"_lp","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_stakingPools","type":"address"},{"internalType":"address","name":"_bAsset","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_bAsset","type":"address"},{"indexed":false,"internalType":"address","name":"_pToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"bAsset","type":"address"},{"indexed":false,"internalType":"address","name":"pToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"userAmount","type":"uint256"}],"name":"PlatformWithdrawal","type":"event"},{"anonymous":false,"inputs":[],"name":"RewardsClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_bAsset","type":"address"},{"indexed":false,"internalType":"address","name":"_pToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"bAsset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bAsset","type":"address"}],"name":"checkBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bAsset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"isTokenFeeCharged","type":"bool"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"quantityDeposited","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lpAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nexus","outputs":[{"internalType":"contract INexus","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reapproveContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingPools","outputs":[{"internalType":"contract IAlchemixStakingPools","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_bAsset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_hasTxFee","type":"bool"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_bAsset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_totalAmount","type":"uint256"},{"internalType":"bool","name":"_hasTxFee","type":"bool"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_bAsset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawRaw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101406040523480156200001257600080fd5b5060405162001e9a38038062001e9a833981016040819052620000359162000337565b846001600160a01b038116620000925760405162461bcd60e51b815260206004820152601560248201527f4e657875732061646472657373206973207a65726f000000000000000000000060448201526064015b60405180910390fd5b60601b6001600160601b031916608052600180556001600160a01b038416620000f35760405162461bcd60e51b8152602060048201526012602482015271496e76616c6964204c50206164647265737360701b604482015260640162000089565b6001600160a01b0383166200014b5760405162461bcd60e51b815260206004820152601460248201527f496e76616c69642072657761726420746f6b656e000000000000000000000000604482015260640162000089565b6001600160a01b038216620001a35760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964207374616b696e6720706f6f6c730000000000000000000000604482015260640162000089565b6001600160a01b038116620001fb5760405162461bcd60e51b815260206004820152601660248201527f496e76616c696420624173736574206164647265737300000000000000000000604482015260640162000089565b6001600160601b0319606085811b821660a05284811b821660c05283811b821660e05282901b16610100526040516339664a3160e01b81526001600160a01b038083166004830152600091908416906339664a319060240160206040518083038186803b1580156200026c57600080fd5b505afa15801562000281573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002a79190620003a6565b90506001811015620002fc5760405162461bcd60e51b815260206004820152601860248201527f6241737365742063616e206e6f74206265206661726d65640000000000000000604482015260640162000089565b62000309600182620003bf565b6101205250620003e3945050505050565b80516001600160a01b03811681146200033257600080fd5b919050565b600080600080600060a086880312156200034f578081fd5b6200035a866200031a565b94506200036a602087016200031a565b93506200037a604087016200031a565b92506200038a606087016200031a565b91506200039a608087016200031a565b90509295509295909350565b600060208284031215620003b8578081fd5b5051919050565b600082821015620003de57634e487b7160e01b81526011600452602481fd5b500390565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205161199c620004fe6000396000818160fe0152818161028c015281816104bb015281816105f60152818161077301528181610f8101526110b8015260008181610221015281816103db0152818161070f01528181610a2d01528181610c350152610e0701526000818161014b015281816102b2015281816104eb01528181610623015281816106960152818161079901528181610c5601528181610fb1015281816110e5015261116c01526000818161025b0152610d910152600081816101c001528181610325015281816108f0015281816109770152610b330152600081816101e701528181610cb20152611241015261199c6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063934785b71161008c578063a4e2859511610066578063a4e2859514610209578063b8ab24bd1461021c578063c89fc72f14610243578063f7c618c114610256576100ea565b8063934785b7146101a85780639b4dc8cc146101bb578063a3f5c1d2146101e2576100ea565b8063472e50d4116100c8578063472e50d4146101465780634f64ebf0146101855780635f5152261461018d5780638129fc1c146101a0576100ea565b8063372500ab146100ef5780633e0dc34e146100f95780633edd112814610133575b600080fd5b6100f761027d565b005b6101207f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61012061014136600461179a565b610318565b61016d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161012a565b6100f76106f9565b61012061019b366004611672565b61070b565b6100f7610821565b6100f76101b63660046116ea565b6108e5565b61016d7f000000000000000000000000000000000000000000000000000000000000000081565b61016d7f000000000000000000000000000000000000000000000000000000000000000081565b6100f76102173660046116aa565b61096c565b61016d7f000000000000000000000000000000000000000000000000000000000000000081565b6100f761025136600461173c565b610b28565b61016d7f000000000000000000000000000000000000000000000000000000000000000081565b60405163379607f560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063379607f590602401600060405180830381600087803b1580156102fe57600080fd5b505af1158015610312573d6000803e3d6000fd5b50505050565b6000336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461036b5760405162461bcd60e51b81526004016103629061185e565b60405180910390fd5b6002600154141561038e5760405162461bcd60e51b8152600401610362906118bd565b6002600155826103d95760405162461bcd60e51b81526020600482015260166024820152754d757374206465706f73697420736f6d657468696e6760501b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b03161461042a5760405162461bcd60e51b815260040161036290611895565b508181156105e757604051632fa8a91360e11b81526001600160a01b03851660048201526000903090635f5152269060240160206040518083038186803b15801561047457600080fd5b505afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906117f7565b604051631c57762b60e31b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018690529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b15801561053757600080fd5b505af115801561054b573d6000803e3d6000fd5b5050604051632fa8a91360e11b81526001600160a01b038816600482015260009250309150635f5152269060240160206040518083038186803b15801561059157600080fd5b505afa1580156105a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c991906117f7565b90506105de836105d984846118f4565b610bb0565b92505050610688565b604051631c57762b60e31b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e2bbb15890604401600060405180830381600087803b15801561066f57600080fd5b505af1158015610683573d6000803e3d6000fd5b505050505b604080516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081168252602082018490528616917f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62910160405180910390a2600180559392505050565b610701610bc8565b610709610c30565b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461075e5760405162461bcd60e51b815260040161036290611895565b60405163acfc5b6d60e01b81523060048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063acfc5b6d9060440160206040518083038186803b1580156107e357600080fd5b505afa1580156107f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081b91906117f7565b92915050565b600054610100900460ff168061083a575060005460ff16155b61089d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610362565b600054610100900460ff161580156108c8576000805460ff1961ff0019909116610100171660011790555b6108d0610c30565b80156108e2576000805461ff00191690555b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461092d5760405162461bcd60e51b81526004016103629061185e565b600260015414156109505760405162461bcd60e51b8152600401610362906118bd565b60026001556109628484848085610db6565b5050600180555050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b45760405162461bcd60e51b81526004016103629061185e565b600260015414156109d75760405162461bcd60e51b8152600401610362906118bd565b60026001556001600160a01b038316610a2b5760405162461bcd60e51b8152602060048201526016602482015275135d5cdd081cdc1958da599e481c9958da5c1a595b9d60521b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610a7c5760405162461bcd60e51b815260040161036290611895565b60008111610ac65760405162461bcd60e51b81526020600482015260176024820152764d75737420776974686472617720736f6d657468696e6760481b6044820152606401610362565b610ada6001600160a01b03831684836111d5565b6040805160008152602081018390526001600160a01b038416917f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b6398910160405180910390a250506001805550565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b705760405162461bcd60e51b81526004016103629061185e565b60026001541415610b935760405162461bcd60e51b8152600401610362906118bd565b6002600155610ba58585858585610db6565b505060018055505050565b6000818311610bbf5782610bc1565b815b9392505050565b610bd061123d565b6001600160a01b0316336001600160a01b0316146107095760405162461bcd60e51b815260206004820152601960248201527f4f6e6c7920676f7665726e6f722063616e2065786563757465000000000000006044820152606401610362565b610c7a7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006112d5565b6040516385acd64160e01b81527f1e9cb14d7560734a61fa5ff9273953e971ff3cd9283c03d8346e3264617933d460048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906385acd6419060240160206040518083038186803b158015610cfc57600080fd5b505afa158015610d10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d34919061168e565b90506001600160a01b038116610d8c5760405162461bcd60e51b815260206004820152601a60248201527f4c697175696461746f722061646472657373206973207a65726f0000000000006044820152606401610362565b6108e27f0000000000000000000000000000000000000000000000000000000000000000826112d5565b6001600160a01b038516610e055760405162461bcd60e51b8152602060048201526016602482015275135d5cdd081cdc1958da599e481c9958da5c1a595b9d60521b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031614610e565760405162461bcd60e51b815260040161036290611895565b60008211610ea05760405162461bcd60e51b81526020600482015260176024820152764d75737420776974686472617720736f6d657468696e6760481b6044820152606401610362565b8281156110a957828414610ef65760405162461bcd60e51b815260206004820152601a60248201527f436163686520696e6163746976652077697468207478206665650000000000006044820152606401610362565b6040516370a0823160e01b815230600482015285906000906001600160a01b038316906370a082319060240160206040518083038186803b158015610f3a57600080fd5b505afa158015610f4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7291906117f7565b604051630441a3e760e41b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018890529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b158015610ffd57600080fd5b505af1158015611011573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092506001600160a01b03851691506370a082319060240160206040518083038186803b15801561105757600080fd5b505afa15801561106b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108f91906117f7565b905061109f846105d984846118f4565b935050505061114a565b604051630441a3e760e41b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063441a3e7090604401600060405180830381600087803b15801561113157600080fd5b505af1158015611145573d6000803e3d6000fd5b505050505b61115e6001600160a01b03861687836111d5565b604080516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116825260208201869052918101869052908616907fb925ac01b9c34cc156a17a1e3da718f364df34eec9d0c9dc4e59c2bb1e7ba54b9060600160405180910390a2505050505050565b6040516001600160a01b03831660248201526044810182905261123890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611304565b505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561129857600080fd5b505afa1580156112ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d0919061168e565b905090565b6112ea6001600160a01b0383168260006113d6565b6113006001600160a01b038316826000196113d6565b5050565b6000611359826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114fa9092919063ffffffff16565b805190915015611238578080602001905181019061137791906117db565b6112385760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610362565b80158061145f5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145d91906117f7565b155b6114ca5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610362565b6040516001600160a01b03831660248201526044810182905261123890849063095ea7b360e01b90606401611201565b60606115098484600085611511565b949350505050565b6060824710156115725760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610362565b843b6115c05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610362565b600080866001600160a01b031685876040516115dc919061180f565b60006040518083038185875af1925050503d8060008114611619576040519150601f19603f3d011682016040523d82523d6000602084013e61161e565b606091505b509150915061162e828286611639565b979650505050505050565b60608315611648575081610bc1565b8251156116585782518084602001fd5b8160405162461bcd60e51b8152600401610362919061182b565b600060208284031215611683578081fd5b8135610bc181611943565b60006020828403121561169f578081fd5b8151610bc181611943565b6000806000606084860312156116be578182fd5b83356116c981611943565b925060208401356116d981611943565b929592945050506040919091013590565b600080600080608085870312156116ff578081fd5b843561170a81611943565b9350602085013561171a81611943565b925060408501359150606085013561173181611958565b939692955090935050565b600080600080600060a08688031215611753578081fd5b853561175e81611943565b9450602086013561176e81611943565b93506040860135925060608601359150608086013561178c81611958565b809150509295509295909350565b6000806000606084860312156117ae578283fd5b83356117b981611943565b92506020840135915060408401356117d081611958565b809150509250925092565b6000602082840312156117ec578081fd5b8151610bc181611958565b600060208284031215611808578081fd5b5051919050565b60008251611821818460208701611917565b9190910192915050565b600060208252825180602084015261184a816040850160208701611917565b601f01601f19169190910160400192915050565b60208082526017908201527f4f6e6c7920746865204c502063616e2065786563757465000000000000000000604082015260600190565b6020808252600e908201526d125b9d985b1a590818905cdcd95d60921b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008282101561191257634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561193257818101518382015260200161191a565b838111156103125750506000910152565b6001600160a01b03811681146108e257600080fd5b80151581146108e257600080fdfea2646970667358221220dc6a73c46f6acedf2f08b4007aa432c595f75222a4e1e585fb1370269929be3e64736f6c63430008020033000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb30000000000000000000000004eaa01974b6594c0ee62ffd7fee56cf11e6af936000000000000000000000000dbdb4d16eda451d0503b854cf79d55697f90c8df000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca000000000000000000000000bc6da0fe9ad5f3b0d58160288917aa56653660e9
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063934785b71161008c578063a4e2859511610066578063a4e2859514610209578063b8ab24bd1461021c578063c89fc72f14610243578063f7c618c114610256576100ea565b8063934785b7146101a85780639b4dc8cc146101bb578063a3f5c1d2146101e2576100ea565b8063472e50d4116100c8578063472e50d4146101465780634f64ebf0146101855780635f5152261461018d5780638129fc1c146101a0576100ea565b8063372500ab146100ef5780633e0dc34e146100f95780633edd112814610133575b600080fd5b6100f761027d565b005b6101207f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61012061014136600461179a565b610318565b61016d7f000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca81565b6040516001600160a01b03909116815260200161012a565b6100f76106f9565b61012061019b366004611672565b61070b565b6100f7610821565b6100f76101b63660046116ea565b6108e5565b61016d7f0000000000000000000000004eaa01974b6594c0ee62ffd7fee56cf11e6af93681565b61016d7f000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb381565b6100f76102173660046116aa565b61096c565b61016d7f000000000000000000000000bc6da0fe9ad5f3b0d58160288917aa56653660e981565b6100f761025136600461173c565b610b28565b61016d7f000000000000000000000000dbdb4d16eda451d0503b854cf79d55697f90c8df81565b60405163379607f560e01b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca6001600160a01b03169063379607f590602401600060405180830381600087803b1580156102fe57600080fd5b505af1158015610312573d6000803e3d6000fd5b50505050565b6000336001600160a01b037f0000000000000000000000004eaa01974b6594c0ee62ffd7fee56cf11e6af936161461036b5760405162461bcd60e51b81526004016103629061185e565b60405180910390fd5b6002600154141561038e5760405162461bcd60e51b8152600401610362906118bd565b6002600155826103d95760405162461bcd60e51b81526020600482015260166024820152754d757374206465706f73697420736f6d657468696e6760501b6044820152606401610362565b7f000000000000000000000000bc6da0fe9ad5f3b0d58160288917aa56653660e96001600160a01b0316846001600160a01b03161461042a5760405162461bcd60e51b815260040161036290611895565b508181156105e757604051632fa8a91360e11b81526001600160a01b03851660048201526000903090635f5152269060240160206040518083038186803b15801561047457600080fd5b505afa158015610488573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ac91906117f7565b604051631c57762b60e31b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018690529091507f000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca6001600160a01b03169063e2bbb15890604401600060405180830381600087803b15801561053757600080fd5b505af115801561054b573d6000803e3d6000fd5b5050604051632fa8a91360e11b81526001600160a01b038816600482015260009250309150635f5152269060240160206040518083038186803b15801561059157600080fd5b505afa1580156105a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c991906117f7565b90506105de836105d984846118f4565b610bb0565b92505050610688565b604051631c57762b60e31b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018490527f000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca6001600160a01b03169063e2bbb15890604401600060405180830381600087803b15801561066f57600080fd5b505af1158015610683573d6000803e3d6000fd5b505050505b604080516001600160a01b037f000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca81168252602082018490528616917f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62910160405180910390a2600180559392505050565b610701610bc8565b610709610c30565b565b60007f000000000000000000000000bc6da0fe9ad5f3b0d58160288917aa56653660e96001600160a01b0316826001600160a01b03161461075e5760405162461bcd60e51b815260040161036290611895565b60405163acfc5b6d60e01b81523060048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca6001600160a01b03169063acfc5b6d9060440160206040518083038186803b1580156107e357600080fd5b505afa1580156107f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081b91906117f7565b92915050565b600054610100900460ff168061083a575060005460ff16155b61089d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610362565b600054610100900460ff161580156108c8576000805460ff1961ff0019909116610100171660011790555b6108d0610c30565b80156108e2576000805461ff00191690555b50565b336001600160a01b037f0000000000000000000000004eaa01974b6594c0ee62ffd7fee56cf11e6af936161461092d5760405162461bcd60e51b81526004016103629061185e565b600260015414156109505760405162461bcd60e51b8152600401610362906118bd565b60026001556109628484848085610db6565b5050600180555050565b336001600160a01b037f0000000000000000000000004eaa01974b6594c0ee62ffd7fee56cf11e6af93616146109b45760405162461bcd60e51b81526004016103629061185e565b600260015414156109d75760405162461bcd60e51b8152600401610362906118bd565b60026001556001600160a01b038316610a2b5760405162461bcd60e51b8152602060048201526016602482015275135d5cdd081cdc1958da599e481c9958da5c1a595b9d60521b6044820152606401610362565b7f000000000000000000000000bc6da0fe9ad5f3b0d58160288917aa56653660e96001600160a01b0316826001600160a01b031614610a7c5760405162461bcd60e51b815260040161036290611895565b60008111610ac65760405162461bcd60e51b81526020600482015260176024820152764d75737420776974686472617720736f6d657468696e6760481b6044820152606401610362565b610ada6001600160a01b03831684836111d5565b6040805160008152602081018390526001600160a01b038416917f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b6398910160405180910390a250506001805550565b336001600160a01b037f0000000000000000000000004eaa01974b6594c0ee62ffd7fee56cf11e6af9361614610b705760405162461bcd60e51b81526004016103629061185e565b60026001541415610b935760405162461bcd60e51b8152600401610362906118bd565b6002600155610ba58585858585610db6565b505060018055505050565b6000818311610bbf5782610bc1565b815b9392505050565b610bd061123d565b6001600160a01b0316336001600160a01b0316146107095760405162461bcd60e51b815260206004820152601960248201527f4f6e6c7920676f7665726e6f722063616e2065786563757465000000000000006044820152606401610362565b610c7a7f000000000000000000000000bc6da0fe9ad5f3b0d58160288917aa56653660e97f000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca6112d5565b6040516385acd64160e01b81527f1e9cb14d7560734a61fa5ff9273953e971ff3cd9283c03d8346e3264617933d460048201526000907f000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb36001600160a01b0316906385acd6419060240160206040518083038186803b158015610cfc57600080fd5b505afa158015610d10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d34919061168e565b90506001600160a01b038116610d8c5760405162461bcd60e51b815260206004820152601a60248201527f4c697175696461746f722061646472657373206973207a65726f0000000000006044820152606401610362565b6108e27f000000000000000000000000dbdb4d16eda451d0503b854cf79d55697f90c8df826112d5565b6001600160a01b038516610e055760405162461bcd60e51b8152602060048201526016602482015275135d5cdd081cdc1958da599e481c9958da5c1a595b9d60521b6044820152606401610362565b7f000000000000000000000000bc6da0fe9ad5f3b0d58160288917aa56653660e96001600160a01b0316846001600160a01b031614610e565760405162461bcd60e51b815260040161036290611895565b60008211610ea05760405162461bcd60e51b81526020600482015260176024820152764d75737420776974686472617720736f6d657468696e6760481b6044820152606401610362565b8281156110a957828414610ef65760405162461bcd60e51b815260206004820152601a60248201527f436163686520696e6163746976652077697468207478206665650000000000006044820152606401610362565b6040516370a0823160e01b815230600482015285906000906001600160a01b038316906370a082319060240160206040518083038186803b158015610f3a57600080fd5b505afa158015610f4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f7291906117f7565b604051630441a3e760e41b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018890529091507f000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca6001600160a01b03169063441a3e7090604401600060405180830381600087803b158015610ffd57600080fd5b505af1158015611011573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092506001600160a01b03851691506370a082319060240160206040518083038186803b15801561105757600080fd5b505afa15801561106b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108f91906117f7565b905061109f846105d984846118f4565b935050505061114a565b604051630441a3e760e41b81527f00000000000000000000000000000000000000000000000000000000000000006004820152602481018490527f000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca6001600160a01b03169063441a3e7090604401600060405180830381600087803b15801561113157600080fd5b505af1158015611145573d6000803e3d6000fd5b505050505b61115e6001600160a01b03861687836111d5565b604080516001600160a01b037f000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca8116825260208201869052918101869052908616907fb925ac01b9c34cc156a17a1e3da718f364df34eec9d0c9dc4e59c2bb1e7ba54b9060600160405180910390a2505050505050565b6040516001600160a01b03831660248201526044810182905261123890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611304565b505050565b60007f000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb36001600160a01b0316630c340a246040518163ffffffff1660e01b815260040160206040518083038186803b15801561129857600080fd5b505afa1580156112ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d0919061168e565b905090565b6112ea6001600160a01b0383168260006113d6565b6113006001600160a01b038316826000196113d6565b5050565b6000611359826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114fa9092919063ffffffff16565b805190915015611238578080602001905181019061137791906117db565b6112385760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610362565b80158061145f5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561142557600080fd5b505afa158015611439573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145d91906117f7565b155b6114ca5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610362565b6040516001600160a01b03831660248201526044810182905261123890849063095ea7b360e01b90606401611201565b60606115098484600085611511565b949350505050565b6060824710156115725760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610362565b843b6115c05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610362565b600080866001600160a01b031685876040516115dc919061180f565b60006040518083038185875af1925050503d8060008114611619576040519150601f19603f3d011682016040523d82523d6000602084013e61161e565b606091505b509150915061162e828286611639565b979650505050505050565b60608315611648575081610bc1565b8251156116585782518084602001fd5b8160405162461bcd60e51b8152600401610362919061182b565b600060208284031215611683578081fd5b8135610bc181611943565b60006020828403121561169f578081fd5b8151610bc181611943565b6000806000606084860312156116be578182fd5b83356116c981611943565b925060208401356116d981611943565b929592945050506040919091013590565b600080600080608085870312156116ff578081fd5b843561170a81611943565b9350602085013561171a81611943565b925060408501359150606085013561173181611958565b939692955090935050565b600080600080600060a08688031215611753578081fd5b853561175e81611943565b9450602086013561176e81611943565b93506040860135925060608601359150608086013561178c81611958565b809150509295509295909350565b6000806000606084860312156117ae578283fd5b83356117b981611943565b92506020840135915060408401356117d081611958565b809150509250925092565b6000602082840312156117ec578081fd5b8151610bc181611958565b600060208284031215611808578081fd5b5051919050565b60008251611821818460208701611917565b9190910192915050565b600060208252825180602084015261184a816040850160208701611917565b601f01601f19169190910160400192915050565b60208082526017908201527f4f6e6c7920746865204c502063616e2065786563757465000000000000000000604082015260600190565b6020808252600e908201526d125b9d985b1a590818905cdcd95d60921b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008282101561191257634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561193257818101518382015260200161191a565b838111156103125750506000910152565b6001600160a01b03811681146108e257600080fd5b80151581146108e257600080fdfea2646970667358221220dc6a73c46f6acedf2f08b4007aa432c595f75222a4e1e585fb1370269929be3e64736f6c63430008020033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb30000000000000000000000004eaa01974b6594c0ee62ffd7fee56cf11e6af936000000000000000000000000dbdb4d16eda451d0503b854cf79d55697f90c8df000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca000000000000000000000000bc6da0fe9ad5f3b0d58160288917aa56653660e9
-----Decoded View---------------
Arg [0] : _nexus (address): 0xAFcE80b19A8cE13DEc0739a1aaB7A028d6845Eb3
Arg [1] : _lp (address): 0x4eaa01974B6594C0Ee62fFd7FEE56CF11E6af936
Arg [2] : _rewardToken (address): 0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF
Arg [3] : _stakingPools (address): 0xAB8e74017a8Cc7c15FFcCd726603790d26d7DeCa
Arg [4] : _bAsset (address): 0xBC6DA0FE9aD5f3b0d58160288917AA56653660E9
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000afce80b19a8ce13dec0739a1aab7a028d6845eb3
Arg [1] : 0000000000000000000000004eaa01974b6594c0ee62ffd7fee56cf11e6af936
Arg [2] : 000000000000000000000000dbdb4d16eda451d0503b854cf79d55697f90c8df
Arg [3] : 000000000000000000000000ab8e74017a8cc7c15ffccd726603790d26d7deca
Arg [4] : 000000000000000000000000bc6da0fe9ad5f3b0d58160288917aa56653660e9
Deployed Bytecode Sourcemap
24555:9851:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34007:78;;;:::i;:::-;;25648:31;;;;;;;;4791:25:1;;;4779:2;4764:18;25648:31:0;;;;;;;;29061:877;;;;;;:::i;:::-;;:::i;25384:51::-;;;;;;;;-1:-1:-1;;;;;3663:32:1;;;3645:51;;3633:2;3618:18;25384:51:0;3600:102:1;27800:90:0;;;:::i;33300:230::-;;;;;;:::i;:::-;;:::i;27319:79::-;;;:::i;30281:245::-;;;;;;:::i;:::-;;:::i;25179:34::-;;;;;4492:29;;;;;32637:455;;;;;;:::i;:::-;;:::i;25524:31::-;;;;;30940:281;;;;;;:::i;:::-;;:::i;25291:36::-;;;;;34007:78;34051:26;;-1:-1:-1;;;34051:26:0;;34070:6;34051:26;;;4791:25:1;34051:12:0;-1:-1:-1;;;;;34051:18:0;;;;4764::1;;34051:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34007:78::o;29061:877::-;29217:25;25813:10;-1:-1:-1;;;;;25827:9:0;25813:23;;25805:59;;;;-1:-1:-1;;;25805:59:0;;;;;;;:::i;:::-;;;;;;;;;22573:1:::1;23170:7;;:19;;23162:63;;;;-1:-1:-1::0;;;23162:63:0::1;;;;;;;:::i;:::-;22573:1;23303:7;:18:::0;29263:11;29255:46:::2;;;::::0;-1:-1:-1;;;29255:46:0;;5876:2:1;29255:46:0::2;::::0;::::2;5858:21:1::0;5915:2;5895:18;;;5888:30;-1:-1:-1;;;5934:18:1;;;5927:52;5996:18;;29255:46:0::2;5848:172:1::0;29255:46:0::2;29331:6;-1:-1:-1::0;;;;;29320:17:0::2;:7;-1:-1:-1::0;;;;;29320:17:0::2;;29312:44;;;;-1:-1:-1::0;;;29312:44:0::2;;;;;;;:::i;:::-;-1:-1:-1::0;29389:7:0;29409:446;::::2;;;29516:26;::::0;-1:-1:-1;;;29516:26:0;;-1:-1:-1;;;;;3663:32:1;;29516:26:0::2;::::0;::::2;3645:51:1::0;29498:15:0::2;::::0;29516:4:::2;::::0;:17:::2;::::0;3618:18:1;;29516:26:0::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;29557:37;::::0;-1:-1:-1;;;29557:37:0;;29578:6:::2;29557:37;::::0;::::2;11217:25:1::0;11258:18;;;11251:34;;;29498:44:0;;-1:-1:-1;29557:12:0::2;-1:-1:-1::0;;;;;29557:20:0::2;::::0;::::2;::::0;11190:18:1;;29557:37:0::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;;29626:26:0::2;::::0;-1:-1:-1;;;29626:26:0;;-1:-1:-1;;;;;3663:32:1;;29626:26:0::2;::::0;::::2;3645:51:1::0;29609:14:0::2;::::0;-1:-1:-1;29626:4:0::2;::::0;-1:-1:-1;29626:17:0::2;::::0;3618:18:1;;29626:26:0::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;29609:43:::0;-1:-1:-1;29687:41:0::2;29692:17:::0;29711:16:::2;29720:7:::0;29609:43;29711:16:::2;:::i;:::-;29687:4;:41::i;:::-;29667:61;;29409:446;;;;;29806:37;::::0;-1:-1:-1;;;29806:37:0;;29827:6:::2;29806:37;::::0;::::2;11217:25:1::0;11258:18;;;11251:34;;;29806:12:0::2;-1:-1:-1::0;;;;;29806:20:0::2;::::0;::::2;::::0;11190:18:1;;29806:37:0::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;29409:446;29872:58;::::0;;-1:-1:-1;;;;;29897:12:0::2;4208:32:1::0;;4190:51;;4272:2;4257:18;;4250:34;;;29872:58:0;::::2;::::0;::::2;::::0;4163:18:1;29872:58:0::2;;;;;;;22529:1:::1;23482:22:::0;;29061:877;;-1:-1:-1;;;29061:877:0:o;27800:90::-;4926:15;:13;:15::i;:::-;27863:19:::1;:17;:19::i;:::-;27800:90::o:0;33300:230::-;33371:15;33418:6;-1:-1:-1;;;;;33407:17:0;:7;-1:-1:-1;;;;;33407:17:0;;33399:44;;;;-1:-1:-1;;;33399:44:0;;;;;;;:::i;:::-;33464:58;;-1:-1:-1;;;33464:58:0;;33508:4;33464:58;;;4190:51:1;33515:6:0;4257:18:1;;;4250:34;33464:12:0;-1:-1:-1;;;;;33464:35:0;;;;4163:18:1;;33464:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;33454:68;33300:230;-1:-1:-1;;33300:230:0:o;27319:79::-;23952:13;;;;;;;;:30;;-1:-1:-1;23970:12:0;;;;23969:13;23952:30;23944:89;;;;-1:-1:-1;;;23944:89:0;;8401:2:1;23944:89:0;;;8383:21:1;8440:2;8420:18;;;8413:30;8479:34;8459:18;;;8452:62;-1:-1:-1;;;8530:18:1;;;8523:44;8584:19;;23944:89:0;8373:236:1;23944:89:0;24046:19;24069:13;;;;;;24068:14;24093:101;;;;24128:13;:20;;-1:-1:-1;;;;24128:20:0;;;;;24163:19;24144:4;24163:19;;;24093:101;27371:19:::1;:17;:19::i;:::-;24224:14:::0;24220:68;;;24271:5;24255:21;;-1:-1:-1;;24255:21:0;;;24220:68;27319:79;:::o;30281:245::-;25813:10;-1:-1:-1;;;;;25827:9:0;25813:23;;25805:59;;;;-1:-1:-1;;;25805:59:0;;;;;;;:::i;:::-;22573:1:::1;23170:7;;:19;;23162:63;;;;-1:-1:-1::0;;;23162:63:0::1;;;;;;;:::i;:::-;22573:1;23303:7;:18:::0;30460:58:::2;30470:9:::0;30481:7;30490;;30508:9;30460::::2;:58::i;:::-;-1:-1:-1::0;;22529:1:0::1;23482:22:::0;;-1:-1:-1;;30281:245:0:o;32637:455::-;25813:10;-1:-1:-1;;;;;25827:9:0;25813:23;;25805:59;;;;-1:-1:-1;;;25805:59:0;;;;;;;:::i;:::-;22573:1:::1;23170:7;;:19;;23162:63;;;;-1:-1:-1::0;;;23162:63:0::1;;;;;;;:::i;:::-;22573:1;23303:7;:18:::0;-1:-1:-1;;;;;32802:23:0;::::2;32794:58;;;::::0;-1:-1:-1;;;32794:58:0;;7698:2:1;32794:58:0::2;::::0;::::2;7680:21:1::0;7737:2;7717:18;;;7710:30;-1:-1:-1;;;7756:18:1;;;7749:52;7818:18;;32794:58:0::2;7670:172:1::0;32794:58:0::2;32882:6;-1:-1:-1::0;;;;;32871:17:0::2;:7;-1:-1:-1::0;;;;;32871:17:0::2;;32863:44;;;;-1:-1:-1::0;;;32863:44:0::2;;;;;;;:::i;:::-;32936:1;32926:7;:11;32918:47;;;::::0;-1:-1:-1;;;32918:47:0;;10288:2:1;32918:47:0::2;::::0;::::2;10270:21:1::0;10327:2;10307:18;;;10300:30;-1:-1:-1;;;10346:18:1;;;10339:53;10409:18;;32918:47:0::2;10260:173:1::0;32918:47:0::2;32978:48;-1:-1:-1::0;;;;;32978:28:0;::::2;33007:9:::0;33018:7;32978:28:::2;:48::i;:::-;33044:40;::::0;;33072:1:::2;4190:51:1::0;;4272:2;4257:18;;4250:34;;;-1:-1:-1;;;;;33044:40:0;::::2;::::0;::::2;::::0;4163:18:1;33044:40:0::2;;;;;;;-1:-1:-1::0;;22529:1:0::1;23482:22:::0;;-1:-1:-1;32637:455:0:o;30940:281::-;25813:10;-1:-1:-1;;;;;25827:9:0;25813:23;;25805:59;;;;-1:-1:-1;;;25805:59:0;;;;;;;:::i;:::-;22573:1:::1;23170:7;;:19;;23162:63;;;;-1:-1:-1::0;;;23162:63:0::1;;;;;;;:::i;:::-;22573:1;23303:7;:18:::0;31150:63:::2;31160:9:::0;31171:7;31180;31189:12;31203:9;31150::::2;:63::i;:::-;-1:-1:-1::0;;22529:1:0::1;23482:22:::0;;-1:-1:-1;;;30940:281:0:o;34296:107::-;34355:7;34386:1;34382;:5;:13;;34394:1;34382:13;;;34390:1;34382:13;34375:20;34296:107;-1:-1:-1;;;34296:107:0:o;4969:121::-;5041:11;:9;:11::i;:::-;-1:-1:-1;;;;;5027:25:0;:10;-1:-1:-1;;;;;5027:25:0;;5019:63;;;;-1:-1:-1;;;5019:63:0;;7344:2:1;5019:63:0;;;7326:21:1;7383:2;7363:18;;;7356:30;7422:27;7402:18;;;7395:55;7467:18;;5019:63:0;7316:175:1;27898:505:0;28033:64;28067:6;28083:12;28033:33;:64::i;:::-;28210:40;;-1:-1:-1;;;28210:40:0;;28226:23;28210:40;;;4791:25:1;28189:18:0;;28210:5;-1:-1:-1;;;;;28210:15:0;;;;4764:18:1;;28210:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;28189:61;-1:-1:-1;;;;;;28269:24:0;;28261:63;;;;-1:-1:-1;;;28261:63:0;;6227:2:1;28261:63:0;;;6209:21:1;6266:2;6246:18;;;6239:30;6305:28;6285:18;;;6278:56;6351:18;;28261:63:0;6199:176:1;28261:63:0;28337:58;28371:11;28384:10;28337:33;:58::i;31229:1140::-;-1:-1:-1;;;;;31419:23:0;;31411:58;;;;-1:-1:-1;;;31411:58:0;;7698:2:1;31411:58:0;;;7680:21:1;7737:2;7717:18;;;7710:30;-1:-1:-1;;;7756:18:1;;;7749:52;7818:18;;31411:58:0;7670:172:1;31411:58:0;31499:6;-1:-1:-1;;;;;31488:17:0;:7;-1:-1:-1;;;;;31488:17:0;;31480:44;;;;-1:-1:-1;;;31480:44:0;;;;;;;:::i;:::-;31558:1;31543:12;:16;31535:52;;;;-1:-1:-1;;;31535:52:0;;10288:2:1;31535:52:0;;;10270:21:1;10327:2;10307:18;;;10300:30;-1:-1:-1;;;10346:18:1;;;10339:53;10409:18;;31535:52:0;10260:173:1;31535:52:0;31625:7;31645:509;;;;31694:12;31683:7;:23;31675:62;;;;-1:-1:-1;;;31675:62:0;;6989:2:1;31675:62:0;;;6971:21:1;7028:2;7008:18;;;7001:30;7067:28;7047:18;;;7040:56;7113:18;;31675:62:0;6961:176:1;31675:62:0;31811:26;;-1:-1:-1;;;31811:26:0;;31831:4;31811:26;;;3645:51:1;31770:7:0;;31752:8;;-1:-1:-1;;;;;31811:11:0;;;;;3618:18:1;;31811:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;31852:38;;-1:-1:-1;;;31852:38:0;;31874:6;31852:38;;;11217:25:1;11258:18;;;11251:34;;;31793:44:0;;-1:-1:-1;31852:12:0;-1:-1:-1;;;;;31852:21:0;;;;11190:18:1;;31852:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;31922:26:0;;-1:-1:-1;;;31922:26:0;;31942:4;31922:26;;;3645:51:1;31905:14:0;;-1:-1:-1;;;;;;31922:11:0;;;-1:-1:-1;31922:11:0;;3618:18:1;;31922:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;31905:43;-1:-1:-1;31980:38:0;31985:14;32001:16;32010:7;31905:43;32001:16;:::i;31980:38::-;31963:55;;31645:509;;;;;;32099:43;;-1:-1:-1;;;32099:43:0;;32121:6;32099:43;;;11217:25:1;11258:18;;;11251:34;;;32099:12:0;-1:-1:-1;;;;;32099:21:0;;;;11190:18:1;;32099:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31645:509;32215:55;-1:-1:-1;;;;;32215:28:0;;32244:9;32255:14;32215:28;:55::i;:::-;32288:73;;;-1:-1:-1;;;;;32324:12:0;4515:32:1;;4497:51;;4579:2;4564:18;;4557:34;;;4607:18;;;4600:34;;;32288:73:0;;;;;;4485:2:1;4470:18;32288:73:0;;;;;;;31229:1140;;;;;;:::o;17746:177::-;17856:58;;-1:-1:-1;;;;;4208:32:1;;17856:58:0;;;4190:51:1;4257:18;;;4250:34;;;17829:86:0;;17849:5;;-1:-1:-1;;;17879:23:0;4163:18:1;;17856:58:0;;;;-1:-1:-1;;17856:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;17856:58:0;-1:-1:-1;;;;;;17856:58:0;;;;;;;;;;17829:19;:86::i;:::-;17746:177;;;:::o;5576:95::-;5620:7;5647:5;-1:-1:-1;;;;;5647:14:0;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5640:23;;5576:95;:::o;21493:189::-;21576:39;-1:-1:-1;;;;;21576:26:0;;21603:8;21613:1;21576:26;:39::i;:::-;21626:48;-1:-1:-1;;;;;21626:26:0;;21653:8;-1:-1:-1;;21626:26:0;:48::i;:::-;21493:189;;:::o;20180:761::-;20604:23;20630:69;20658:4;20630:69;;;;;;;;;;;;;;;;;20638:5;-1:-1:-1;;;;;20630:27:0;;;:69;;;;;:::i;:::-;20714:17;;20604:95;;-1:-1:-1;20714:21:0;20710:224;;20856:10;20845:30;;;;;;;;;;;;:::i;:::-;20837:85;;;;-1:-1:-1;;;20837:85:0;;9517:2:1;20837:85:0;;;9499:21:1;9556:2;9536:18;;;9529:30;9595:34;9575:18;;;9568:62;-1:-1:-1;;;9646:18:1;;;9639:40;9696:19;;20837:85:0;9489:232:1;18405:622:0;18775:10;;;18774:62;;-1:-1:-1;18791:39:0;;-1:-1:-1;;;18791:39:0;;18815:4;18791:39;;;3919:34:1;-1:-1:-1;;;;;3989:15:1;;;3969:18;;;3962:43;18791:15:0;;;;;3854:18:1;;18791:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:44;18774:62;18766:152;;;;-1:-1:-1;;;18766:152:0;;10640:2:1;18766:152:0;;;10622:21:1;10679:2;10659:18;;;10652:30;10718:34;10698:18;;;10691:62;-1:-1:-1;;;10769:18:1;;;10762:52;10831:19;;18766:152:0;10612:244:1;18766:152:0;18956:62;;-1:-1:-1;;;;;4208:32:1;;18956:62:0;;;4190:51:1;4257:18;;;4250:34;;;18929:90:0;;18949:5;;-1:-1:-1;;;18979:22:0;4163:18:1;;18956:62:0;4145:145:1;13346:195:0;13449:12;13481:52;13503:6;13511:4;13517:1;13520:12;13481:21;:52::i;:::-;13474:59;13346:195;-1:-1:-1;;;;13346:195:0:o;14398:530::-;14525:12;14583:5;14558:21;:30;;14550:81;;;;-1:-1:-1;;;14550:81:0;;6582:2:1;14550:81:0;;;6564:21:1;6621:2;6601:18;;;6594:30;6660:34;6640:18;;;6633:62;-1:-1:-1;;;6711:18:1;;;6704:36;6757:19;;14550:81:0;6554:228:1;14550:81:0;10795:20;;14642:60;;;;-1:-1:-1;;;14642:60:0;;9159:2:1;14642:60:0;;;9141:21:1;9198:2;9178:18;;;9171:30;9237:31;9217:18;;;9210:59;9286:18;;14642:60:0;9131:179:1;14642:60:0;14776:12;14790:23;14817:6;-1:-1:-1;;;;;14817:11:0;14837:5;14845:4;14817:33;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14775:75;;;;14868:52;14886:7;14895:10;14907:12;14868:17;:52::i;:::-;14861:59;14398:530;-1:-1:-1;;;;;;;14398:530:0:o;16938:742::-;17053:12;17082:7;17078:595;;;-1:-1:-1;17113:10:0;17106:17;;17078:595;17227:17;;:21;17223:439;;17490:10;17484:17;17551:15;17538:10;17534:2;17530:19;17523:44;17438:148;17633:12;17626:20;;-1:-1:-1;;;17626:20:0;;;;;;;;:::i;14:257:1:-;;126:2;114:9;105:7;101:23;97:32;94:2;;;147:6;139;132:22;94:2;191:9;178:23;210:31;235:5;210:31;:::i;276:261::-;;399:2;387:9;378:7;374:23;370:32;367:2;;;420:6;412;405:22;367:2;457:9;451:16;476:31;501:5;476:31;:::i;542:466::-;;;;688:2;676:9;667:7;663:23;659:32;656:2;;;709:6;701;694:22;656:2;753:9;740:23;772:31;797:5;772:31;:::i;:::-;822:5;-1:-1:-1;879:2:1;864:18;;851:32;892:33;851:32;892:33;:::i;:::-;646:362;;944:7;;-1:-1:-1;;;998:2:1;983:18;;;;970:32;;646:362::o;1013:602::-;;;;;1173:3;1161:9;1152:7;1148:23;1144:33;1141:2;;;1195:6;1187;1180:22;1141:2;1239:9;1226:23;1258:31;1283:5;1258:31;:::i;:::-;1308:5;-1:-1:-1;1365:2:1;1350:18;;1337:32;1378:33;1337:32;1378:33;:::i;:::-;1430:7;-1:-1:-1;1484:2:1;1469:18;;1456:32;;-1:-1:-1;1540:2:1;1525:18;;1512:32;1553:30;1512:32;1553:30;:::i;:::-;1131:484;;;;-1:-1:-1;1131:484:1;;-1:-1:-1;;1131:484:1:o;1620:671::-;;;;;;1797:3;1785:9;1776:7;1772:23;1768:33;1765:2;;;1819:6;1811;1804:22;1765:2;1863:9;1850:23;1882:31;1907:5;1882:31;:::i;:::-;1932:5;-1:-1:-1;1989:2:1;1974:18;;1961:32;2002:33;1961:32;2002:33;:::i;:::-;2054:7;-1:-1:-1;2108:2:1;2093:18;;2080:32;;-1:-1:-1;2159:2:1;2144:18;;2131:32;;-1:-1:-1;2215:3:1;2200:19;;2187:33;2229:30;2187:33;2229:30;:::i;:::-;2278:7;2268:17;;;1755:536;;;;;;;;:::o;2296:460::-;;;;2439:2;2427:9;2418:7;2414:23;2410:32;2407:2;;;2460:6;2452;2445:22;2407:2;2504:9;2491:23;2523:31;2548:5;2523:31;:::i;:::-;2573:5;-1:-1:-1;2625:2:1;2610:18;;2597:32;;-1:-1:-1;2681:2:1;2666:18;;2653:32;2694:30;2653:32;2694:30;:::i;:::-;2743:7;2733:17;;;2397:359;;;;;:::o;2761:255::-;;2881:2;2869:9;2860:7;2856:23;2852:32;2849:2;;;2902:6;2894;2887:22;2849:2;2939:9;2933:16;2958:28;2980:5;2958:28;:::i;3021:194::-;;3144:2;3132:9;3123:7;3119:23;3115:32;3112:2;;;3165:6;3157;3150:22;3112:2;-1:-1:-1;3193:16:1;;3102:113;-1:-1:-1;3102:113:1:o;3220:274::-;;3387:6;3381:13;3403:53;3449:6;3444:3;3437:4;3429:6;3425:17;3403:53;:::i;:::-;3472:16;;;;;3357:137;-1:-1:-1;;3357:137:1:o;5286:383::-;;5435:2;5424:9;5417:21;5467:6;5461:13;5510:6;5505:2;5494:9;5490:18;5483:34;5526:66;5585:6;5580:2;5569:9;5565:18;5560:2;5552:6;5548:15;5526:66;:::i;:::-;5653:2;5632:15;-1:-1:-1;;5628:29:1;5613:45;;;;5660:2;5609:54;;5407:262;-1:-1:-1;;5407:262:1:o;7847:347::-;8049:2;8031:21;;;8088:2;8068:18;;;8061:30;8127:25;8122:2;8107:18;;8100:53;8185:2;8170:18;;8021:173::o;8614:338::-;8816:2;8798:21;;;8855:2;8835:18;;;8828:30;-1:-1:-1;;;8889:2:1;8874:18;;8867:44;8943:2;8928:18;;8788:164::o;9726:355::-;9928:2;9910:21;;;9967:2;9947:18;;;9940:30;10006:33;10001:2;9986:18;;9979:61;10072:2;10057:18;;9900:181::o;11296:228::-;;11364:1;11361;11358:8;11355:2;;;-1:-1:-1;;;11389:34:1;;11446:4;11443:1;11436:15;11477:4;11396;11464:18;11355:2;-1:-1:-1;11509:9:1;;11345:179::o;11529:258::-;11601:1;11611:113;11625:6;11622:1;11619:13;11611:113;;;11701:11;;;11695:18;11682:11;;;11675:39;11647:2;11640:10;11611:113;;;11742:6;11739:1;11736:13;11733:2;;;-1:-1:-1;;11777:1:1;11759:16;;11752:27;11582:205::o;11792:131::-;-1:-1:-1;;;;;11867:31:1;;11857:42;;11847:2;;11913:1;11910;11903:12;11928:118;12014:5;12007:13;12000:21;11993:5;11990:32;11980:2;;12036:1;12033;12026:12
Swarm Source
ipfs://dc6a73c46f6acedf2f08b4007aa432c595f75222a4e1e585fb1370269929be3e
Loading...
Loading
Loading...
Loading
OVERVIEW
Connects Alchemix USD (alUSD) in mStable's alUSD Feeder Pool to Alchemix's alUSD staking pool. This implementation can claim Alchemix's reward token ALCX.Loading...
Loading
[ 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.