ETH Price: $1,593.54 (-1.90%)
Gas: 8 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Sponsored

Transaction Hash
Method
Block
From
To
Value
Withdraw167445152023-03-03 0:45:47203 days 3 hrs ago1677804347IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0153050824.71093665
Withdraw164339112023-01-18 13:12:23246 days 15 hrs ago1674047543IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0040844117.70997957
Deposit161430322022-12-08 22:39:47287 days 5 hrs ago1670539187IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0044214513.34235619
Withdraw160026052022-11-19 7:35:35306 days 20 hrs ago1668843335IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0026708410
Withdraw159488342022-11-11 19:22:59314 days 9 hrs ago1668194579IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0069594120.55047774
Deposit158058332022-10-22 19:47:35334 days 8 hrs ago1666468055IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0049967816.82668607
Deposit157958192022-10-21 10:15:11335 days 18 hrs ago1666347311IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0074585920.96289243
Withdraw157812252022-10-19 9:22:23337 days 19 hrs ago1666171343IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0049977617.56869259
Withdraw155878012022-09-22 8:50:59364 days 19 hrs ago1663836659IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.002098048.76400746
Withdraw154893232022-09-07 8:41:46379 days 19 hrs ago1662540106IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.002224538.96473196
Deposit154331412022-08-29 8:44:15388 days 19 hrs ago1661762655IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0035773910.28846564
Deposit152298562022-07-28 8:06:35420 days 20 hrs ago1658995595IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.002975989.13470893
Deposit151012692022-07-08 10:06:43440 days 18 hrs ago1657274803IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.012055512.32148048
Deposit145968172022-04-16 14:13:28523 days 14 hrs ago1650118408IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0099844927.10431072
Deposit145255882022-04-05 11:22:07534 days 17 hrs ago1649157727IN
Idle.finance: CrvALUSD Liquidity Gauge
0 ETH0.0186746452.55207813
0x60606136144032242022-03-17 9:31:44553 days 19 hrs ago1647509504IN
 Contract Creation
0 ETH0.0586711618.48484301

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x675eC0...645502B9
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.15

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version 0.2.15
"""
@title Liquidity Gauge v3
@author This version was modified starting from Curve Finance's DAO contracts
@license MIT
"""

from vyper.interfaces import ERC20

implements: ERC20


interface Distributor:
    def futureEpochTimeWrite() -> uint256: nonpayable
    def rate() -> uint256: view

interface Controller:
    def period() -> int128: view
    def period_write() -> int128: nonpayable
    def period_timestamp(p: int128) -> uint256: view
    def gauge_relative_weight(addr: address, time: uint256) -> uint256: view
    def voting_escrow() -> address: view
    def checkpoint(): nonpayable
    def checkpoint_gauge(addr: address): nonpayable

interface DistributorProxy:
    def distributor() -> address: view
    def controller() -> address: view
    def distributed(user: address, gauge: address) -> uint256: view

interface VotingEscrow:
    def user_point_epoch(addr: address) -> uint256: view
    def user_point_history__ts(addr: address, epoch: uint256) -> uint256: view

interface ERC20Extended:
    def symbol() -> String[26]: view


event Deposit:
    provider: indexed(address)
    value: uint256

event Withdraw:
    provider: indexed(address)
    value: uint256

event UpdateLiquidityLimit:
    user: address
    original_balance: uint256
    original_supply: uint256
    working_balance: uint256
    working_supply: uint256

event CommitOwnership:
    admin: address

event ApplyOwnership:
    admin: address

event Transfer:
    _from: indexed(address)
    _to: indexed(address)
    _value: uint256

event Approval:
    _owner: indexed(address)
    _spender: indexed(address)
    _value: uint256


MAX_REWARDS: constant(uint256) = 8
TOKENLESS_PRODUCTION: constant(uint256) = 40
WEEK: constant(uint256) = 604800
CLAIM_FREQUENCY: constant(uint256) = 3600

distributor_proxy: public(address)
distributor: public(address)
lp_token: public(address)
controller: public(address)
voting_escrow: public(address)
future_epoch_time: public(uint256)

balanceOf: public(HashMap[address, uint256])
totalSupply: public(uint256)
allowance: public(HashMap[address, HashMap[address, uint256]])

name: public(String[64])
symbol: public(String[32])

working_balances: public(HashMap[address, uint256])
working_supply: public(uint256)

# The goal is to be able to calculate ∫(rate * balance / totalSupply dt) from 0 till checkpoint
# All values are kept in units of being multiplied by 1e18
period: public(int128)
period_timestamp: public(uint256[100000000000000000000000000000])

# 1e18 * ∫(rate(t) / totalSupply(t) dt) from 0 till checkpoint
integrate_inv_supply: public(uint256[100000000000000000000000000000])  # bump epoch when rate() changes

# 1e18 * ∫(rate(t) / totalSupply(t) dt) from (last_action) till checkpoint
integrate_inv_supply_of: public(HashMap[address, uint256])
integrate_checkpoint_of: public(HashMap[address, uint256])

# ∫(balance * rate(t) / totalSupply(t) dt) from 0 till checkpoint
# Units: rate * t = already number of coins per address to issue
integrate_fraction: public(HashMap[address, uint256])

inflation_rate: public(uint256)

# For tracking external rewards
reward_data: uint256
reward_tokens: public(address[MAX_REWARDS])

# deposit / withdraw / claim
reward_sigs: bytes32

# claimant -> default reward receiver
rewards_receiver: public(HashMap[address, address])

# reward token -> integral
reward_integral: public(HashMap[address, uint256])

# reward token -> claiming address -> integral
reward_integral_for: public(HashMap[address, HashMap[address, uint256]])

# user -> [uint128 claimable amount][uint128 claimed amount]
claim_data: HashMap[address, HashMap[address, uint256]]

admin: public(address)
future_admin: public(address)  # Can and will be a smart contract
is_killed: public(bool)


@external
def __init__(_lp_token: address, _distributor_proxy: address, _admin: address):
    """
    @notice Contract constructor
    @param _lp_token Liquidity Pool contract address
    @param _distributor_proxy DistributorProxy contract address
    @param _admin Admin who can kill the gauge
    """

    symbol: String[26] = ERC20Extended(_lp_token).symbol()
    self.name = concat(symbol, " Gauge Deposit")
    self.symbol = concat(symbol, "-gauge")

    distributor: address = DistributorProxy(_distributor_proxy).distributor()
    controller: address = DistributorProxy(_distributor_proxy).controller()

    self.lp_token = _lp_token
    self.distributor_proxy = _distributor_proxy
    self.admin = _admin
    self.distributor = distributor
    self.controller = controller
    self.voting_escrow = Controller(controller).voting_escrow()

    self.period_timestamp[0] = block.timestamp
    self.inflation_rate = Distributor(distributor).rate()
    self.future_epoch_time = Distributor(distributor).futureEpochTimeWrite()


@view
@external
def decimals() -> uint256:
    """
    @notice Get the number of decimals for this token
    @dev Implemented as a view method to reduce gas costs
    @return uint256 decimal places
    """
    return 18


@view
@external
def integrate_checkpoint() -> uint256:
    return self.period_timestamp[self.period]


