Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Nominate New Own... | 18413628 | 774 days ago | IN | 0 ETH | 0.00156646 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
RewardsDistribution
Compiler Version
v0.5.16+commit.9c3226ce
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2023-10-23
*/
/*
____ __ __ __ _
/ __/__ __ ___ / /_ / / ___ / /_ (_)__ __
_\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
/___/
* Synthetix: RewardsDistribution.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/RewardsDistribution.sol
* Docs: https://docs.synthetix.io/contracts/RewardsDistribution
*
* Contract Dependencies:
* - IRewardsDistribution
* - Owned
* Libraries:
* - SafeDecimalMath
* - SafeMath
*
* MIT License
* ===========
*
* Copyright (c) 2023 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/
pragma solidity ^0.5.16;
// https://docs.synthetix.io/contracts/source/contracts/owned
contract Owned {
address public owner;
address public nominatedOwner;
constructor(address _owner) public {
require(_owner != address(0), "Owner address cannot be 0");
owner = _owner;
emit OwnerChanged(address(0), _owner);
}
function nominateNewOwner(address _owner) external onlyOwner {
nominatedOwner = _owner;
emit OwnerNominated(_owner);
}
function acceptOwnership() external {
require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
emit OwnerChanged(owner, nominatedOwner);
owner = nominatedOwner;
nominatedOwner = address(0);
}
modifier onlyOwner {
_onlyOwner();
_;
}
function _onlyOwner() private view {
require(msg.sender == owner, "Only the contract owner may perform this action");
}
event OwnerNominated(address newOwner);
event OwnerChanged(address oldOwner, address newOwner);
}
// https://docs.synthetix.io/contracts/source/interfaces/irewardsdistribution
interface IRewardsDistribution {
// Structs
struct DistributionData {
address destination;
uint amount;
}
// Views
function authority() external view returns (address);
function distributions(uint index) external view returns (address destination, uint amount); // DistributionData
function distributionsLength() external view returns (uint);
// Mutative Functions
function distributeRewards(uint amount) external returns (bool);
}
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
}
// Libraries
// https://docs.synthetix.io/contracts/source/libraries/safedecimalmath
library SafeDecimalMath {
using SafeMath for uint;
/* Number of decimal places in the representations. */
uint8 public constant decimals = 18;
uint8 public constant highPrecisionDecimals = 27;
/* The number representing 1.0. */
uint public constant UNIT = 10**uint(decimals);
/* The number representing 1.0 for higher fidelity numbers. */
uint public constant PRECISE_UNIT = 10**uint(highPrecisionDecimals);
uint private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint(highPrecisionDecimals - decimals);
/**
* @return Provides an interface to UNIT.
*/
function unit() external pure returns (uint) {
return UNIT;
}
/**
* @return Provides an interface to PRECISE_UNIT.
*/
function preciseUnit() external pure returns (uint) {
return PRECISE_UNIT;
}
/**
* @return The result of multiplying x and y, interpreting the operands as fixed-point
* decimals.
*
* @dev A unit factor is divided out after the product of x and y is evaluated,
* so that product must be less than 2**256. As this is an integer division,
* the internal division always rounds down. This helps save on gas. Rounding
* is more expensive on gas.
*/
function multiplyDecimal(uint x, uint y) internal pure returns (uint) {
/* Divide by UNIT to remove the extra factor introduced by the product. */
return x.mul(y) / UNIT;
}
/**
* @return The result of safely multiplying x and y, interpreting the operands
* as fixed-point decimals of the specified precision unit.
*
* @dev The operands should be in the form of a the specified unit factor which will be
* divided out after the product of x and y is evaluated, so that product must be
* less than 2**256.
*
* Unlike multiplyDecimal, this function rounds the result to the nearest increment.
* Rounding is useful when you need to retain fidelity for small decimal numbers
* (eg. small fractions or percentages).
*/
function _multiplyDecimalRound(
uint x,
uint y,
uint precisionUnit
) private pure returns (uint) {
/* Divide by UNIT to remove the extra factor introduced by the product. */
uint quotientTimesTen = x.mul(y) / (precisionUnit / 10);
if (quotientTimesTen % 10 >= 5) {
quotientTimesTen += 10;
}
return quotientTimesTen / 10;
}
/**
* @return The result of safely multiplying x and y, interpreting the operands
* as fixed-point decimals of a precise unit.
*
* @dev The operands should be in the precise unit factor which will be
* divided out after the product of x and y is evaluated, so that product must be
* less than 2**256.
*
* Unlike multiplyDecimal, this function rounds the result to the nearest increment.
* Rounding is useful when you need to retain fidelity for small decimal numbers
* (eg. small fractions or percentages).
*/
function multiplyDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) {
return _multiplyDecimalRound(x, y, PRECISE_UNIT);
}
/**
* @return The result of safely multiplying x and y, interpreting the operands
* as fixed-point decimals of a standard unit.
*
* @dev The operands should be in the standard unit factor which will be
* divided out after the product of x and y is evaluated, so that product must be
* less than 2**256.
*
* Unlike multiplyDecimal, this function rounds the result to the nearest increment.
* Rounding is useful when you need to retain fidelity for small decimal numbers
* (eg. small fractions or percentages).
*/
function multiplyDecimalRound(uint x, uint y) internal pure returns (uint) {
return _multiplyDecimalRound(x, y, UNIT);
}
/**
* @return The result of safely dividing x and y. The return value is a high
* precision decimal.
*
* @dev y is divided after the product of x and the standard precision unit
* is evaluated, so the product of x and UNIT must be less than 2**256. As
* this is an integer division, the result is always rounded down.
* This helps save on gas. Rounding is more expensive on gas.
*/
function divideDecimal(uint x, uint y) internal pure returns (uint) {
/* Reintroduce the UNIT factor that will be divided out by y. */
return x.mul(UNIT).div(y);
}
/**
* @return The result of safely dividing x and y. The return value is as a rounded
* decimal in the precision unit specified in the parameter.
*
* @dev y is divided after the product of x and the specified precision unit
* is evaluated, so the product of x and the specified precision unit must
* be less than 2**256. The result is rounded to the nearest increment.
*/
function _divideDecimalRound(
uint x,
uint y,
uint precisionUnit
) private pure returns (uint) {
uint resultTimesTen = x.mul(precisionUnit * 10).div(y);
if (resultTimesTen % 10 >= 5) {
resultTimesTen += 10;
}
return resultTimesTen / 10;
}
/**
* @return The result of safely dividing x and y. The return value is as a rounded
* standard precision decimal.
*
* @dev y is divided after the product of x and the standard precision unit
* is evaluated, so the product of x and the standard precision unit must
* be less than 2**256. The result is rounded to the nearest increment.
*/
function divideDecimalRound(uint x, uint y) internal pure returns (uint) {
return _divideDecimalRound(x, y, UNIT);
}
/**
* @return The result of safely dividing x and y. The return value is as a rounded
* high precision decimal.
*
* @dev y is divided after the product of x and the high precision unit
* is evaluated, so the product of x and the high precision unit must
* be less than 2**256. The result is rounded to the nearest increment.
*/
function divideDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) {
return _divideDecimalRound(x, y, PRECISE_UNIT);
}
/**
* @dev Convert a standard decimal representation to a high precision one.
*/
function decimalToPreciseDecimal(uint i) internal pure returns (uint) {
return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR);
}
/**
* @dev Convert a high precision decimal to a standard decimal representation.
*/
function preciseDecimalToDecimal(uint i) internal pure returns (uint) {
uint quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);
if (quotientTimesTen % 10 >= 5) {
quotientTimesTen += 10;
}
return quotientTimesTen / 10;
}
// Computes `a - b`, setting the value to 0 if b > a.
function floorsub(uint a, uint b) internal pure returns (uint) {
return b >= a ? 0 : a - b;
}
/* ---------- Utilities ---------- */
/*
* Absolute value of the input, returned as a signed number.
*/
function signedAbs(int x) internal pure returns (int) {
return x < 0 ? -x : x;
}
/*
* Absolute value of the input, returned as an unsigned number.
*/
function abs(int x) internal pure returns (uint) {
return uint(signedAbs(x));
}
}
// https://docs.synthetix.io/contracts/source/interfaces/ierc20
interface IERC20 {
// ERC20 Optional Views
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
// Views
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
// Mutative functions
function transfer(address to, uint value) external returns (bool);
function approve(address spender, uint value) external returns (bool);
function transferFrom(
address from,
address to,
uint value
) external returns (bool);
// Events
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
// https://docs.synthetix.io/contracts/source/interfaces/ifeepool
interface IFeePool {
// Views
// solhint-disable-next-line func-name-mixedcase
function FEE_ADDRESS() external view returns (address);
function feesAvailable(address account) external view returns (uint, uint);
function feesBurned(address account) external view returns (uint);
function feesToBurn(address account) external view returns (uint);
function feePeriodDuration() external view returns (uint);
function isFeesClaimable(address account) external view returns (bool);
function targetThreshold() external view returns (uint);
function totalFeesAvailable() external view returns (uint);
function totalFeesBurned() external view returns (uint);
function totalRewardsAvailable() external view returns (uint);
// Mutative Functions
function claimFees() external returns (bool);
function claimOnBehalf(address claimingForAddress) external returns (bool);
function closeCurrentFeePeriod() external;
function closeSecondary(uint snxBackedDebt, uint debtShareSupply) external;
function recordFeePaid(uint sUSDAmount) external;
function setRewardsToDistribute(uint amount) external;
}
// Inheritance
// Libraires
// Internal references
// https://docs.synthetix.io/contracts/source/contracts/rewardsdistribution
contract RewardsDistribution is Owned, IRewardsDistribution {
using SafeMath for uint;
using SafeDecimalMath for uint;
/**
* @notice Authorised address able to call distributeRewards
*/
address public authority;
/**
* @notice Address of the Synthetix ProxyERC20
*/
address public synthetixProxy;
/**
* @notice Address of the RewardEscrow contract
*/
address public rewardEscrow;
/**
* @notice Address of the FeePoolProxy
*/
address public feePoolProxy;
/**
* @notice An array of addresses and amounts to send
*/
DistributionData[] public distributions;
/**
* @dev _authority maybe the underlying synthetix contract.
* Remember to set the authority on a synthetix upgrade
*/
constructor(
address _owner,
address _authority,
address _synthetixProxy,
address _rewardEscrow,
address _feePoolProxy
) public Owned(_owner) {
authority = _authority;
synthetixProxy = _synthetixProxy;
rewardEscrow = _rewardEscrow;
feePoolProxy = _feePoolProxy;
}
// ========== EXTERNAL SETTERS ==========
function setSynthetixProxy(address _synthetixProxy) external onlyOwner {
synthetixProxy = _synthetixProxy;
}
function setRewardEscrow(address _rewardEscrow) external onlyOwner {
rewardEscrow = _rewardEscrow;
}
function setFeePoolProxy(address _feePoolProxy) external onlyOwner {
feePoolProxy = _feePoolProxy;
}
/**
* @notice Set the address of the contract authorised to call distributeRewards()
* @param _authority Address of the authorised calling contract.
*/
function setAuthority(address _authority) external onlyOwner {
authority = _authority;
}
// ========== EXTERNAL FUNCTIONS ==========
/**
* @notice Adds a Rewards DistributionData struct to the distributions
* array. Any entries here will be iterated and rewards distributed to
* each address when tokens are sent to this contract and distributeRewards()
* is called by the autority.
* @param destination An address to send rewards tokens too
* @param amount The amount of rewards tokens to send
*/
function addRewardDistribution(address destination, uint amount) external onlyOwner returns (bool) {
require(destination != address(0), "Cant add a zero address");
require(amount != 0, "Cant add a zero amount");
DistributionData memory rewardsDistribution = DistributionData(destination, amount);
distributions.push(rewardsDistribution);
emit RewardDistributionAdded(distributions.length - 1, destination, amount);
return true;
}
/**
* @notice Deletes a RewardDistribution from the distributions
* so it will no longer be included in the call to distributeRewards()
* @param index The index of the DistributionData to delete
*/
function removeRewardDistribution(uint index) external onlyOwner {
require(index <= distributions.length - 1, "index out of bounds");
// shift distributions indexes across
for (uint i = index; i < distributions.length - 1; i++) {
distributions[i] = distributions[i + 1];
}
distributions.length--;
// Since this function must shift all later entries down to fill the
// gap from the one it removed, it could in principle consume an
// unbounded amount of gas. However, the number of entries will
// presumably always be very low.
}
/**
* @notice Edits a RewardDistribution in the distributions array.
* @param index The index of the DistributionData to edit
* @param destination The destination address. Send the same address to keep or different address to change it.
* @param amount The amount of tokens to edit. Send the same number to keep or change the amount of tokens to send.
*/
function editRewardDistribution(
uint index,
address destination,
uint amount
) external onlyOwner returns (bool) {
require(index <= distributions.length - 1, "index out of bounds");
distributions[index].destination = destination;
distributions[index].amount = amount;
return true;
}
function distributeRewards(uint amount) external returns (bool) {
require(amount > 0, "Nothing to distribute");
require(msg.sender == authority, "Caller is not authorised");
require(rewardEscrow != address(0), "RewardEscrow is not set");
require(synthetixProxy != address(0), "SynthetixProxy is not set");
require(feePoolProxy != address(0), "FeePoolProxy is not set");
require(
IERC20(synthetixProxy).balanceOf(address(this)) >= amount,
"RewardsDistribution contract does not have enough tokens to distribute"
);
uint remainder = amount;
// Iterate the array of distributions sending the configured amounts
for (uint i = 0; i < distributions.length; i++) {
if (distributions[i].destination != address(0) && distributions[i].amount != 0) {
remainder = remainder.sub(distributions[i].amount);
// Transfer the SNX
IERC20(synthetixProxy).transfer(distributions[i].destination, distributions[i].amount);
// If the contract implements RewardsDistributionRecipient.sol, inform it how many SNX its received.
bytes memory payload = abi.encodeWithSignature("notifyRewardAmount(uint256)", distributions[i].amount);
// solhint-disable avoid-low-level-calls
(bool success, bytes memory result) = distributions[i].destination.call(payload);
if (!success) {
// if the error was emitted by the destination contract, bubble
uint len = result.length;
assembly {
revert(add(result, 0x20), len)
}
}
}
}
// After all ditributions have been sent, send the remainder to the RewardsEscrow contract
IERC20(synthetixProxy).transfer(rewardEscrow, remainder);
// Tell the FeePool how much it has to distribute to the stakers
IFeePool(feePoolProxy).setRewardsToDistribute(remainder);
emit RewardsDistributed(amount);
return true;
}
/* ========== VIEWS ========== */
/**
* @notice Retrieve the length of the distributions array
*/
function distributionsLength() external view returns (uint) {
return distributions.length;
}
/* ========== Events ========== */
event RewardDistributionAdded(uint index, address destination, uint amount);
event RewardsDistributed(uint amount);
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_authority","type":"address"},{"internalType":"address","name":"_synthetixProxy","type":"address"},{"internalType":"address","name":"_rewardEscrow","type":"address"},{"internalType":"address","name":"_feePoolProxy","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardDistributionAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsDistributed","type":"event"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addRewardDistribution","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"authority","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"distributeRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"distributions","outputs":[{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"distributionsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"editRewardDistribution","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feePoolProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"removeRewardDistribution","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardEscrow","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_authority","type":"address"}],"name":"setAuthority","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_feePoolProxy","type":"address"}],"name":"setFeePoolProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_rewardEscrow","type":"address"}],"name":"setRewardEscrow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_synthetixProxy","type":"address"}],"name":"setSynthetixProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"synthetixProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b506040516112af3803806112af833981810160405260a081101561003357600080fd5b50805160208201516040830151606084015160809094015192939192909190846001600160a01b0381166100ae576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150600280546001600160a01b039586166001600160a01b03199182161790915560038054948616948216949094179093556004805492851692841692909217909155600580549190931691161790555061114a806101656000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063817a6951116100a2578063bdd1248211610071578063bdd12482146102c5578063bf7e214f146102cd578063c9e9cc4d146102d5578063d8297e44146102dd578063e54c16711461030357610116565b8063817a6951146102725780638da5cb5b1461028f57806395896b7614610297578063a430be6c146102bd57610116565b806359974e38116100e957806359974e38146101c15780635de39934146101f257806360eb3ff21461021857806379ba5097146102445780637a9e5e4b1461024c57610116565b8063060ca2501461011b5780631627540c146101355780634487d3df1461015d57806353a47bb71461019d575b600080fd5b610123610335565b60408051918252519081900360200190f35b61015b6004803603602081101561014b57600080fd5b50356001600160a01b031661033c565b005b61017a6004803603602081101561017357600080fd5b5035610398565b604080516001600160a01b03909316835260208301919091528051918290030190f35b6101a56103cd565b604080516001600160a01b039092168252519081900360200190f35b6101de600480360360208110156101d757600080fd5b50356103dc565b604080519115158252519081900360200190f35b61015b6004803603602081101561020857600080fd5b50356001600160a01b0316610a43565b6101de6004803603604081101561022e57600080fd5b506001600160a01b038135169060200135610a6d565b61015b610c10565b61015b6004803603602081101561026257600080fd5b50356001600160a01b0316610ccc565b61015b6004803603602081101561028857600080fd5b5035610cf6565b6101a5610de1565b61015b600480360360208110156102ad57600080fd5b50356001600160a01b0316610df0565b6101a5610e1a565b6101a5610e29565b6101a5610e38565b6101a5610e47565b61015b600480360360208110156102f357600080fd5b50356001600160a01b0316610e56565b6101de6004803603606081101561031957600080fd5b508035906001600160a01b036020820135169060400135610e80565b6006545b90565b610344610f4c565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b600681815481106103a557fe5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b6001546001600160a01b031681565b600080821161042a576040805162461bcd60e51b81526020600482015260156024820152744e6f7468696e6720746f206469737472696275746560581b604482015290519081900360640190fd5b6002546001600160a01b03163314610489576040805162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420617574686f72697365640000000000000000604482015290519081900360640190fd5b6004546001600160a01b03166104e6576040805162461bcd60e51b815260206004820152601760248201527f526577617264457363726f77206973206e6f7420736574000000000000000000604482015290519081900360640190fd5b6003546001600160a01b0316610543576040805162461bcd60e51b815260206004820152601960248201527f53796e74686574697850726f7879206973206e6f742073657400000000000000604482015290519081900360640190fd5b6005546001600160a01b03166105a0576040805162461bcd60e51b815260206004820152601760248201527f466565506f6f6c50726f7879206973206e6f7420736574000000000000000000604482015290519081900360640190fd5b600354604080516370a0823160e01b8152306004820152905184926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156105ea57600080fd5b505afa1580156105fe573d6000803e3d6000fd5b505050506040513d602081101561061457600080fd5b505110156106535760405162461bcd60e51b81526004018080602001828103825260468152602001806110a16046913960600191505060405180910390fd5b8160005b60065481101561091a5760006001600160a01b03166006828154811061067957fe5b60009182526020909120600290910201546001600160a01b0316148015906106c05750600681815481106106a957fe5b906000526020600020906002020160010154600014155b15610912576106f6600682815481106106d557fe5b90600052602060002090600202016001015483610f9790919063ffffffff16565b600354600680549294506001600160a01b039091169163a9059cbb91908490811061071d57fe5b6000918252602090912060029091020154600680546001600160a01b03909216918590811061074857fe5b9060005260206000209060020201600101546040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156107a957600080fd5b505af11580156107bd573d6000803e3d6000fd5b505050506040513d60208110156107d357600080fd5b50506006805460609190839081106107e757fe5b60009182526020808320600160029093020191909101546040805160248082019390935281518082039093018352604401905290810180516001600160e01b0316633c6b16ab60e01b179052600680549193506060918590811061084757fe5b60009182526020918290206002909102015460405185516001600160a01b0390921692869282918401908083835b602083106108945780518252601f199092019160209182019101610875565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146108f6576040519150601f19603f3d011682016040523d82523d6000602084013e6108fb565b606091505b50915091508161090e5780518060208301fd5b5050505b600101610657565b50600354600480546040805163a9059cbb60e01b81526001600160a01b0392831693810193909352602483018590525192169163a9059cbb916044808201926020929091908290030181600087803b15801561097557600080fd5b505af1158015610989573d6000803e3d6000fd5b505050506040513d602081101561099f57600080fd5b50506005546040805163fd1f498d60e01b81526004810184905290516001600160a01b039092169163fd1f498d9160248082019260009290919082900301818387803b1580156109ee57600080fd5b505af1158015610a02573d6000803e3d6000fd5b50506040805186815290517f6d1c76d614228b523baa4dcd9539e2c713b54ff4ab3ff2d1627e7f6cd32be4429350908190036020019150a150600192915050565b610a4b610f4c565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000610a77610f4c565b6001600160a01b038316610ad2576040805162461bcd60e51b815260206004820152601760248201527f43616e74206164642061207a65726f2061646472657373000000000000000000604482015290519081900360640190fd5b81610b1d576040805162461bcd60e51b815260206004820152601660248201527510d85b9d081859190818481e995c9bc8185b5bdd5b9d60521b604482015290519081900360640190fd5b610b25610ff4565b506040805180820182526001600160a01b03858116808352602080840187815260068054600181018255600082905286517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f600290920291820180546001600160a01b031916919097161790955590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40909401939093559154845160001991909101815291820152808301859052915190917f08fff3cb767a84a8039ea0f84053799c5cdca0e8efb031eeb6b05b9c174aa208916060918190039190910190a15060019392505050565b6001546001600160a01b03163314610c595760405162461bcd60e51b815260040180806020018281038252603581526020018061106c6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b610cd4610f4c565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b610cfe610f4c565b60065460001901811115610d4f576040805162461bcd60e51b8152602060048201526013602482015272696e646578206f7574206f6620626f756e647360681b604482015290519081900360640190fd5b805b60065460001901811015610dc95760068160010181548110610d6f57fe5b906000526020600020906002020160068281548110610d8a57fe5b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b039092169190911781556001918201549082015501610d51565b506006805490610ddd90600019830161100b565b5050565b6000546001600160a01b031681565b610df8610f4c565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b6003546001600160a01b031681565b6002546001600160a01b031681565b6005546001600160a01b031681565b610e5e610f4c565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000610e8a610f4c565b60065460001901841115610edb576040805162461bcd60e51b8152602060048201526013602482015272696e646578206f7574206f6620626f756e647360681b604482015290519081900360640190fd5b8260068581548110610ee957fe5b906000526020600020906002020160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160068581548110610f2c57fe5b906000526020600020906002020160010181905550600190509392505050565b6000546001600160a01b03163314610f955760405162461bcd60e51b815260040180806020018281038252602f8152602001806110e7602f913960400191505060405180910390fd5b565b600082821115610fee576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080518082019091526000808252602082015290565b81548183558181111561103757600202816002028360005260206000209182019101611037919061103c565b505050565b61033991905b808211156110675780546001600160a01b031916815560006001820155600201611042565b509056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e65727368697052657761726473446973747269627574696f6e20636f6e747261637420646f6573206e6f74206861766520656e6f75676820746f6b656e7320746f20646973747269627574654f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a72315820b2185e5d0818c5f13b08ecd03e107749f8fe6a7e3fe2f86098180500dcbc252d64736f6c63430005100032000000000000000000000000ede8a407913a874dd7e3d5b731afca135d30375e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac86855865cbf31c8f9fbb68c749ad5bd72802e3000000000000000000000000b440dd674e1243644791a4adfe3a2abb0a92d309
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063817a6951116100a2578063bdd1248211610071578063bdd12482146102c5578063bf7e214f146102cd578063c9e9cc4d146102d5578063d8297e44146102dd578063e54c16711461030357610116565b8063817a6951146102725780638da5cb5b1461028f57806395896b7614610297578063a430be6c146102bd57610116565b806359974e38116100e957806359974e38146101c15780635de39934146101f257806360eb3ff21461021857806379ba5097146102445780637a9e5e4b1461024c57610116565b8063060ca2501461011b5780631627540c146101355780634487d3df1461015d57806353a47bb71461019d575b600080fd5b610123610335565b60408051918252519081900360200190f35b61015b6004803603602081101561014b57600080fd5b50356001600160a01b031661033c565b005b61017a6004803603602081101561017357600080fd5b5035610398565b604080516001600160a01b03909316835260208301919091528051918290030190f35b6101a56103cd565b604080516001600160a01b039092168252519081900360200190f35b6101de600480360360208110156101d757600080fd5b50356103dc565b604080519115158252519081900360200190f35b61015b6004803603602081101561020857600080fd5b50356001600160a01b0316610a43565b6101de6004803603604081101561022e57600080fd5b506001600160a01b038135169060200135610a6d565b61015b610c10565b61015b6004803603602081101561026257600080fd5b50356001600160a01b0316610ccc565b61015b6004803603602081101561028857600080fd5b5035610cf6565b6101a5610de1565b61015b600480360360208110156102ad57600080fd5b50356001600160a01b0316610df0565b6101a5610e1a565b6101a5610e29565b6101a5610e38565b6101a5610e47565b61015b600480360360208110156102f357600080fd5b50356001600160a01b0316610e56565b6101de6004803603606081101561031957600080fd5b508035906001600160a01b036020820135169060400135610e80565b6006545b90565b610344610f4c565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b600681815481106103a557fe5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b6001546001600160a01b031681565b600080821161042a576040805162461bcd60e51b81526020600482015260156024820152744e6f7468696e6720746f206469737472696275746560581b604482015290519081900360640190fd5b6002546001600160a01b03163314610489576040805162461bcd60e51b815260206004820152601860248201527f43616c6c6572206973206e6f7420617574686f72697365640000000000000000604482015290519081900360640190fd5b6004546001600160a01b03166104e6576040805162461bcd60e51b815260206004820152601760248201527f526577617264457363726f77206973206e6f7420736574000000000000000000604482015290519081900360640190fd5b6003546001600160a01b0316610543576040805162461bcd60e51b815260206004820152601960248201527f53796e74686574697850726f7879206973206e6f742073657400000000000000604482015290519081900360640190fd5b6005546001600160a01b03166105a0576040805162461bcd60e51b815260206004820152601760248201527f466565506f6f6c50726f7879206973206e6f7420736574000000000000000000604482015290519081900360640190fd5b600354604080516370a0823160e01b8152306004820152905184926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156105ea57600080fd5b505afa1580156105fe573d6000803e3d6000fd5b505050506040513d602081101561061457600080fd5b505110156106535760405162461bcd60e51b81526004018080602001828103825260468152602001806110a16046913960600191505060405180910390fd5b8160005b60065481101561091a5760006001600160a01b03166006828154811061067957fe5b60009182526020909120600290910201546001600160a01b0316148015906106c05750600681815481106106a957fe5b906000526020600020906002020160010154600014155b15610912576106f6600682815481106106d557fe5b90600052602060002090600202016001015483610f9790919063ffffffff16565b600354600680549294506001600160a01b039091169163a9059cbb91908490811061071d57fe5b6000918252602090912060029091020154600680546001600160a01b03909216918590811061074857fe5b9060005260206000209060020201600101546040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156107a957600080fd5b505af11580156107bd573d6000803e3d6000fd5b505050506040513d60208110156107d357600080fd5b50506006805460609190839081106107e757fe5b60009182526020808320600160029093020191909101546040805160248082019390935281518082039093018352604401905290810180516001600160e01b0316633c6b16ab60e01b179052600680549193506060918590811061084757fe5b60009182526020918290206002909102015460405185516001600160a01b0390921692869282918401908083835b602083106108945780518252601f199092019160209182019101610875565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146108f6576040519150601f19603f3d011682016040523d82523d6000602084013e6108fb565b606091505b50915091508161090e5780518060208301fd5b5050505b600101610657565b50600354600480546040805163a9059cbb60e01b81526001600160a01b0392831693810193909352602483018590525192169163a9059cbb916044808201926020929091908290030181600087803b15801561097557600080fd5b505af1158015610989573d6000803e3d6000fd5b505050506040513d602081101561099f57600080fd5b50506005546040805163fd1f498d60e01b81526004810184905290516001600160a01b039092169163fd1f498d9160248082019260009290919082900301818387803b1580156109ee57600080fd5b505af1158015610a02573d6000803e3d6000fd5b50506040805186815290517f6d1c76d614228b523baa4dcd9539e2c713b54ff4ab3ff2d1627e7f6cd32be4429350908190036020019150a150600192915050565b610a4b610f4c565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000610a77610f4c565b6001600160a01b038316610ad2576040805162461bcd60e51b815260206004820152601760248201527f43616e74206164642061207a65726f2061646472657373000000000000000000604482015290519081900360640190fd5b81610b1d576040805162461bcd60e51b815260206004820152601660248201527510d85b9d081859190818481e995c9bc8185b5bdd5b9d60521b604482015290519081900360640190fd5b610b25610ff4565b506040805180820182526001600160a01b03858116808352602080840187815260068054600181018255600082905286517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f600290920291820180546001600160a01b031916919097161790955590517ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d40909401939093559154845160001991909101815291820152808301859052915190917f08fff3cb767a84a8039ea0f84053799c5cdca0e8efb031eeb6b05b9c174aa208916060918190039190910190a15060019392505050565b6001546001600160a01b03163314610c595760405162461bcd60e51b815260040180806020018281038252603581526020018061106c6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b610cd4610f4c565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b610cfe610f4c565b60065460001901811115610d4f576040805162461bcd60e51b8152602060048201526013602482015272696e646578206f7574206f6620626f756e647360681b604482015290519081900360640190fd5b805b60065460001901811015610dc95760068160010181548110610d6f57fe5b906000526020600020906002020160068281548110610d8a57fe5b60009182526020909120825460029092020180546001600160a01b0319166001600160a01b039092169190911781556001918201549082015501610d51565b506006805490610ddd90600019830161100b565b5050565b6000546001600160a01b031681565b610df8610f4c565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b6003546001600160a01b031681565b6002546001600160a01b031681565b6005546001600160a01b031681565b610e5e610f4c565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000610e8a610f4c565b60065460001901841115610edb576040805162461bcd60e51b8152602060048201526013602482015272696e646578206f7574206f6620626f756e647360681b604482015290519081900360640190fd5b8260068581548110610ee957fe5b906000526020600020906002020160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508160068581548110610f2c57fe5b906000526020600020906002020160010181905550600190509392505050565b6000546001600160a01b03163314610f955760405162461bcd60e51b815260040180806020018281038252602f8152602001806110e7602f913960400191505060405180910390fd5b565b600082821115610fee576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080518082019091526000808252602082015290565b81548183558181111561103757600202816002028360005260206000209182019101611037919061103c565b505050565b61033991905b808211156110675780546001600160a01b031916815560006001820155600201611042565b509056fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e65727368697052657761726473446973747269627574696f6e20636f6e747261637420646f6573206e6f74206861766520656e6f75676820746f6b656e7320746f20646973747269627574654f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a72315820b2185e5d0818c5f13b08ecd03e107749f8fe6a7e3fe2f86098180500dcbc252d64736f6c63430005100032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ede8a407913a874dd7e3d5b731afca135d30375e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac86855865cbf31c8f9fbb68c749ad5bd72802e3000000000000000000000000b440dd674e1243644791a4adfe3a2abb0a92d309
-----Decoded View---------------
Arg [0] : _owner (address): 0xEde8a407913A874Dd7e3d5B731AFcA135D30375E
Arg [1] : _authority (address): 0x0000000000000000000000000000000000000000
Arg [2] : _synthetixProxy (address): 0x0000000000000000000000000000000000000000
Arg [3] : _rewardEscrow (address): 0xAc86855865CbF31c8f9FBB68C749AD5Bd72802e3
Arg [4] : _feePoolProxy (address): 0xb440DD674e1243644791a4AdfE3A2AbB0A92d309
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000ede8a407913a874dd7e3d5b731afca135d30375e
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 000000000000000000000000ac86855865cbf31c8f9fbb68c749ad5bd72802e3
Arg [4] : 000000000000000000000000b440dd674e1243644791a4adfe3a2abb0a92d309
Libraries Used
SafeDecimalMath : 0x84d626b2bb4d0f064067e4bf80fce7055d8f3e7bSystemSettingsLib : 0x4a39aef2281ac0d192a9c4783604833ba8f31174SignedSafeDecimalMath : 0x728a2b79cad691531cc1146ef802617ff50c7095ExchangeSettlementLib : 0xaa5a3d7f04e15b22eb3664b56310aa18a3527ec7
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.