More Info
Private Name Tags
ContractCreator
Multi Chain
Multichain Addresses
1 address found via BlockscanLatest 25 from a total of 220 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Arb Synth Rate | 11325791 | 852 days 4 hrs ago | IN | 0.006 ETH | 0.00119847 | ||||
Arb Synth Rate | 11325785 | 852 days 4 hrs ago | IN | 0.006 ETH | 0.00119847 | ||||
Arb Synth Rate | 9834790 | 1082 days 10 hrs ago | IN | 0.001 ETH | 0.00028768 | ||||
Nominate New Own... | 9595340 | 1119 days 8 hrs ago | IN | 0 ETH | 0.00008927 | ||||
Recover ERC20 | 9519700 | 1130 days 23 hrs ago | IN | 0 ETH | 0.00050981 | ||||
Set Exchange Rat... | 9519397 | 1131 days 52 mins ago | IN | 0 ETH | 0.00020122 | ||||
Arb Synth Rate | 9446501 | 1142 days 5 hrs ago | IN | 0.1 ETH | 0.00003436 | ||||
Arb Synth Rate | 9446428 | 1142 days 6 hrs ago | IN | 0.1 ETH | 0.00003436 | ||||
Is Arbable | 9446317 | 1142 days 6 hrs ago | IN | 0 ETH | 0.00008957 | ||||
Arb Synth Rate | 9442509 | 1142 days 20 hrs ago | IN | 0.01 ETH | 0.00020619 | ||||
Is Arbable | 9442455 | 1142 days 20 hrs ago | IN | 0 ETH | 0.00024567 | ||||
Is Arbable | 9428015 | 1145 days 2 hrs ago | IN | 0 ETH | 0.00028077 | ||||
Is Arbable | 9424643 | 1145 days 14 hrs ago | IN | 0 ETH | 0.00010529 | ||||
Set Paused | 9334920 | 1159 days 9 hrs ago | IN | 0 ETH | 0.00052784 | ||||
Arb Synth Rate | 9289259 | 1166 days 9 hrs ago | IN | 5.68247067 ETH | 0.00144765 | ||||
Arb Synth Rate | 9289258 | 1166 days 9 hrs ago | IN | 290 ETH | 0.00142792 | ||||
Arb Synth Rate | 9289247 | 1166 days 9 hrs ago | IN | 15 ETH | 0.00027828 | ||||
Transfer | 9228073 | 1175 days 18 hrs ago | IN | 0.001 ETH | 0.00004209 | ||||
Arb Synth Rate | 9203085 | 1179 days 13 hrs ago | IN | 1 ETH | 0.00020946 | ||||
Arb Synth Rate | 9199818 | 1180 days 3 hrs ago | IN | 1.89 ETH | 0.00027828 | ||||
Arb Synth Rate | 9199479 | 1180 days 4 hrs ago | IN | 60 ETH | 0.00023798 | ||||
Arb Synth Rate | 9199467 | 1180 days 4 hrs ago | IN | 400 ETH | 0.00023798 | ||||
Arb Synth Rate | 9198450 | 1180 days 9 hrs ago | IN | 2.5 ETH | 0.00025298 | ||||
Arb Synth Rate | 9198378 | 1180 days 10 hrs ago | IN | 5.62942312 ETH | 0.00026178 | ||||
Arb Synth Rate | 9198330 | 1180 days 10 hrs ago | IN | 15 ETH | 0.00027828 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Txn Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
9307032 | 1163 days 15 hrs ago | 31.00263551 ETH | ||||
9307032 | 1163 days 15 hrs ago | 31.00263551 ETH | ||||
9289313 | 1166 days 8 hrs ago | 2.34899045 ETH | ||||
9289313 | 1166 days 8 hrs ago | 2.34899045 ETH | ||||
9289259 | 1166 days 9 hrs ago | 5.68247067 ETH | ||||
9289258 | 1166 days 9 hrs ago | 290 ETH | ||||
9289247 | 1166 days 9 hrs ago | 15 ETH | ||||
9289240 | 1166 days 9 hrs ago | 8.08622686 ETH | ||||
9289240 | 1166 days 9 hrs ago | 8.08622686 ETH | ||||
9289237 | 1166 days 9 hrs ago | 8.03453824 ETH | ||||
9289237 | 1166 days 9 hrs ago | 8.03453824 ETH | ||||
9289237 | 1166 days 9 hrs ago | 8.05839371 ETH | ||||
9289237 | 1166 days 9 hrs ago | 8.05839371 ETH | ||||
9289237 | 1166 days 9 hrs ago | 8.07939829 ETH | ||||
9289237 | 1166 days 9 hrs ago | 8.07939829 ETH | ||||
9289237 | 1166 days 9 hrs ago | 6.94068448 ETH | ||||
9289237 | 1166 days 9 hrs ago | 6.94068448 ETH | ||||
9289159 | 1166 days 9 hrs ago | 6.95842189 ETH | ||||
9289159 | 1166 days 9 hrs ago | 6.99416467 ETH | ||||
9289159 | 1166 days 9 hrs ago | 10.1272219 ETH | ||||
9289159 | 1166 days 9 hrs ago | 20.8754136 ETH | ||||
9289159 | 1166 days 9 hrs ago | 31.00263551 ETH | ||||
9289153 | 1166 days 9 hrs ago | 6.99416467 ETH | ||||
9289153 | 1166 days 9 hrs ago | 6.99416467 ETH | ||||
9289153 | 1166 days 9 hrs ago | 7.01217311 ETH |
Loading...
Loading
Contract Name:
ArbRewarder
Compiler Version
v0.4.25+commit.59dbf8f1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-10-01 */ /* =============================================== * Flattened with Solidifier by Coinage * * https://solidifier.coina.ge * =============================================== */ /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: Owned.sol version: 1.1 author: Anton Jurisevic Dominic Romanowski date: 2018-2-26 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- An Owned contract, to be inherited by other contracts. Requires its owner to be explicitly set in the constructor. Provides an onlyOwner access modifier. To change owner, the current owner must nominate the next owner, who then has to accept the nomination. The nomination can be cancelled before it is accepted by the new owner by having the previous owner change the nomination (setting it to 0). ----------------------------------------------------------------- */ pragma solidity 0.4.25; /** * @title A contract with an owner. * @notice Contract ownership can be transferred by first nominating the new owner, * who must then accept the ownership, which prevents accidental incorrect ownership transfers. */ contract Owned { address public owner; address public nominatedOwner; /** * @dev Owned Constructor */ constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } /** * @notice Nominate a new owner of this contract. * @dev Only the current owner may nominate a new owner. */ function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } /** * @notice Accept the nomination to be 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 { require(msg.sender == owner, "Only the contract owner may perform this action"); _; } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: SelfDestructible.sol version: 1.2 author: Anton Jurisevic date: 2018-05-29 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- This contract allows an inheriting contract to be destroyed after its owner indicates an intention and then waits for a period without changing their mind. All ether contained in the contract is forwarded to a nominated beneficiary upon destruction. ----------------------------------------------------------------- */ /** * @title A contract that can be destroyed by its owner after a delay elapses. */ contract SelfDestructible is Owned { uint public initiationTime; bool public selfDestructInitiated; address public selfDestructBeneficiary; uint public constant SELFDESTRUCT_DELAY = 4 weeks; /** * @dev Constructor * @param _owner The account which controls this contract. */ constructor(address _owner) Owned(_owner) public { require(_owner != address(0), "Owner must not be zero"); selfDestructBeneficiary = _owner; emit SelfDestructBeneficiaryUpdated(_owner); } /** * @notice Set the beneficiary address of this contract. * @dev Only the contract owner may call this. The provided beneficiary must be non-null. * @param _beneficiary The address to pay any eth contained in this contract to upon self-destruction. */ function setSelfDestructBeneficiary(address _beneficiary) external onlyOwner { require(_beneficiary != address(0), "Beneficiary must not be zero"); selfDestructBeneficiary = _beneficiary; emit SelfDestructBeneficiaryUpdated(_beneficiary); } /** * @notice Begin the self-destruction counter of this contract. * Once the delay has elapsed, the contract may be self-destructed. * @dev Only the contract owner may call this. */ function initiateSelfDestruct() external onlyOwner { initiationTime = now; selfDestructInitiated = true; emit SelfDestructInitiated(SELFDESTRUCT_DELAY); } /** * @notice Terminate and reset the self-destruction timer. * @dev Only the contract owner may call this. */ function terminateSelfDestruct() external onlyOwner { initiationTime = 0; selfDestructInitiated = false; emit SelfDestructTerminated(); } /** * @notice If the self-destruction delay has elapsed, destroy this contract and * remit any ether it owns to the beneficiary address. * @dev Only the contract owner may call this. */ function selfDestruct() external onlyOwner { require(selfDestructInitiated, "Self Destruct not yet initiated"); require(initiationTime + SELFDESTRUCT_DELAY < now, "Self destruct delay not met"); address beneficiary = selfDestructBeneficiary; emit SelfDestructed(beneficiary); selfdestruct(beneficiary); } event SelfDestructTerminated(); event SelfDestructed(address beneficiary); event SelfDestructInitiated(uint selfDestructDelay); event SelfDestructBeneficiaryUpdated(address newBeneficiary); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: Pausable.sol version: 1.0 author: Kevin Brown date: 2018-05-22 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- This contract allows an inheriting contract to be marked as paused. It also defines a modifier which can be used by the inheriting contract to prevent actions while paused. ----------------------------------------------------------------- */ /** * @title A contract that can be paused by its owner */ contract Pausable is Owned { uint public lastPauseTime; bool public paused; /** * @dev Constructor * @param _owner The account which controls this contract. */ constructor(address _owner) Owned(_owner) public { // Paused will be false, and lastPauseTime will be 0 upon initialisation } /** * @notice Change the paused state of the contract * @dev Only the contract owner may call this. */ function setPaused(bool _paused) external onlyOwner { // Ensure we're actually changing the state before we do anything if (_paused == paused) { return; } // Set our paused state. paused = _paused; // If applicable, set the last pause time. if (paused) { lastPauseTime = now; } // Let everyone know that our pause state has changed. emit PauseChanged(paused); } event PauseChanged(bool isPaused); modifier notPaused { require(!paused, "This action cannot be performed while the contract is paused"); _; } } /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on 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); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: SafeDecimalMath.sol version: 2.0 author: Kevin Brown Gavin Conway date: 2018-10-18 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- A library providing safe mathematical operations for division and multiplication with the capability to round or truncate the results to the nearest increment. Operations can return a standard precision or high precision decimal. High precision decimals are useful for example when attempting to calculate percentages or fractions accurately. ----------------------------------------------------------------- */ /** * @title Safely manipulate unsigned fixed-point decimals at a given precision level. * @dev Functions accepting uints in this contract and derived contracts * are taken to be such fixed point decimals of a specified precision (either standard * or high). */ 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; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract IERC20 { function totalSupply() public view returns (uint); function balanceOf(address owner) public view returns (uint); function allowance(address owner, address spender) public view returns (uint); function transfer(address to, uint value) public returns (bool); function approve(address spender, uint value) public returns (bool); function transferFrom(address from, address to, uint value) public returns (bool); // ERC20 Optional function name() public view returns (string); function symbol() public view returns (string); function decimals() public view returns (uint8); event Transfer( address indexed from, address indexed to, uint value ); event Approval( address indexed owner, address indexed spender, uint value ); } /** * @title ExchangeRates interface */ interface IExchangeRates { function effectiveValue(bytes32 sourceCurrencyKey, uint sourceAmount, bytes32 destinationCurrencyKey) external view returns (uint); function rateForCurrency(bytes32 currencyKey) external view returns (uint); function ratesForCurrencies(bytes32[] currencyKeys) external view returns (uint[] memory); function rateIsStale(bytes32 currencyKey) external view returns (bool); function anyRateIsStale(bytes32[] currencyKeys) external view returns (bool); } /* ----------------------------------------------------------------- FILE INFORMATION ----------------------------------------------------------------- file: ArbRewarder.sol version: 1.0 author: justwanttoknowathing checked: Clinton Ennis, Jackson Chan date: 2019-05-01 ----------------------------------------------------------------- MODULE DESCRIPTION ----------------------------------------------------------------- The Synthetix ArbRewarder Contract for fixing the sETH/ETH peg Allows a user to send ETH to the contract via arbSynthRate() - If the sETH/ETH ratio is below 99/100 & there is sufficient SNX remaining in the contract at the current exchange rate. - Convert the ETH to sETH via Uniswap up to the 99/100 ratio or the ETH is exhausted - Convert the sETH to SNX at the current exchange rate. - Send the SNX to the wallet that sent the ETH ----------------------------------------------------------------- */ contract ArbRewarder is SelfDestructible, Pausable { using SafeMath for uint; using SafeDecimalMath for uint; /* How far off the peg the pool must be to allow its ratio to be pushed up or down * by this contract, thus granting the caller arbitrage rewards. * Parts-per-hundred-thousand: 100 = 1% */ uint off_peg_min = 100; /* Additional slippage we'll allow on top of the uniswap trade * Parts-per-hundred-thousand: 100 = 1% * Example: 95 sETH, 100 ETH, buy 1 sETH -> expected: 1.03857 ETH * After acceptable_slippage: 1.02818 ETH */ uint acceptable_slippage = 100; /* How long we'll let a uniswap transaction sit before it becomes invalid * In seconds. Prevents miners holding our transaction and using it later. */ uint max_delay = 600; /* Divisor for off_peg_min and acceptable_slippage */ uint constant divisor = 10000; /* Contract Addresses */ address public uniswapAddress = 0xe9Cf7887b93150D4F2Da7dFc6D502B216438F244; address public synthetixProxy = 0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F; IExchangeRates public exchangeRates = IExchangeRates(0x70C629875daDBE702489a5E1E3bAaE60e38924fa); IUniswapExchange public uniswapExchange = IUniswapExchange(uniswapAddress); IERC20 public synth = IERC20(0x5e74C9036fb86BD7eCdcb084a0673EFc32eA31cb); IERC20 public synthetix = IERC20(synthetixProxy); /* ========== CONSTRUCTOR ========== */ /** * @dev Constructor */ constructor(address _owner) /* Owned is initialised in SelfDestructible */ SelfDestructible(_owner) Pausable(_owner) public {} /* ========== SETTERS ========== */ function setParams(uint _acceptable_slippage, uint _max_delay, uint _off_peg_min) external onlyOwner { require(_off_peg_min < divisor, "_off_peg_min less than divisor"); require(_acceptable_slippage < divisor, "_acceptable_slippage less than divisor"); acceptable_slippage = _acceptable_slippage; max_delay = _max_delay; off_peg_min = _off_peg_min; } function setSynthetix(address _address) external onlyOwner { synthetixProxy = _address; synthetix = IERC20(synthetixProxy); } function setSynthAddress(address _synthAddress) external onlyOwner { synth = IERC20(_synthAddress); synth.approve(uniswapAddress, uint(-1)); } function setUniswapExchange(address _uniswapAddress) external onlyOwner { uniswapAddress = _uniswapAddress; uniswapExchange = IUniswapExchange(uniswapAddress); synth.approve(uniswapAddress, uint(-1)); } function setExchangeRates(address _exchangeRatesAddress) external onlyOwner { exchangeRates = IExchangeRates(_exchangeRatesAddress); } /* ========== OWNER ONLY ========== */ function recoverETH(address to_addr) external onlyOwner { to_addr.transfer(address(this).balance); } function recoverERC20(address erc20_addr, address to_addr) external onlyOwner { IERC20 erc20_interface = IERC20(erc20_addr); erc20_interface.transfer(to_addr, erc20_interface.balanceOf(address(this))); } /* ========== PUBLIC FUNCTIONS ========== */ /** * Here the caller gives us some ETH. We convert the ETH->sETH and reward the caller with SNX worth * the value of the sETH received from the earlier swap. */ function arbSynthRate() public payable rateNotStale("ETH") rateNotStale("SNX") notPaused returns (uint reward_tokens) { /* Ensure there is enough more sETH than ETH in the Uniswap pool */ uint seth_in_uniswap = synth.balanceOf(uniswapAddress); uint eth_in_uniswap = uniswapAddress.balance; require(eth_in_uniswap.divideDecimal(seth_in_uniswap) < uint(divisor-off_peg_min).divideDecimal(divisor), "sETH/ETH ratio is too high"); /* Get maximum ETH we'll convert for caller */ uint max_eth_to_convert = maxConvert(eth_in_uniswap, seth_in_uniswap, divisor, divisor-off_peg_min); uint eth_to_convert = min(msg.value, max_eth_to_convert); uint unspent_input = msg.value - eth_to_convert; /* Actually swap ETH for sETH */ uint min_seth_bought = expectedOutput(uniswapExchange, eth_to_convert); uint tokens_bought = uniswapExchange.ethToTokenSwapInput.value(eth_to_convert)(min_seth_bought, now + max_delay); /* Reward caller */ reward_tokens = rewardCaller(tokens_bought, unspent_input); } function isArbable() public returns (bool) { uint seth_in_uniswap = synth.balanceOf(uniswapAddress); uint eth_in_uniswap = uniswapAddress.balance; return eth_in_uniswap.divideDecimal(seth_in_uniswap) < uint(divisor-off_peg_min).divideDecimal(divisor); } /* ========== PRIVATE FUNCTIONS ========== */ function rewardCaller(uint bought, uint unspent_input) private returns (uint reward_tokens) { uint snx_rate = exchangeRates.rateForCurrency("SNX"); uint eth_rate = exchangeRates.rateForCurrency("ETH"); reward_tokens = eth_rate.multiplyDecimal(bought).divideDecimal(snx_rate); synthetix.transfer(msg.sender, reward_tokens); if(unspent_input > 0) { msg.sender.transfer(unspent_input); } } function expectedOutput(IUniswapExchange exchange, uint input) private view returns (uint output) { output = exchange.getTokenToEthInputPrice(input); output = applySlippage(output); } function applySlippage(uint input) private view returns (uint output) { output = input - (input * (acceptable_slippage / divisor)); } /** * maxConvert determines how many tokens need to be swapped to bring a market to a n:d ratio * This can be derived by solving a system of equations. * * First, we know that once we're done balanceA and balanceB should be related by our ratio: * * n * (A + input) = d * (B - output) * * From Uniswap's code, we also know how input and output are related: * * output = (997*input*B) / (1000*A + 997*input) * * So: * * n * (A + input) = d * (B - ((997*input*B) / (1000*A + 997*input))) * * Solving for input (given n>d>0 and B>A>0): * * input = (sqrt((A * (9*A*n + 3988000*B*d)) / n) - 1997*A) / 1994 */ function maxConvert(uint a, uint b, uint n, uint d) private pure returns (uint result) { result = (sqrt((a * (9*a*n + 3988000*b*d)) / n) - 1997*a) / 1994; } function sqrt(uint x) private pure returns (uint y) { uint z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } function min(uint a, uint b) private pure returns (uint result) { result = a > b ? b : a; } /* ========== MODIFIERS ========== */ modifier rateNotStale(bytes32 currencyKey) { require(!exchangeRates.rateIsStale(currencyKey), "Rate stale or not a synth"); _; } } contract IUniswapExchange { // Address of ERC20 token sold on this exchange function tokenAddress() external view returns (address token); // Address of Uniswap Factory function factoryAddress() external view returns (address factory); // Provide Liquidity function addLiquidity(uint256 min_liquidity, uint256 max_tokens, uint256 deadline) external payable returns (uint256); function removeLiquidity(uint256 amount, uint256 min_eth, uint256 min_tokens, uint256 deadline) external returns (uint256, uint256); // Get Prices function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256 tokens_bought); function getEthToTokenOutputPrice(uint256 tokens_bought) external view returns (uint256 eth_sold); function getTokenToEthInputPrice(uint256 tokens_sold) external view returns (uint256 eth_bought); function getTokenToEthOutputPrice(uint256 eth_bought) external view returns (uint256 tokens_sold); // Trade ETH to ERC20 function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256 tokens_bought); function ethToTokenTransferInput(uint256 min_tokens, uint256 deadline, address recipient) external payable returns (uint256 tokens_bought); function ethToTokenSwapOutput(uint256 tokens_bought, uint256 deadline) external payable returns (uint256 eth_sold); function ethToTokenTransferOutput(uint256 tokens_bought, uint256 deadline, address recipient) external payable returns (uint256 eth_sold); // Trade ERC20 to ETH function tokenToEthSwapInput(uint256 tokens_sold, uint256 min_eth, uint256 deadline) external returns (uint256 eth_bought); function tokenToEthTransferInput(uint256 tokens_sold, uint256 min_eth, uint256 deadline, address recipient) external returns (uint256 eth_bought); function tokenToEthSwapOutput(uint256 eth_bought, uint256 max_tokens, uint256 deadline) external returns (uint256 tokens_sold); function tokenToEthTransferOutput(uint256 eth_bought, uint256 max_tokens, uint256 deadline, address recipient) external returns (uint256 tokens_sold); // Trade ERC20 to ERC20 function tokenToTokenSwapInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr) external returns (uint256 tokens_bought); function tokenToTokenTransferInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address token_addr) external returns (uint256 tokens_bought); function tokenToTokenSwapOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address token_addr) external returns (uint256 tokens_sold); function tokenToTokenTransferOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address token_addr) external returns (uint256 tokens_sold); // Trade ERC20 to Custom Pool function tokenToExchangeSwapInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address exchange_addr) external returns (uint256 tokens_bought); function tokenToExchangeTransferInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address exchange_addr) external returns (uint256 tokens_bought); function tokenToExchangeSwapOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address exchange_addr) external returns (uint256 tokens_sold); function tokenToExchangeTransferOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address exchange_addr) external returns (uint256 tokens_sold); // ERC20 comaptibility for liquidity tokens bytes32 public name; bytes32 public symbol; uint256 public decimals; function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address _from, address _to, uint256 value) external returns (bool); function approve(address _spender, uint256 _value) external returns (bool); function allowance(address _owner, address _spender) external view returns (uint256); function balanceOf(address _owner) external view returns (uint256); function totalSupply() external view returns (uint256); // Never use function setup(address token_addr) external; }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"uniswapAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"synth","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to_addr","type":"address"}],"name":"recoverETH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initiationTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"setSelfDestructBeneficiary","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"isArbable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"terminateSelfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"exchangeRates","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_exchangeRatesAddress","type":"address"}],"name":"setExchangeRates","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_acceptable_slippage","type":"uint256"},{"name":"_max_delay","type":"uint256"},{"name":"_off_peg_min","type":"uint256"}],"name":"setParams","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"uniswapExchange","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"synthetix","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_synthAddress","type":"address"}],"name":"setSynthAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"erc20_addr","type":"address"},{"name":"to_addr","type":"address"}],"name":"recoverERC20","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastPauseTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"selfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"SELFDESTRUCT_DELAY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"arbSynthRate","outputs":[{"name":"reward_tokens","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"selfDestructInitiated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_uniswapAddress","type":"address"}],"name":"setUniswapExchange","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"initiateSelfDestruct","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"synthetixProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"selfDestructBeneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setSynthetix","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_owner","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"isPaused","type":"bool"}],"name":"PauseChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"SelfDestructTerminated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"beneficiary","type":"address"}],"name":"SelfDestructed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"selfDestructDelay","type":"uint256"}],"name":"SelfDestructInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newBeneficiary","type":"address"}],"name":"SelfDestructBeneficiaryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"}]
Contract Creation Code
60806040526064600681905560075561025860085560098054600160a060020a031990811673e9cf7887b93150d4f2da7dfc6d502b216438f2441791829055600a8054821673c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f1790819055600b805483167370c629875dadbe702489a5e1e3baae60e38924fa179055600c80548316600160a060020a03948516179055600d80548316735e74c9036fb86bd7ecdcb084a0673efc32ea31cb179055600e805490921692169190911790553480156100c957600080fd5b50604051602080611f758339810160405251808080600160a060020a038116151561015557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b60008054600160a060020a031916600160a060020a038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150600160a060020a038116151561022557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f776e6572206d757374206e6f74206265207a65726f00000000000000000000604482015290519081900360640190fd5b60038054600160a060020a038316610100810261010060a860020a03199092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a1505050611ce5806102906000396000f3006080604052600436106101665763ffffffff60e060020a6000350416630e2feb05811461016b578063115f4fee1461019c578063134dfcd8146101b15780631627540c146101d457806316c38b3c146101f557806317c70de41461020f57806320714f88146102365780632464e10d146102575780633278c960146102805780634ffcd9df1461029557806353a47bb7146102aa57806356e44954146102bf5780635a0ce676146102e05780635c975abb146102fe57806362b856b514610313578063759b52251461032857806379264cbf1461033d57806379ba50971461035e578063886f039a146103735780638da5cb5b1461039a57806391b4ded9146103af5780639cb8a26a146103c4578063a461fc82146103d9578063a9e394b8146103ee578063b8225dec146103f6578063b838eb921461040b578063bd32aa441461042c578063bdd1248214610441578063c58aaae614610456578063fec9f9da1461046b575b600080fd5b34801561017757600080fd5b5061018061048c565b60408051600160a060020a039092168252519081900360200190f35b3480156101a857600080fd5b5061018061049b565b3480156101bd57600080fd5b506101d2600160a060020a03600435166104aa565b005b3480156101e057600080fd5b506101d2600160a060020a0360043516610548565b34801561020157600080fd5b506101d2600435151561060d565b34801561021b57600080fd5b506102246106e3565b60408051918252519081900360200190f35b34801561024257600080fd5b506101d2600160a060020a03600435166106e9565b34801561026357600080fd5b5061026c610816565b604080519115158252519081900360200190f35b34801561028c57600080fd5b506101d26108f5565b3480156102a157600080fd5b50610180610993565b3480156102b657600080fd5b506101806109a2565b3480156102cb57600080fd5b506101d2600160a060020a03600435166109b1565b3480156102ec57600080fd5b506101d2600435602435604435610a44565b34801561030a57600080fd5b5061026c610b8e565b34801561031f57600080fd5b50610180610b97565b34801561033457600080fd5b50610180610ba6565b34801561034957600080fd5b506101d2600160a060020a0360043516610bb5565b34801561036a57600080fd5b506101d2610cde565b34801561037f57600080fd5b506101d2600160a060020a0360043581169060243516610de6565b3480156103a657600080fd5b50610180610f63565b3480156103bb57600080fd5b50610224610f72565b3480156103d057600080fd5b506101d2610f78565b3480156103e557600080fd5b506102246110f1565b6102246110f8565b34801561040257600080fd5b5061026c6115b9565b34801561041757600080fd5b506101d2600160a060020a03600435166115c2565b34801561043857600080fd5b506101d26116c8565b34801561044d57600080fd5b50610180611775565b34801561046257600080fd5b50610180611784565b34801561047757600080fd5b506101d2600160a060020a0360043516611798565b600954600160a060020a031681565b600d54600160a060020a031681565b600054600160a060020a0316331461050e576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b604051600160a060020a03821690303180156108fc02916000818181858888f19350505050158015610544573d6000803e3d6000fd5b5050565b600054600160a060020a031633146105ac576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b60018054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b600054600160a060020a03163314610671576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b60055460ff1615158115151415610687576106e0565b6005805460ff1916821515179081905560ff16156106a457426004555b6005546040805160ff90921615158252517f8fb6c181ee25a520cf3dd6565006ef91229fcfe5a989566c2a3b8c115570cec59181900360200190a15b50565b60025481565b600054600160a060020a0316331461074d576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b600160a060020a03811615156107ad576040805160e560020a62461bcd02815260206004820152601c60248201527f42656e6566696369617279206d757374206e6f74206265207a65726f00000000604482015290519081900360640190fd5b60038054600160a060020a038316610100810274ffffffffffffffffffffffffffffffffffffffff00199092169190911790915560408051918252517fd5da63a0b864b315bc04128dedbc93888c8529ee6cf47ce664dc204339228c539181900360200190a150565b600d54600954604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201529051600093849384939116916370a082319160248082019260209290919082900301818787803b15801561088657600080fd5b505af115801561089a573d6000803e3d6000fd5b505050506040513d60208110156108b057600080fd5b5051600954600654919350600160a060020a03163191506108dd906127109081039063ffffffff61183816565b6108ed828463ffffffff61183816565b109250505090565b600054600160a060020a03163314610959576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b600060028190556003805460ff191690556040517f6adcc7125002935e0aa31697538ebbd65cfddf20431eb6ecdcfc3e238bfd082c9190a1565b600b54600160a060020a031681565b600154600160a060020a031681565b600054600160a060020a03163314610a15576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b600b805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a03163314610aa8576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b6127108110610b01576040805160e560020a62461bcd02815260206004820152601e60248201527f5f6f66665f7065675f6d696e206c657373207468616e2064697669736f720000604482015290519081900360640190fd5b6127108310610b80576040805160e560020a62461bcd02815260206004820152602660248201527f5f61636365707461626c655f736c697070616765206c657373207468616e206460448201527f697669736f720000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600792909255600855600655565b60055460ff1681565b600c54600160a060020a031681565b600e54600160a060020a031681565b600054600160a060020a03163314610c19576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b600d805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911791829055600954604080517f095ea7b30000000000000000000000000000000000000000000000000000000081529183166004830152600019602483015251929091169163095ea7b3916044808201926020929091908290030181600087803b158015610caf57600080fd5b505af1158015610cc3573d6000803e3d6000fd5b505050506040513d6020811015610cd957600080fd5b505050565b600154600160a060020a03163314610d66576040805160e560020a62461bcd02815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e6572736869700000000000000000000000606482015290519081900360840190fd5b60005460015460408051600160a060020a03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a1600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b60008054600160a060020a03163314610e4b576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b50604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290518391600160a060020a0383169163a9059cbb91859184916370a082319160248083019260209291908290030181600087803b158015610eb957600080fd5b505af1158015610ecd573d6000803e3d6000fd5b505050506040513d6020811015610ee357600080fd5b50516040805160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610f3257600080fd5b505af1158015610f46573d6000803e3d6000fd5b505050506040513d6020811015610f5c57600080fd5b5050505050565b600054600160a060020a031681565b60045481565b60008054600160a060020a03163314610fdd576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b60035460ff161515611039576040805160e560020a62461bcd02815260206004820152601f60248201527f53656c66204465737472756374206e6f742079657420696e6974696174656400604482015290519081900360640190fd5b426224ea0060025401101515611099576040805160e560020a62461bcd02815260206004820152601b60248201527f53656c662064657374727563742064656c6179206e6f74206d65740000000000604482015290519081900360640190fd5b5060035460408051600160a060020a0361010090930492909216808352905190917f8a09e1677ced846cb537dc2b172043bd05a1a81ad7e0033a7ef8ba762df990b7919081900360200190a180600160a060020a0316ff5b6224ea0081565b600b54604080517e9919c00000000000000000000000000000000000000000000000000000000081527f455448000000000000000000000000000000000000000000000000000000000060048201819052915160009384938493849384938493849384939192600160a060020a031691629919c09160248082019260209290919082900301818887803b15801561118e57600080fd5b505af11580156111a2573d6000803e3d6000fd5b505050506040513d60208110156111b857600080fd5b50511561120f576040805160e560020a62461bcd02815260206004820152601960248201527f52617465207374616c65206f72206e6f7420612073796e746800000000000000604482015290519081900360640190fd5b600b54604080517e9919c00000000000000000000000000000000000000000000000000000000081527f534e5800000000000000000000000000000000000000000000000000000000006004820181905291519192600160a060020a031691629919c0916024808201926020929091908290030181600087803b15801561129557600080fd5b505af11580156112a9573d6000803e3d6000fd5b505050506040513d60208110156112bf57600080fd5b505115611316576040805160e560020a62461bcd02815260206004820152601960248201527f52617465207374616c65206f72206e6f7420612073796e746800000000000000604482015290519081900360640190fd5b60055460ff1615611397576040805160e560020a62461bcd02815260206004820152603c60248201527f5468697320616374696f6e2063616e6e6f7420626520706572666f726d65642060448201527f7768696c652074686520636f6e74726163742069732070617573656400000000606482015290519081900360840190fd5b600d54600954604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152905191909216916370a082319160248083019260209291908290030181600087803b15801561140257600080fd5b505af1158015611416573d6000803e3d6000fd5b505050506040513d602081101561142c57600080fd5b5051600954600654919a50600160a060020a0316319850611459906127109081039063ffffffff61183816565b611469898b63ffffffff61183816565b106114be576040805160e560020a62461bcd02815260206004820152601a60248201527f734554482f45544820726174696f20697320746f6f2068696768000000000000604482015290519081900360640190fd5b6114d2888a61271060065461271003611869565b96506114de34886118ab565b600c549096503487900395506114fd90600160a060020a0316876118c0565b600c54600854604080517ff39b5b9b0000000000000000000000000000000000000000000000000000000081526004810185905242909201602483015251929650600160a060020a039091169163f39b5b9b918991604480830192602092919082900301818588803b15801561157257600080fd5b505af1158015611586573d6000803e3d6000fd5b50505050506040513d602081101561159d57600080fd5b505192506115ab8386611942565b995050505050505050505090565b60035460ff1681565b600054600160a060020a03163314611626576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b60098054600160a060020a0380841673ffffffffffffffffffffffffffffffffffffffff199283161792839055600c8054909216928116928317909155600d54604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152600481019490945260001960248501525191169163095ea7b39160448083019260209291908290030181600087803b158015610caf57600080fd5b600054600160a060020a0316331461172c576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b426002556003805460ff19166001179055604080516224ea00815290517fcbd94ca75b8dc45c9d80c77e851670e78843c0d75180cb81db3e2158228fa9a69181900360200190a1565b600a54600160a060020a031681565b6003546101009004600160a060020a031681565b600054600160a060020a031633146117fc576040805160e560020a62461bcd02815260206004820152602f6024820152600080516020611c7a8339815191526044820152600080516020611c9a833981519152606482015290519081900360840190fd5b600a805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a039384161791829055600e8054929093169116179055565b60006118628261185685670de0b6b3a764000063ffffffff611bad16565b9063ffffffff611be616565b9392505050565b60006107ca856107cd02611897858588623cda200202878a6009020201890281151561189157fe5b04611c09565b038115156118a157fe5b0495945050505050565b60008183116118ba5782611862565b50919050565b600082600160a060020a03166395b68fe7836040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b15801561190b57600080fd5b505af115801561191f573d6000803e3d6000fd5b505050506040513d602081101561193557600080fd5b5051905061186281611c3e565b600b54604080517fac82f6080000000000000000000000000000000000000000000000000000000081527f534e5800000000000000000000000000000000000000000000000000000000006004820152905160009283928392600160a060020a039092169163ac82f6089160248082019260209290919082900301818787803b1580156119ce57600080fd5b505af11580156119e2573d6000803e3d6000fd5b505050506040513d60208110156119f857600080fd5b5051600b54604080517fac82f6080000000000000000000000000000000000000000000000000000000081527f455448000000000000000000000000000000000000000000000000000000000060048201529051929450600160a060020a039091169163ac82f608916024808201926020929091908290030181600087803b158015611a8357600080fd5b505af1158015611a97573d6000803e3d6000fd5b505050506040513d6020811015611aad57600080fd5b50519050611ad182611ac5838863ffffffff611c4d16565b9063ffffffff61183816565b600e54604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051929550600160a060020a039091169163a9059cbb916044808201926020929091908290030181600087803b158015611b4157600080fd5b505af1158015611b55573d6000803e3d6000fd5b505050506040513d6020811015611b6b57600080fd5b50506000841115611ba557604051339085156108fc029086906000818181858888f19350505050158015611ba3573d6000803e3d6000fd5b505b505092915050565b600080831515611bc05760009150611bdf565b50828202828482811515611bd057fe5b0414611bdb57600080fd5b8091505b5092915050565b600080808311611bf557600080fd5b8284811515611c0057fe5b04949350505050565b80600260018201045b818110156118ba578091506002818285811515611c2b57fe5b0401811515611c3657fe5b049050611c12565b60075461271090048102900390565b6000670de0b6b3a7640000611c68848463ffffffff611bad16565b811515611c7157fe5b04939250505056004f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e0000000000000000000000000000000000a165627a7a72305820391a39da644d5e0a7e7976c94636740b0643da71ce11605d7f7693643e9f8a8a002900000000000000000000000077a2cd8e930eacf196105ca06837d8b3edecf1a5
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000077a2cd8e930eacf196105ca06837d8b3edecf1a5
-----Decoded View---------------
Arg [0] : _owner (address): 0x77a2CD8e930EAcf196105cA06837D8B3EdECf1a5
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000077a2cd8e930eacf196105ca06837d8b3edecf1a5
Swarm Source
bzzr://391a39da644d5e0a7e7976c94636740b0643da71ce11605d7f7693643e9f8a8a
Loading...
Loading
Loading...
Loading
OVERVIEW
The Synthetix ArbRewarder Contract for fixing the sETH/ETH peg.Allows a user to send ETH to the contract via arbSynthRate()
- If the sETH/ETH ratio is below 99/100 & there is sufficient SNX remaining in the contract at the current exchange rate.
- Convert the ETH to sETH via Uniswap up to the 99/100 ratio or the ETH is exhausted
- Convert the sETH to SNX at the current exchange rate.
- Send the SNX to the wallet that sent the ETH
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.