@internal
def _update_liquidity_limit(addr: address, l: uint256, L: uint256):
    """
    @notice Calculate limits which depend on the amount of IDLE token per-user.
            Effectively it calculates working balances to apply amplification
            of IDLE distribution by `distributor`
    @param addr User address
    @param l User's amount of liquidity (LP tokens)
    @param L Total amount of liquidity (LP tokens)
    """
    # To be called after totalSupply is updated
    _voting_escrow: address = self.voting_escrow
    voting_balance: uint256 = ERC20(_voting_escrow).balanceOf(addr)
    voting_total: uint256 = ERC20(_voting_escrow).totalSupply()

    lim: uint256 = l * TOKENLESS_PRODUCTION / 100
    if voting_total > 0:
        lim += L * voting_balance / voting_total * (100 - TOKENLESS_PRODUCTION) / 100

    lim = min(l, lim)
    old_bal: uint256 = self.working_balances[addr]
    self.working_balances[addr] = lim
    _working_supply: uint256 = self.working_supply + lim - old_bal
    self.working_supply = _working_supply

    log UpdateLiquidityLimit(addr, l, L, lim, _working_supply)


@internal
def _checkpoint_rewards( _user: address, _total_supply: uint256, _claim: bool, _receiver: address):
    """
    @notice Claim pending rewards and checkpoint rewards for a user
    """
    # load reward tokens and integrals into memory
    reward_tokens: address[MAX_REWARDS] = empty(address[MAX_REWARDS])
    reward_integrals: uint256[MAX_REWARDS] = empty(uint256[MAX_REWARDS])
    for i in range(MAX_REWARDS):
        token: address = self.reward_tokens[i]
        if token == ZERO_ADDRESS:
            break
        reward_tokens[i] = token
        reward_integrals[i] = self.reward_integral[token]

    reward_data: uint256 = self.reward_data
    if _total_supply != 0 and reward_data != 0 and block.timestamp > shift(reward_data, -160) + CLAIM_FREQUENCY:
        # track balances prior to claiming
        reward_balances: uint256[MAX_REWARDS] = empty(uint256[MAX_REWARDS])
        for i in range(MAX_REWARDS):
            token: address = self.reward_tokens[i]
            if token == ZERO_ADDRESS:
                break
            reward_balances[i] = ERC20(token).balanceOf(self)

        # claim from reward contract
        reward_contract: address = convert(reward_data % 2**160, address)
        raw_call(reward_contract, slice(self.reward_sigs, 8, 4))  # dev: bad claim sig
        self.reward_data = convert(reward_contract, uint256) + shift(block.timestamp, 160)

        # get balances after claim and calculate new reward integrals
        for i in range(MAX_REWARDS):
            token: address = reward_tokens[i]
            if token == ZERO_ADDRESS:
                break
            dI: uint256 = 10**18 * (ERC20(token).balanceOf(self) - reward_balances[i]) / _total_supply
            if dI > 0:
                reward_integrals[i] += dI
                self.reward_integral[token] = reward_integrals[i]

    if _user != ZERO_ADDRESS:

        receiver: address = _receiver
        if _claim and receiver == ZERO_ADDRESS:
            # if receiver is not explicitly declared, check for default receiver
            receiver = self.rewards_receiver[_user]
            if receiver == ZERO_ADDRESS:
                # direct claims to user if no default receiver is set
                receiver = _user

        # calculate new user reward integral and transfer any owed rewards
        user_balance: uint256 = self.balanceOf[_user]
        for i in range(MAX_REWARDS):
            token: address = reward_tokens[i]
            if token == ZERO_ADDRESS:
                break

            integral: uint256 = reward_integrals[i]
            integral_for: uint256 = self.reward_integral_for[token][_user]
            new_claimable: uint256 = 0
            if integral_for < integral:
                self.reward_integral_for[token][_user] = integral
                new_claimable = user_balance * (integral - integral_for) / 10**18

            claim_data: uint256 = self.claim_data[_user][token]
            total_claimable: uint256 = shift(claim_data, -128) + new_claimable
            if total_claimable > 0:
                total_claimed: uint256 = claim_data % 2 ** 128
                if _claim:
                    response: Bytes[32] = raw_call(
                        token,
                        concat(
                            method_id("transfer(address,uint256)"),
                            convert(receiver, bytes32),
                            convert(total_claimable, bytes32),
                        ),
                        max_outsize=32,
                    )
                    if len(response) != 0:
                        assert convert(response, bool)
                    # update amount claimed (lower order bytes)
                    self.claim_data[_user][token] = total_claimed + total_claimable
                elif new_claimable > 0:
                    # update total_claimable (higher order bytes)
                    self.claim_data[_user][token] = total_claimed + shift(total_claimable, 128)


@internal
def _checkpoint(addr: address):
    """
    @notice Checkpoint for a user
    @param addr User address
    """
    _period: int128 = self.period
    _period_time: uint256 = self.period_timestamp[_period]
    _integrate_inv_supply: uint256 = self.integrate_inv_supply[_period]
    rate: uint256 = self.inflation_rate
    new_rate: uint256 = rate
    prev_future_epoch: uint256 = self.future_epoch_time
    if prev_future_epoch >= _period_time:
        _distributor: address = self.distributor
        self.future_epoch_time = Distributor(_distributor).futureEpochTimeWrite()
        new_rate = Distributor(_distributor).rate()
        self.inflation_rate = new_rate

    if self.is_killed:
        # Stop distributing inflation as soon as killed
        rate = 0

    # Update integral of 1/supply
    if block.timestamp > _period_time:
        _working_supply: uint256 = self.working_supply
        _controller: address = self.controller
        Controller(_controller).checkpoint_gauge(self)
        prev_week_time: uint256 = _period_time
        week_time: uint256 = min((_period_time + WEEK) / WEEK * WEEK, block.timestamp)

        for i in range(500):
            dt: uint256 = week_time - prev_week_time
            w: uint256 = Controller(_controller).gauge_relative_weight(self, prev_week_time / WEEK * WEEK)

            if _working_supply > 0:
                if prev_future_epoch >= prev_week_time and prev_future_epoch < week_time:
                    # If we went across one or multiple epochs, apply the rate
                    # of the first epoch until it ends, and then the rate of
                    # the last epoch.
                    # If more than one epoch is crossed - the gauge gets less,
                    # but that'd meen it wasn't called for more than 1 year
                    _integrate_inv_supply += rate * w * (prev_future_epoch - prev_week_time) / _working_supply
                    rate = new_rate
                    _integrate_inv_supply += rate * w * (week_time - prev_future_epoch) / _working_supply
                else:
                    _integrate_inv_supply += rate * w * dt / _working_supply
                # On precisions of the calculation
                # rate ~= 10e18
                # last_weight > 0.01 * 1e18 = 1e16 (if pool weight is 1%)
                # _working_supply ~= TVL * 1e18 ~= 1e26 ($100M for example)
                # The largest loss is at dt = 1
                # Loss is 1e-9 - acceptable

            if week_time == block.timestamp:
                break
            prev_week_time = week_time
            week_time = min(week_time + WEEK, block.timestamp)

    _period += 1
    self.period = _period
    self.period_timestamp[_period] = block.timestamp
    self.integrate_inv_supply[_period] = _integrate_inv_supply

    # Update user-specific integrals
    _working_balance: uint256 = self.working_balances[addr]
    self.integrate_fraction[addr] += _working_balance * (_integrate_inv_supply - self.integrate_inv_supply_of[addr]) / 10 ** 18
    self.integrate_inv_supply_of[addr] = _integrate_inv_supply
    self.integrate_checkpoint_of[addr] = block.timestamp


@external
def user_checkpoint(addr: address) -> bool:
    """
    @notice Record a checkpoint for `addr`
    @param addr User address
    @return bool success
    """
    assert (msg.sender == addr) or (msg.sender == self.distributor_proxy)  # dev: unauthorized
    self._checkpoint(addr)
    self._update_liquidity_limit(addr, self.balanceOf[addr], self.totalSupply)
    return True


@external
def claimable_tokens(addr: address) -> uint256:
    """
    @notice Get the number of claimable tokens per user
    @dev This function should be manually changed to "view" in the ABI
    @return uint256 number of claimable tokens per user
    """
    self._checkpoint(addr)
    return self.integrate_fraction[addr] - DistributorProxy(self.distributor_proxy).distributed(addr, self)


@view
@external
def reward_contract() -> address:
    """
    @notice Address of the reward contract providing non-IDLE incentives for this gauge
    @dev Returns `ZERO_ADDRESS` if there is no reward contract active
    """
    return convert(self.reward_data % 2**160, address)


@view
@external
def last_claim() -> uint256:
    """
    @notice Epoch timestamp of the last call to claim from `reward_contract`
    @dev Rewards are claimed at most once per hour in order to reduce gas costs
    """
    return shift(self.reward_data, -160)


@view
@external
def claimed_reward(_addr: address, _token: address) -> uint256:
    """
    @notice Get the number of already-claimed reward tokens for a user
    @param _addr Account to get reward amount for
    @param _token Token to get reward amount for
    @return uint256 Total amount of `_token` already claimed by `_addr`
    """
    return self.claim_data[_addr][_token] % 2**128


@view
@external
def claimable_reward(_addr: address, _token: address) -> uint256:
    """
    @notice Get the number of claimable reward tokens for a user
    @dev This call does not consider pending claimable amount in `reward_contract`.
         Off-chain callers should instead use `claimable_rewards_write` as a
         view method.
    @param _addr Account to get reward amount for
    @param _token Token to get reward amount for
    @return uint256 Claimable reward token amount
    """
    return shift(self.claim_data[_addr][_token], -128)


@external
@nonreentrant('lock')
def claimable_reward_write(_addr: address, _token: address) -> uint256:
    """
    @notice Get the number of claimable reward tokens for a user
    @dev This function should be manually changed to "view" in the ABI
         Calling it via a transaction will claim available reward tokens
    @param _addr Account to get reward amount for
    @param _token Token to get reward amount for
    @return uint256 Claimable reward token amount
    """
    if self.reward_tokens[0] != ZERO_ADDRESS:
        self._checkpoint_rewards(_addr, self.totalSupply, False, ZERO_ADDRESS)
    return shift(self.claim_data[_addr][_token], -128)


@external
def set_rewards_receiver(_receiver: address):
    """
    @notice Set the default reward receiver for the caller.
    @dev When set to ZERO_ADDRESS, rewards are sent to the caller
    @param _receiver Receiver address for any rewards claimed via `claim_rewards`
    """
    self.rewards_receiver[msg.sender] = _receiver


@external
@nonreentrant('lock')
def claim_rewards(_addr: address = msg.sender, _receiver: address = ZERO_ADDRESS):
    """
    @notice Claim available reward tokens for `_addr`
    @param _addr Address to claim for
    @param _receiver Address to transfer rewards to - if set to
                     ZERO_ADDRESS, uses the default reward receiver
                     for the caller
    """
    if _receiver != ZERO_ADDRESS:
        assert _addr == msg.sender  # dev: cannot redirect when claiming for another user
    self._checkpoint_rewards(_addr, self.totalSupply, True, _receiver)


@external
def kick(addr: address):
    """
    @notice Kick `addr` for abusing their boost
    @dev Only if either they had another voting event, or their voting escrow lock expired
    @param addr Address to kick
    """
    _voting_escrow: address = self.voting_escrow
    t_last: uint256 = self.integrate_checkpoint_of[addr]
    t_ve: uint256 = VotingEscrow(_voting_escrow).user_point_history__ts(
        addr, VotingEscrow(_voting_escrow).user_point_epoch(addr)
    )
    _balance: uint256 = self.balanceOf[addr]

    assert ERC20(_voting_escrow).balanceOf(addr) == 0 or t_ve > t_last # dev: kick not allowed
    assert self.working_balances[addr] > _balance * TOKENLESS_PRODUCTION / 100  # dev: kick not needed

    self._checkpoint(addr)
    self._update_liquidity_limit(addr, self.balanceOf[addr], self.totalSupply)


@external
@nonreentrant('lock')
def deposit(_value: uint256, _addr: address = msg.sender, _claim_rewards: bool = False):
    """
    @notice Deposit `_value` LP tokens
    @dev Depositting also claims pending reward tokens
    @param _value Number of tokens to deposit
    @param _addr Address to deposit for
    """

    self._checkpoint(_addr)

    if _value != 0:
        is_rewards: bool = self.reward_tokens[0] != ZERO_ADDRESS
        total_supply: uint256 = self.totalSupply
        if is_rewards:
            self._checkpoint_rewards(_addr, total_supply, _claim_rewards, ZERO_ADDRESS)

        total_supply += _value
        new_balance: uint256 = self.balanceOf[_addr] + _value
        self.balanceOf[_addr] = new_balance
        self.totalSupply = total_supply

        self._update_liquidity_limit(_addr, new_balance, total_supply)

        ERC20(self.lp_token).transferFrom(msg.sender, self, _value)
        if is_rewards:
            reward_data: uint256 = self.reward_data
            if reward_data > 0:
                deposit_sig: Bytes[4] = slice(self.reward_sigs, 0, 4)
                if convert(deposit_sig, uint256) != 0:
                    raw_call(
                        convert(reward_data % 2**160, address),
                        concat(deposit_sig, convert(_value, bytes32))
                    )

    log Deposit(_addr, _value)
    log Transfer(ZERO_ADDRESS, _addr, _value)


@external
@nonreentrant('lock')
def withdraw(_value: uint256, _claim_rewards: bool = False):
    """
    @notice Withdraw `_value` LP tokens
    @dev Withdrawing also claims pending reward tokens
    @param _value Number of tokens to withdraw
    """
    self._checkpoint(msg.sender)

    if _value != 0:
        is_rewards: bool = self.reward_tokens[0] != ZERO_ADDRESS
        total_supply: uint256 = self.totalSupply
        if is_rewards:
            self._checkpoint_rewards(msg.sender, total_supply, _claim_rewards, ZERO_ADDRESS)

        total_supply -= _value
        new_balance: uint256 = self.balanceOf[msg.sender] - _value
        self.balanceOf[msg.sender] = new_balance
        self.totalSupply = total_supply

        self._update_liquidity_limit(msg.sender, new_balance, total_supply)

        if is_rewards:
            reward_data: uint256 = self.reward_data
            if reward_data > 0:
                withdraw_sig: Bytes[4] = slice(self.reward_sigs, 4, 4)
                if convert(withdraw_sig, uint256) != 0:
                    raw_call(
                        convert(reward_data % 2**160, address),
                        concat(withdraw_sig, convert(_value, bytes32))
                    )
        ERC20(self.lp_token).transfer(msg.sender, _value)

    log Withdraw(msg.sender, _value)
    log Transfer(msg.sender, ZERO_ADDRESS, _value)


@internal
def _transfer(_from: address, _to: address, _value: uint256):
    self._checkpoint(_from)
    self._checkpoint(_to)

    if _value != 0:
        total_supply: uint256 = self.totalSupply
        is_rewards: bool = self.reward_tokens[0] != ZERO_ADDRESS
        if is_rewards:
            self._checkpoint_rewards(_from, total_supply, False, ZERO_ADDRESS)
        new_balance: uint256 = self.balanceOf[_from] - _value
        self.balanceOf[_from] = new_balance
        self._update_liquidity_limit(_from, new_balance, total_supply)

        if is_rewards:
            self._checkpoint_rewards(_to, total_supply, False, ZERO_ADDRESS)
        new_balance = self.balanceOf[_to] + _value
        self.balanceOf[_to] = new_balance
        self._update_liquidity_limit(_to, new_balance, total_supply)

    log Transfer(_from, _to, _value)


@external
@nonreentrant('lock')
def transfer(_to : address, _value : uint256) -> bool:
    """
    @notice Transfer token for a specified address
    @dev Transferring claims pending reward tokens for the sender and receiver
    @param _to The address to transfer to.
    @param _value The amount to be transferred.
    """
    self._transfer(msg.sender, _to, _value)

    return True


@external
@nonreentrant('lock')
def transferFrom(_from : address, _to : address, _value : uint256) -> bool:
    """
     @notice Transfer tokens from one address to another.
     @dev Transferring claims pending reward tokens for the sender and receiver
     @param _from address The address which you want to send tokens from
     @param _to address The address which you want to transfer to
     @param _value uint256 the amount of tokens to be transferred
    """
    _allowance: uint256 = self.allowance[_from][msg.sender]
    if _allowance != MAX_UINT256:
        self.allowance[_from][msg.sender] = _allowance - _value

    self._transfer(_from, _to, _value)

    return True


@external
def approve(_spender : address, _value : uint256) -> bool:
    """
    @notice Approve the passed address to transfer the specified amount of
            tokens on behalf of msg.sender
    @dev Beware that changing an allowance via this method brings the risk
         that someone may use both the old and new allowance by unfortunate
         transaction ordering. This may be mitigated with the use of
         {incraseAllowance} and {decreaseAllowance}.
         https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    @param _spender The address which will transfer the funds
    @param _value The amount of tokens that may be transferred
    @return bool success
    """
    self.allowance[msg.sender][_spender] = _value
    log Approval(msg.sender, _spender, _value)

    return True


@external
def increaseAllowance(_spender: address, _added_value: uint256) -> bool:
    """
    @notice Increase the allowance granted to `_spender` by the caller
    @dev This is alternative to {approve} that can be used as a mitigation for
         the potential race condition
    @param _spender The address which will transfer the funds
    @param _added_value The amount of to increase the allowance
    @return bool success
    """
    allowance: uint256 = self.allowance[msg.sender][_spender] + _added_value
    self.allowance[msg.sender][_spender] = allowance

    log Approval(msg.sender, _spender, allowance)

    return True


@external
def decreaseAllowance(_spender: address, _subtracted_value: uint256) -> bool:
    """
    @notice Decrease the allowance granted to `_spender` by the caller
    @dev This is alternative to {approve} that can be used as a mitigation for
         the potential race condition
    @param _spender The address which will transfer the funds
    @param _subtracted_value The amount of to decrease the allowance
    @return bool success
    """
    allowance: uint256 = self.allowance[msg.sender][_spender] - _subtracted_value
    self.allowance[msg.sender][_spender] = allowance

    log Approval(msg.sender, _spender, allowance)

    return True


@external
@nonreentrant('lock')
def set_rewards(_reward_contract: address, _sigs: bytes32, _reward_tokens: address[MAX_REWARDS]):
    """
    @notice Set the active reward contract
    @dev A reward contract cannot be set while this contract has no deposits
    @param _reward_contract Reward contract address. Set to ZERO_ADDRESS to
                            disable staking.
    @param _sigs Four byte selectors for staking, withdrawing and claiming,
                 right padded with zero bytes. If the reward contract can
                 be claimed from but does not require staking, the staking
                 and withdraw selectors should be set to 0x00
    @param _reward_tokens List of claimable reward tokens. New reward tokens
                          may be added but they cannot be removed. When calling
                          this function to unset or modify a reward contract,
                          this array must begin with the already-set reward
                          token addresses.
    """
    assert msg.sender == self.admin

    lp_token: address = self.lp_token
    current_reward_contract: address = convert(self.reward_data % 2**160, address)
    total_supply: uint256 = self.totalSupply
    if self.reward_tokens[0] != ZERO_ADDRESS:
        self._checkpoint_rewards(ZERO_ADDRESS, total_supply, False, ZERO_ADDRESS)
    if current_reward_contract != ZERO_ADDRESS:
        withdraw_sig: Bytes[4] = slice(self.reward_sigs, 4, 4)
        if convert(withdraw_sig, uint256) != 0:
            if total_supply != 0:
                raw_call(
                    current_reward_contract,
                    concat(withdraw_sig, convert(total_supply, bytes32))
                )
            ERC20(lp_token).approve(current_reward_contract, 0)

    if _reward_contract != ZERO_ADDRESS:
        assert _reward_tokens[0] != ZERO_ADDRESS  # dev: no reward token
        assert _reward_contract.is_contract  # dev: not a contract
        deposit_sig: Bytes[4] = slice(_sigs, 0, 4)
        withdraw_sig: Bytes[4] = slice(_sigs, 4, 4)

        if convert(deposit_sig, uint256) != 0:
            # need a non-zero total supply to verify the sigs
            assert total_supply != 0  # dev: zero total supply
            ERC20(lp_token).approve(_reward_contract, MAX_UINT256)

            # it would be Very Bad if we get the signatures wrong here, so
            # we do a test deposit and withdrawal prior to setting them
            raw_call(
                _reward_contract,
                concat(deposit_sig, convert(total_supply, bytes32))
            )  # dev: failed deposit
            assert ERC20(lp_token).balanceOf(self) == 0
            raw_call(
                _reward_contract,
                concat(withdraw_sig, convert(total_supply, bytes32))
            )  # dev: failed withdraw
            assert ERC20(lp_token).balanceOf(self) == total_supply

            # deposit and withdraw are good, time to make the actual deposit
            raw_call(
                _reward_contract,
                concat(deposit_sig, convert(total_supply, bytes32))
            )
        else:
            assert convert(withdraw_sig, uint256) == 0  # dev: withdraw without deposit

    self.reward_data = convert(_reward_contract, uint256)
    self.reward_sigs = _sigs
    for i in range(MAX_REWARDS):
        current_token: address = self.reward_tokens[i]
        new_token: address = _reward_tokens[i]
        if current_token != ZERO_ADDRESS:
            assert current_token == new_token  # dev: cannot modify existing reward token
        elif new_token != ZERO_ADDRESS:
            # store new reward token
            self.reward_tokens[i] = new_token
        else:
            break

    if _reward_contract != ZERO_ADDRESS:
        # do an initial checkpoint to verify that claims are working
        self._checkpoint_rewards(ZERO_ADDRESS, total_supply, False, ZERO_ADDRESS)


@external
def set_killed(_is_killed: bool):
    """
    @notice Set the killed status for this contract
    @dev When killed, the gauge always yields a rate of 0 and so cannot receive IDLE
    @param _is_killed Killed status to set
    """
    assert msg.sender == self.admin

    self.is_killed = _is_killed


@external
def commit_transfer_ownership(addr: address):
    """
    @notice Transfer ownership of GaugeController to `addr`
    @param addr Address to have ownership transferred to
    """
    assert msg.sender == self.admin  # dev: admin only

    self.future_admin = addr
    log CommitOwnership(addr)


@external
def accept_transfer_ownership():
    """
    @notice Accept a pending ownership transfer
    """
    _admin: address = self.future_admin
    assert msg.sender == _admin  # dev: future admin only

    self.admin = _admin
    log ApplyOwnership(_admin)

Contract Security Audit

Contract ABI

[{"name":"Deposit","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Withdraw","inputs":[{"name":"provider","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"UpdateLiquidityLimit","inputs":[{"name":"user","type":"address","indexed":false},{"name":"original_balance","type":"uint256","indexed":false},{"name":"original_supply","type":"uint256","indexed":false},{"name":"working_balance","type":"uint256","indexed":false},{"name":"working_supply","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"CommitOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"Transfer","inputs":[{"name":"_from","type":"address","indexed":true},{"name":"_to","type":"address","indexed":true},{"name":"_value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"name":"_owner","type":"address","indexed":true},{"name":"_spender","type":"address","indexed":true},{"name":"_value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_lp_token","type":"address"},{"name":"_distributor_proxy","type":"address"},{"name":"_admin","type":"address"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":288},{"stateMutability":"view","type":"function","name":"integrate_checkpoint","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":4560},{"stateMutability":"nonpayable","type":"function","name":"user_checkpoint","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":3133382},{"stateMutability":"nonpayable","type":"function","name":"claimable_tokens","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3046449},{"stateMutability":"view","type":"function","name":"reward_contract","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2718},{"stateMutability":"view","type":"function","name":"last_claim","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2544},{"stateMutability":"view","type":"function","name":"claimed_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3066},{"stateMutability":"view","type":"function","name":"claimable_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3034},{"stateMutability":"nonpayable","type":"function","name":"claimable_reward_write","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":1209922},{"stateMutability":"nonpayable","type":"function","name":"set_rewards_receiver","inputs":[{"name":"_receiver","type":"address"}],"outputs":[],"gas":35733},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[{"name":"_addr","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[{"name":"_addr","type":"address"},{"name":"_receiver","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"kick","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":3147973},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_value","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_value","type":"uint256"},{"name":"_addr","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"deposit","inputs":[{"name":"_value","type":"uint256"},{"name":"_addr","type":"address"},{"name":"_claim_rewards","type":"bool"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"withdraw","inputs":[{"name":"_value","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"withdraw","inputs":[{"name":"_value","type":"uint256"},{"name":"_claim_rewards","type":"bool"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"transfer","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":17167132},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":17205082},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":38211},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_added_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":40755},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_subtracted_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":40779},{"stateMutability":"nonpayable","type":"function","name":"set_rewards","inputs":[{"name":"_reward_contract","type":"address"},{"name":"_sigs","type":"bytes32"},{"name":"_reward_tokens","type":"address[8]"}],"outputs":[],"gas":2740447},{"stateMutability":"nonpayable","type":"function","name":"set_killed","inputs":[{"name":"_is_killed","type":"bool"}],"outputs":[],"gas":38145},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":39525},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[],"gas":39470},{"stateMutability":"view","type":"function","name":"distributor_proxy","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3078},{"stateMutability":"view","type":"function","name":"distributor","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3108},{"stateMutability":"view","type":"function","name":"lp_token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3138},{"stateMutability":"view","type":"function","name":"controller","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3168},{"stateMutability":"view","type":"function","name":"voting_escrow","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3198},{"stateMutability":"view","type":"function","name":"future_epoch_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3228},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3473},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3288},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3748},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":13578},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":11331},{"stateMutability":"view","type":"function","name":"working_balances","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3623},{"stateMutability":"view","type":"function","name":"working_supply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3438},{"stateMutability":"view","type":"function","name":"period","inputs":[],"outputs":[{"name":"","type":"int128"}],"gas":3468},{"stateMutability":"view","type":"function","name":"period_timestamp","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3543},{"stateMutability":"view","type":"function","name":"integrate_inv_supply","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3573},{"stateMutability":"view","type":"function","name":"integrate_inv_supply_of","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3773},{"stateMutability":"view","type":"function","name":"integrate_checkpoint_of","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3803},{"stateMutability":"view","type":"function","name":"integrate_fraction","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3833},{"stateMutability":"view","type":"function","name":"inflation_rate","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3648},{"stateMutability":"view","type":"function","name":"reward_tokens","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3723},{"stateMutability":"view","type":"function","name":"rewards_receiver","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"address"}],"gas":3923},{"stateMutability":"view","type":"function","name":"reward_integral","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3953},{"stateMutability":"view","type":"function","name":"reward_integral_for","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":4198},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3798},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3828},{"stateMutability":"view","type":"function","name":"is_killed","inputs":[],"outputs":[{"name":"","type":"bool"}],"gas":3858}]

Deployed Bytecode

0x600436101561000d57611fde565b600035601c526000513461328a5763313ce56781141561003257601260005260206000f35b63d31f3f6d8114156100665760016019546c01431e0fae6d7217caa000000081101561328a5702601a015460005260206000f35b634b8200938114156100f65760043560a01c61328a5760043533141561008d576001610093565b60075433145b5b1561328a576004356101405261014051600658016129b8565b60005060043561014052600d60043560e05260c052604060c0205461016052600e546101805261018051610160516101405160065801611fe4565b600050600160005260206000f35b63331345838114156101905760043560a01c61328a576004356101405261014051600658016129b8565b6000506c02863c1f5cdae420000000001c60043560e05260c052604060c0205460206101e06044638d09ef336101405260043561016052306101805261015c6007545afa1561328a57601f3d111561328a576000506101e05180821061328a578082039050905060005260206000f35b63bf88a6ff8114156101dc576c02863c1f5cdae420000000001e5474010000000000000000000000000000000000000000808206905090508060a01c61328a5780905060005260206000f35b633488bd19811415610203576c02863c1f5cdae420000000001e5460a01c60005260206000f35b63e77e74378114156102705760043560a01c61328a5760243560a01c61328a576c02863c1f5cdae420000000002b60043560e05260c052604060c02060243560e05260c052604060c020547001000000000000000000000000000000008082069050905060005260206000f35b6333fd6f748114156102c75760043560a01c61328a5760243560a01c61328a576c02863c1f5cdae420000000002b60043560e05260c052604060c02060243560e05260c052604060c0205460801c60005260206000f35b6359b7e40981141561037d5760005461328a57600160005560043560a01c61328a5760243560a01c61328a5760006c02863c1f5cdae420000000001f5418156103415760043561014052600e546101605260006101805260006101a0526101a051610180516101605161014051600658016121dd565b6000505b6c02863c1f5cdae420000000002b60043560e05260c052604060c02060243560e05260c052604060c0205460801c600052600060005560206000f35b63bdf981168114156103b35760043560a01c61328a576004356c02863c1f5cdae42000000000283360e05260c052604060c02055005b63e6f1daf28114156103cf573361014052600061016052610438565b6384e9bd7e8114156103fb5760006101605260043560a01c61328a576020600461014037600050610438565b639faceb1b8114156104335760043560a01c61328a57602060046101403760243560a01c61328a576020602461016037600050610438565b6104ac565b60015461328a576001600155600061016051181561045c573361014051141561328a575b61014051610160516101405161018052600e546101a05260016101c052610160516101e0526101e0516101c0516101a05161018051600658016121dd565b61016052610140526000506000600155005b6396c551758114156106925760043560a01c61328a57600b54610140526c02863c1f5cdae420000000001b60043560e05260c052604060c020546101605260206102e0604463da020a1861024052600435610260526020610220602463010ae7576101a0526004356101c0526101bc610140515afa1561328a57601f3d111561328a57600050610220516102805261025c610140515afa1561328a57601f3d111561328a576000506102e05161018052600d60043560e05260c052604060c020546101a05260206102e060246370a08231610260526004356102805261027c610140515afa1561328a57601f3d111561328a576000506102e0516105b15760016105bb565b6101605161018051115b5b1561328a576101a051602880820282158284830414171561328a5780905090509050606480820490509050601760043560e05260c052604060c02054111561328a576101405161016051610180516101a0516004356101c0526101c051600658016129b8565b6101a0526101805261016052610140526000506101405161016051610180516101a0516004356101c052600d60043560e05260c052604060c020546101e052600e5461020052610200516101e0516101c05160065801611fe4565b6101a052610180526101605261014052600050005b63b6b55f258114156106ae573361014052600061016052610717565b636e553f658114156106da5760006101605260243560a01c61328a576020602461014037600050610717565b6383df67478114156107125760243560a01c61328a57602060246101403760443560011c61328a576020604461016037600050610717565b610aca565b60025461328a5760016002556101405161016051610140516101805261018051600658016129b8565b610160526101405260005060006004351815610a5d5760006c02863c1f5cdae420000000001f54141561018052600e546101a05261018051156107d8576101405161016051610180516101a051610140516101c0526101a0516101e052610160516102005260006102205261022051610200516101e0516101c051600658016121dd565b6101a0526101805261016052610140526000505b6101a08051600435818183011061328a5780820190509050815250600d6101405160e05260c052604060c02054600435818183011061328a57808201905090506101c0526101c051600d6101405160e05260c052604060c020556101a051600e556101405161016051610180516101a0516101c051610140516101e0526101c051610200526101a0516102205261022051610200516101e05160065801611fe4565b6101c0526101a05261018052610160526101405260005060206102a060646323b872dd6101e05233610200523061022052600435610240526101fc60006009545af11561328a57601f3d111561328a576000506102a0506101805115610a5c576c02863c1f5cdae420000000001e546101e05260006101e0511115610a5b5760006004602082066102600160208284011161328a576c02863c1f5cdae42000000000276102806020840161012060006001818352015b8261012051602002111561094357610965565b61012051850154610120516020028501525b8151600101808352811415610930575b5050505050818152809050905090508051602001806102008284600060045af11561328a5750506000610200806020015160008251806020901361328a578091901261328a57806020036101000a82049050905090501815610a5a57600061020060048060208461026001018260208501600060045af1505080518201915050600435602082610260010152602081019050806102605261026090508051602001806102e08284600060045af11561328a575050600060006102e05161030060006101e05174010000000000000000000000000000000000000000808206905090508060a01c61328a578090505af11561328a575b5b5b5b60043561018052610140517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c6020610180a2600435610180526101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610180a36000600255005b632e1a7d4d811415610ae157600061014052610b0c565b6338d07436811415610b075760243560011c61328a576020602461014037600050610b0c565b610e89565b60035461328a57600160035561014051336101605261016051600658016129b8565b6101405260005060006004351815610e225760006c02863c1f5cdae420000000001f54141561016052600e54610180526101605115610bb757610140516101605161018051336101a052610180516101c052610140516101e052600061020052610200516101e0516101c0516101a051600658016121dd565b6101805261016052610140526000505b610180805160043580821061328a5780820390509050815250600d3360e05260c052604060c0205460043580821061328a57808203905090506101a0526101a051600d3360e05260c052604060c0205561018051600e556101405161016051610180516101a051336101c0526101a0516101e0526101805161020052610200516101e0516101c05160065801611fe4565b6101a0526101805261016052610140526000506101605115610de6576c02863c1f5cdae420000000001e546101c05260006101c0511115610de55760046004602082066102400160208284011161328a576c02863c1f5cdae42000000000276102606020840161012060006001818352015b82610120516020021115610ccd57610cef565b61012051850154610120516020028501525b8151600101808352811415610cba575b5050505050818152809050905090508051602001806101e08284600060045af11561328a57505060006101e0806020015160008251806020901361328a578091901261328a57806020036101000a82049050905090501815610de45760006101e060048060208461024001018260208501600060045af1505080518201915050600435602082610240010152602081019050806102405261024090508051602001806102c08284600060045af11561328a575050600060006102c0516102e060006101c05174010000000000000000000000000000000000000000808206905090508060a01c61328a578090505af11561328a575b5b5b6020610260604463a9059cbb6101c052336101e052600435610200526101dc60006009545af11561328a57601f3d111561328a57600050610260505b60043561016052337f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243646020610160a2600435610160526000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610160a36000600355005b63a9059cbb811415610ee65760045461328a57600160045560043560a01c61328a573361014052600435610160526024356101805261018051610160516101405160065801612f68565b6000506001600052600060045560206000f35b6323b872dd811415610fd65760055461328a57600160055560043560a01c61328a5760243560a01c61328a57600f60043560e05260c052604060c0203360e05260c052604060c02054610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610140511815610f91576101405160443580821061328a5780820390509050600f60043560e05260c052604060c0203360e05260c052604060c020555b6101405160043561016052602435610180526044356101a0526101a051610180516101605160065801612f68565b610140526000506001600052600060055560206000f35b63095ea7b38114156110495760043560a01c61328a57602435600f3360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f35b63395093518114156110f25760043560a01c61328a57600f3360e05260c052604060c02060043560e05260c052604060c02054602435818183011061328a57808201905090506101405261014051600f3360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f35b63a457c2d78114156111995760043560a01c61328a57600f3360e05260c052604060c02060043560e05260c052604060c0205460243580821061328a57808203905090506101405261014051600f3360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f35b6347d2d5d381141561194e5760065461328a57600160065560043560a01c61328a576000610120525b610120516044013560a01c61328a5760206101205101610120526101006101205110156111ee576111c2565b6c02863c1f5cdae420000000002c5433141561328a57600954610140526c02863c1f5cdae420000000001e5474010000000000000000000000000000000000000000808206905090508060a01c61328a5780905061016052600e546101805260006c02863c1f5cdae420000000001f5418156112b35761014051610160516101805160006101a052610180516101c05260006101e052600061020052610200516101e0516101c0516101a051600658016121dd565b6101805261016052610140526000505b60006101605118156114455760046004602082066102000160208284011161328a576c02863c1f5cdae42000000000276102206020840161012060006001818352015b826101205160200211156113095761132b565b61012051850154610120516020028501525b81516001018083528114156112f6575b5050505050818152809050905090508051602001806101a08284600060045af11561328a57505060006101a0806020015160008251806020901361328a578091901261328a57806020036101000a820490509050905018156114445760006101805118156114055760006101a060048060208461020001018260208501600060045af150508051820191505061018051602082610200010152602081019050806102005261020090508051602001806102808284600060045af11561328a57505060006000610280516102a06000610160515af11561328a575b60206102a0604463095ea7b361020052610160516102205260006102405261021c6000610140515af11561328a57601f3d111561328a576000506102a0505b5b60006004351815611814576000604435181561328a5760006004353b111561328a5760006004602082066102000160208284011161328a5760246102206020840161012060006001818352015b826101205160200211156114a5576114ca565b61012051602002850135610120516020028501525b8151600101808352811415611492575b5050505050818152809050905090508051602001806101a08284600060045af11561328a57505060046004602082066102600160208284011161328a5760246102806020840161012060006001818352015b8261012051602002111561152f57611554565b61012051602002850135610120516020028501525b815160010180835281141561151c575b5050505050818152809050905090508051602001806102008284600060045af11561328a57505060006101a0806020015160008251806020901361328a578091901261328a57806020036101000a820490509050905018156117e157600061018051181561328a576020610300604463095ea7b361026052600435610280527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6102a05261027c6000610140515af11561328a57601f3d111561328a576000506103005060006101a060048060208461026001018260208501600060045af150508051820191505061018051602082610260010152602081019050806102605261026090508051602001806102e08284600060045af11561328a575050600060006102e05161030060006004355af11561328a5760206102e060246370a0823161026052306102805261027c610140515afa1561328a57601f3d111561328a576000506102e05161328a57600061020060048060208461026001018260208501600060045af150508051820191505061018051602082610260010152602081019050806102605261026090508051602001806102e08284600060045af11561328a575050600060006102e05161030060006004355af11561328a576101805160206102e060246370a0823161026052306102805261027c610140515afa1561328a57601f3d111561328a576000506102e051141561328a5760006101a060048060208461026001018260208501600060045af150508051820191505061018051602082610260010152602081019050806102605261026090508051602001806102e08284600060045af11561328a575050600060006102e05161030060006004355af11561328a57611813565b610200806020015160008251806020901361328a578091901261328a57806020036101000a820490509050905061328a575b5b6004356c02863c1f5cdae420000000001e556024356c02863c1f5cdae4200000000027556101a060006008818352015b60016101a051600881101561328a57026c02863c1f5cdae420000000001f01546101c05260446101a051600881101561328a5760200201356101e05260006101c051181561189f576101e0516101c051141561328a576118da565b60006101e05118156118d4576101e05160016101a051600881101561328a57026c02863c1f5cdae420000000001f01556118d9565b6118eb565b5b5b8151600101808352811415611844575b5050600060043518156119475761014051610160516101805160006101a052610180516101c05260006101e052600061020052610200516101e0516101c0516101a051600658016121dd565b6101805261016052610140526000505b6000600655005b6390b2299781141561198e5760043560011c61328a576c02863c1f5cdae420000000002c5433141561328a576004356c02863c1f5cdae420000000002e55005b636b441a408114156119fc5760043560a01c61328a576c02863c1f5cdae420000000002c5433141561328a576004356c02863c1f5cdae420000000002d55600435610140527f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e96020610140a1005b63e5ea47b8811415611a6a576c02863c1f5cdae420000000002d54610140526101405133141561328a57610140516c02863c1f5cdae420000000002c5561014051610160527febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056020610160a1005b63de94926c811415611a825760075460005260206000f35b63bfe10928811415611a9a5760085460005260206000f35b6382c63066811415611ab25760095460005260206000f35b63f77c4791811415611aca57600a5460005260206000f35b63dfe05031811415611ae257600b5460005260206000f35b63be5d1be9811415611afa57600c5460005260206000f35b6370a08231811415611b2a5760043560a01c61328a57600d60043560e05260c052604060c0205460005260206000f35b6318160ddd811415611b4257600e5460005260206000f35b63dd62ed3e811415611b8a5760043560a01c61328a5760243560a01c61328a57600f60043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6306fdde03811415611c2757601080610180602082540161012060006003818352015b82610120516020021115611bc057611be2565b61012051850154610120516020028501525b8151600101808352811415611bad575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6395d89b41811415611cc457601480610180602082540161012060006002818352015b82610120516020021115611c5d57611c7f565b61012051850154610120516020028501525b8151600101808352811415611c4a575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6313ecb1ca811415611cf45760043560a01c61328a57601760043560e05260c052604060c0205460005260206000f35b6317e28089811415611d0c5760185460005260206000f35b63ef78d4fd811415611d245760195460005260206000f35b637598108c811415611d585760016004356c01431e0fae6d7217caa000000081101561328a5702601a015460005260206000f35b63fec8ee0c811415611d985760016004356c01431e0fae6d7217caa000000081101561328a57026c01431e0fae6d7210000000001a015460005260206000f35b63de263bfa811415611dd45760043560a01c61328a576c02863c1f5cdae420000000001a60043560e05260c052604060c0205460005260206000f35b639bd324f2811415611e105760043560a01c61328a576c02863c1f5cdae420000000001b60043560e05260c052604060c0205460005260206000f35b6309400707811415611e4c5760043560a01c61328a576c02863c1f5cdae420000000001c60043560e05260c052604060c0205460005260206000f35b63180692d0811415611e70576c02863c1f5cdae420000000001d5460005260206000f35b6354c49fe9811415611ea4576001600435600881101561328a57026c02863c1f5cdae420000000001f015460005260206000f35b6301ddabf1811415611ee05760043560a01c61328a576c02863c1f5cdae420000000002860043560e05260c052604060c0205460005260206000f35b6373861fb3811415611f1c5760043560a01c61328a576c02863c1f5cdae420000000002960043560e05260c052604060c0205460005260206000f35b63f05cc058811415611f705760043560a01c61328a5760243560a01c61328a576c02863c1f5cdae420000000002a60043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b63f851a440811415611f94576c02863c1f5cdae420000000002c5460005260206000f35b6317f7182a811415611fb8576c02863c1f5cdae420000000002d5460005260206000f35b639c868ac0811415611fdc576c02863c1f5cdae420000000002e5460005260206000f35b505b60006000fd5b6101a052610140526101605261018052600b546101c052602061028060246370a0823161020052610140516102205261021c6101c0515afa1561328a57601f3d111561328a57600050610280516101e052602061028060046318160ddd6102205261023c6101c0515afa1561328a57601f3d111561328a57600050610280516102005261016051602880820282158284830414171561328a5780905090509050606480820490509050610220526000610200511115612108576102208051610180516101e05180820282158284830414171561328a57809050905090506102005180801561328a57820490509050603c80820282158284830414171561328a5780905090509050606480820490509050818183011061328a57808201905090508152505b61016051610220518082111561211e5780612120565b815b905090506102205260176101405160e05260c052604060c02054610240526102205160176101405160e05260c052604060c0205560185461022051818183011061328a57808201905090506102405180821061328a578082039050905061026052610260516018556101405161028052610160516102a052610180516102c052610220516102e05261026051610300527f7ecd84343f76a23d2227290e0288da3251b045541698e575a5515af4f04197a360a0610280a16101a051565b6101c0526101405261016052610180526101a052610200366101e0376103e060006008818352015b60016103e051600881101561328a57026c02863c1f5cdae420000000001f0154610400526104005161223657612293565b610400516101e06103e051600881101561328a5760200201526c02863c1f5cdae42000000000296104005160e05260c052604060c020546102e06103e051600881101561328a5760200201525b8151600101808352811415612205575b50506c02863c1f5cdae420000000001e546103e05260006101605118156122e95760006103e05118156122e1576103e05160a01c610e10818183011061328a578082019050905042116122e4565b60005b6122ec565b60005b5b156125d257610100366104003761050060006008818352015b600161050051600881101561328a57026c02863c1f5cdae420000000001f0154610520526105205161233757612390565b60206105c060246370a0823161054052306105605261055c610520515afa1561328a57601f3d111561328a576000506105c05161040061050051600881101561328a5760200201525b8151600101808352811415612306575b50506103e05174010000000000000000000000000000000000000000808206905090508060a01c61328a578090506105005260086004602082066105200160208284011161328a576c02863c1f5cdae42000000000276105406020840161012060006001818352015b8261012051602002111561240c5761242e565b61012051850154610120516020028501525b81516001018083528114156123f9575b5050505050818152809050905090508051602001806105a08284600060045af11561328a575050600060006105a0516105c06000610500515af11561328a57610500514260a01b818183011061328a57808201905090506c02863c1f5cdae420000000001e5561052060006008818352015b6101e061052051600881101561328a57602002015161054052610540516124c6576125cf565b670de0b6b3a7640000602061060060246370a0823161058052306105a05261059c610540515afa1561328a57601f3d111561328a576000506106005161040061052051600881101561328a57602002015180821061328a578082039050905080820282158284830414171561328a57809050905090506101605180801561328a578204905090506105605260006105605111156125be576102e061052051600881101561328a5760200201805161056051818183011061328a57808201905090508152506102e061052051600881101561328a5760200201516c02863c1f5cdae42000000000296105405160e05260c052604060c020555b5b81516001018083528114156124a0575b50505b60006101405118156129b2576101a0516104005261018051156125f95761040051156125fc565b60005b15612635576c02863c1f5cdae42000000000286101405160e05260c052604060c0205461040052610400516126345761014051610400525b5b600d6101405160e05260c052604060c020546104205261044060006008818352015b6101e061044051600881101561328a576020020151610460526104605161267d576129af565b6102e061044051600881101561328a576020020151610480526c02863c1f5cdae420000000002a6104605160e05260c052604060c0206101405160e05260c052604060c020546104a05260006104c052610480516104a051101561275257610480516c02863c1f5cdae420000000002a6104605160e05260c052604060c0206101405160e05260c052604060c0205561042051610480516104a05180821061328a578082039050905080820282158284830414171561328a5780905090509050670de0b6b3a7640000808204905090506104c0525b6c02863c1f5cdae420000000002b6101405160e05260c052604060c0206104605160e05260c052604060c020546104e0526104e05160801c6104c051818183011061328a578082019050905061050052600061050051111561299e576104e0517001000000000000000000000000000000008082069050905061052052610180511561294757600060046105a0527fa9059cbb000000000000000000000000000000000000000000000000000000006105c0526105a060048060208461060001018260208501600060045af15050805182019150506104005160208261060001015260208101905061050051602082610600010152602081019050806106005261060090508051602001806106a08284600060045af11561328a57505060206107606106a0516106c06000610460515af11561328a5760203d80821115612899578061289b565b815b90509050610740526107408051602001806105408284600060045af11561328a57505060006105405118156128fd57610540806020015160008251806020901361328a578091901261328a57806020036101000a82049050905090501561328a575b6105205161050051818183011061328a57808201905090506c02863c1f5cdae420000000002b6101405160e05260c052604060c0206104605160e05260c052604060c0205561299d565b60006104c051111561299c57610520516105005160801b818183011061328a57808201905090506c02863c1f5cdae420000000002b6101405160e05260c052604060c0206104605160e05260c052604060c020555b5b5b5b8151600101808352811415612657575b50505b6101c051565b6101605261014052601954610180526001610180516c01431e0fae6d7217caa000000081101561328a5702601a01546101a0526001610180516c01431e0fae6d7217caa000000081101561328a57026c01431e0fae6d7210000000001a01546101c0526c02863c1f5cdae420000000001d546101e0526101e05161020052600c54610220526101a0516102205110612aca576008546102405260206102c0600463277dbafb6102605261027c6000610240515af11561328a57601f3d111561328a576000506102c051600c5560206102c06004632c4e722e6102605261027c610240515afa1561328a57601f3d111561328a576000506102c05161020052610200516c02863c1f5cdae420000000001d555b6c02863c1f5cdae420000000002e5415612ae55760006101e0525b6101a051421115612dff5760185461024052600a5461026052610260513b1561328a5760006000602463615e523761028052306102a05261029c6000610260515af11561328a576101a051610280526101a05162093a80818183011061328a578082019050905062093a808082049050905062093a8080820282158284830414171561328a57809050905090504280821115612b815780612b83565b815b905090506102a0526102c060006101f4818352015b6102a0516102805180821061328a57808203905090506102e05260206103c0604463d3078c946103205230610340526102805162093a808082049050905062093a8080820282158284830414171561328a57809050905090506103605261033c610260515afa1561328a57601f3d111561328a576000506103c051610300526000610240511115612da257610280516102205110612c3e576102a0516102205110612c41565b60005b15612d3d576101c080516101e0516103005180820282158284830414171561328a5780905090509050610220516102805180821061328a578082039050905080820282158284830414171561328a57809050905090506102405180801561328a57820490509050818183011061328a5780820190509050815250610200516101e0526101c080516101e0516103005180820282158284830414171561328a57809050905090506102a0516102205180821061328a578082039050905080820282158284830414171561328a57809050905090506102405180801561328a57820490509050818183011061328a5780820190509050815250612da1565b6101c080516101e0516103005180820282158284830414171561328a57809050905090506102e05180820282158284830414171561328a57809050905090506102405180801561328a57820490509050818183011061328a57808201905090508152505b5b426102a0511415612db257612dfc565b6102a051610280526102a05162093a80818183011061328a57808201905090504280821115612de15780612de3565b815b905090506102a0525b8151600101808352811415612b98575b50505b6101808051600180820180806000811215612e1657195b607f1c61328a5790509050905081525061018051601955426001610180516c01431e0fae6d7217caa000000081101561328a5702601a01556101c0516001610180516c01431e0fae6d7217caa000000081101561328a57026c01431e0fae6d7210000000001a015560176101405160e05260c052604060c02054610240526c02863c1f5cdae420000000001c6101405160e05260c052604060c0208054610240516101c0516c02863c1f5cdae420000000001a6101405160e05260c052604060c0205480821061328a578082039050905080820282158284830414171561328a5780905090509050670de0b6b3a764000080820490509050818183011061328a57808201905090508155506101c0516c02863c1f5cdae420000000001a6101405160e05260c052604060c02055426c02863c1f5cdae420000000001b6101405160e05260c052604060c0205561016051565b6101a0526101405261016052610180526101405161016051610180516101a051610140516101c0526101c051600658016129b8565b6101a0526101805261016052610140526000506101405161016051610180516101a051610160516101c0526101c051600658016129b8565b6101a052610180526101605261014052600050600061018051181561324d57600e546101c05260006c02863c1f5cdae420000000001f5414156101e0526101e05115613084576101405161016051610180516101a0516101c0516101e05161014051610200526101c0516102205260006102405260006102605261026051610240516102205161020051600658016121dd565b6101e0526101c0526101a0526101805261016052610140526000505b600d6101405160e05260c052604060c020546101805180821061328a57808203905090506102005261020051600d6101405160e05260c052604060c020556101405161016051610180516101a0516101c0516101e05161020051610140516102205261020051610240526101c0516102605261026051610240516102205160065801611fe4565b610200526101e0526101c0526101a0526101805261016052610140526000506101e051156131a4576101405161016051610180516101a0516101c0516101e0516102005161016051610220526101c0516102405260006102605260006102805261028051610260516102405161022051600658016121dd565b610200526101e0526101c0526101a0526101805261016052610140526000505b600d6101605160e05260c052604060c0205461018051818183011061328a57808201905090506102005261020051600d6101605160e05260c052604060c020556101405161016051610180516101a0516101c0516101e05161020051610160516102205261020051610240526101c0516102605261026051610240516102205160065801611fe4565b610200526101e0526101c0526101a0526101805261016052610140526000505b610180516101c05261016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101c0a36101a051565b600080fd

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.