ETH Price: $3,298.76 (+0.80%)
Gas: 7.58 Gwei

Contract

0x65CA7Dc5CB661fC58De57B1E1aF404649a27AD35
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw215017482024-12-28 15:06:1124 days ago1735398371IN
0x65CA7Dc5...49a27AD35
0 ETH0.002049334.88697701
Withdraw183530792023-10-15 3:25:23465 days ago1697340323IN
0x65CA7Dc5...49a27AD35
0 ETH0.002576556.71609911
Withdraw174131502023-06-05 8:30:59597 days ago1685953859IN
0x65CA7Dc5...49a27AD35
0 ETH0.0079231420.80719203
Withdraw168988972023-03-24 17:38:59669 days ago1679679539IN
0x65CA7Dc5...49a27AD35
0 ETH0.0121436331.89171974
Withdraw168819242023-03-22 8:23:59672 days ago1679473439IN
0x65CA7Dc5...49a27AD35
0 ETH0.0054920814.42289745
Deposit168547442023-03-18 12:49:11675 days ago1679143751IN
0x65CA7Dc5...49a27AD35
0 ETH0.0080208318.37918048
Withdraw168405942023-03-16 13:06:47677 days ago1678972007IN
0x65CA7Dc5...49a27AD35
0 ETH0.0112622128.30492904
Deposit168338382023-03-15 14:18:47678 days ago1678889927IN
0x65CA7Dc5...49a27AD35
0 ETH0.010275826.48861063
Deposit168320832023-03-15 8:21:47679 days ago1678868507IN
0x65CA7Dc5...49a27AD35
0 ETH0.0077848417.83792342
Withdraw168289002023-03-14 21:36:23679 days ago1678829783IN
0x65CA7Dc5...49a27AD35
0 ETH0.0114611530.09845015
Withdraw168251792023-03-14 9:05:11680 days ago1678784711IN
0x65CA7Dc5...49a27AD35
0 ETH0.0125968821.96503799
Deposit168250172023-03-14 8:31:59680 days ago1678782719IN
0x65CA7Dc5...49a27AD35
0 ETH0.0119419420.07249218
Deposit168175462023-03-13 7:20:47681 days ago1678692047IN
0x65CA7Dc5...49a27AD35
0 ETH0.0084586319.38128065
Deposit168173952023-03-13 6:50:23681 days ago1678690223IN
0x65CA7Dc5...49a27AD35
0 ETH0.0074924719.31383324
Deposit168169212023-03-13 5:14:59681 days ago1678684499IN
0x65CA7Dc5...49a27AD35
0 ETH0.0086372419.79053637
Withdraw168142822023-03-12 20:20:11681 days ago1678652411IN
0x65CA7Dc5...49a27AD35
0 ETH0.0094179623.66981993
Deposit168130712023-03-12 16:15:35681 days ago1678637735IN
0x65CA7Dc5...49a27AD35
0 ETH0.0098974222.67798811
Withdraw167415282023-03-02 14:39:59691 days ago1677767999IN
0x65CA7Dc5...49a27AD35
0 ETH0.0158011527
Withdraw166903012023-02-23 9:47:59698 days ago1677145679IN
0x65CA7Dc5...49a27AD35
0 ETH0.0110483927.76836169
Withdraw166545332023-02-18 9:08:23704 days ago1676711303IN
0x65CA7Dc5...49a27AD35
0 ETH0.0098409124.73281058
Withdraw165880622023-02-09 1:57:23713 days ago1675907843IN
0x65CA7Dc5...49a27AD35
0 ETH0.0164136926.94970983
Deposit165856042023-02-08 17:39:47713 days ago1675877987IN
0x65CA7Dc5...49a27AD35
0 ETH0.0192734732
Deposit164634982023-01-22 16:20:11730 days ago1674404411IN
0x65CA7Dc5...49a27AD35
0 ETH0.0094715717.28913157
Deposit164625252023-01-22 13:05:11730 days ago1674392711IN
0x65CA7Dc5...49a27AD35
0 ETH0.0096250116.14057955
Deposit164540842023-01-21 8:49:23732 days ago1674290963IN
0x65CA7Dc5...49a27AD35
0 ETH0.0075853817.38041088
View all transactions

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 0x4Fd86Ce7...6Fb3a04bC
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.16

Optimization Enabled:
N/A

Other Settings:
default evmVersion, MIT license
# @version 0.2.16
"""
@title Liquidity Gauge v4
@author Curve Finance
@license MIT
"""

from vyper.interfaces import ERC20

implements: ERC20


interface CRV20:
    def future_epoch_time_write() -> 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 Minter:
    def token() -> address: view
    def controller() -> address: view
    def minted(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 VotingEscrowBoost:
    def adjusted_balance_of(_account: address) -> 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


struct Reward:
    token: address
    distributor: address
    period_finish: uint256
    rate: uint256
    last_update: uint256
    integral: uint256


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

MINTER: constant(address) = 0xd061D61a4d941c39E5453435B6345Dc261C2fcE0
CRV: constant(address) = 0xD533a949740bb3306d119CC777fa900bA034cd52
VOTING_ESCROW: constant(address) = 0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2
GAUGE_CONTROLLER: constant(address) = 0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB
VEBOOST_PROXY: constant(address) = 0x8E0c00ed546602fD9927DF742bbAbF726D5B0d16


lp_token: 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_count: public(uint256)
reward_tokens: public(address[MAX_REWARDS])

reward_data: public(HashMap[address, Reward])

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

# 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)
is_killed: public(bool)


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

    self.lp_token = _lp_token
    self.admin = _admin

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

    self.period_timestamp[0] = block.timestamp
    self.inflation_rate = CRV20(CRV).rate()
    self.future_epoch_time = CRV20(CRV).future_epoch_time_write()


@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 CRV token per-user.
            Effectively it calculates working balances to apply amplification
            of CRV production by CRV
    @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_balance: uint256 = VotingEscrowBoost(VEBOOST_PROXY).adjusted_balance_of(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
    """

    user_balance: uint256 = 0
    receiver: address = _receiver
    if _user != ZERO_ADDRESS:
        user_balance = self.balanceOf[_user]
        if _claim and _receiver == ZERO_ADDRESS:
            # if receiver is not explicitly declared, check if a default receiver is set
            receiver = self.rewards_receiver[_user]
            if receiver == ZERO_ADDRESS:
                # if no default receiver is set, direct claims to the user
                receiver = _user

    reward_count: uint256 = self.reward_count
    for i in range(MAX_REWARDS):
        if i == reward_count:
            break
        token: address = self.reward_tokens[i]

        integral: uint256 = self.reward_data[token].integral
        last_update: uint256 = min(block.timestamp, self.reward_data[token].period_finish)
        duration: uint256 = last_update - self.reward_data[token].last_update
        if duration != 0:
            self.reward_data[token].last_update = last_update
            if _total_supply != 0:
                integral += duration * self.reward_data[token].rate * 10**18 / _total_supply
                self.reward_data[token].integral = integral

        if _user != ZERO_ADDRESS:
            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)
                    self.claim_data[_user][token] = total_claimed + total_claimable
                elif new_claimable > 0:
                    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:
        self.future_epoch_time = CRV20(CRV).future_epoch_time_write()
        new_rate = CRV20(CRV).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(GAUGE_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(GAUGE_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 in [addr, MINTER]  # 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] - Minter(MINTER).minted(addr, self)


@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(_user: address, _reward_token: address) -> uint256:
    """
    @notice Get the number of claimable reward tokens for a user
    @param _user Account to get reward amount for
    @param _reward_token Token to get reward amount for
    @return uint256 Claimable reward token amount
    """
    integral: uint256 = self.reward_data[_reward_token].integral
    total_supply: uint256 = self.totalSupply
    if total_supply != 0:
        last_update: uint256 = min(block.timestamp, self.reward_data[_reward_token].period_finish)
        duration: uint256 = last_update - self.reward_data[_reward_token].last_update
        integral += (duration * self.reward_data[_reward_token].rate * 10**18 / total_supply)

    integral_for: uint256 = self.reward_integral_for[_reward_token][_user]
    new_claimable: uint256 = self.balanceOf[_user] * (integral - integral_for) / 10**18

    return shift(self.claim_data[_user][_reward_token], -128) + new_claimable


@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
    """
    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_count != 0
        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)

    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_count != 0
        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)

        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_count != 0
        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
def add_reward(_reward_token: address, _distributor: address):
    """
    @notice Set the active reward contract
    """
    assert msg.sender == self.admin  # dev: only owner

    reward_count: uint256 = self.reward_count
    assert reward_count < MAX_REWARDS
    assert self.reward_data[_reward_token].distributor == ZERO_ADDRESS

    self.reward_data[_reward_token].distributor = _distributor
    self.reward_tokens[reward_count] = _reward_token
    self.reward_count = reward_count + 1


@external
def set_reward_distributor(_reward_token: address, _distributor: address):
    current_distributor: address = self.reward_data[_reward_token].distributor

    assert msg.sender == current_distributor or msg.sender == self.admin
    assert current_distributor != ZERO_ADDRESS
    assert _distributor != ZERO_ADDRESS

    self.reward_data[_reward_token].distributor = _distributor


@external
@nonreentrant("lock")
def deposit_reward_token(_reward_token: address, _amount: uint256):
    assert msg.sender == self.reward_data[_reward_token].distributor

    self._checkpoint_rewards(ZERO_ADDRESS, self.totalSupply, False, ZERO_ADDRESS)

    response: Bytes[32] = raw_call(
        _reward_token,
        concat(
            method_id("transferFrom(address,address,uint256)"),
            convert(msg.sender, bytes32),
            convert(self, bytes32),
            convert(_amount, bytes32),
        ),
        max_outsize=32,
    )
    if len(response) != 0:
        assert convert(response, bool)

    period_finish: uint256 = self.reward_data[_reward_token].period_finish
    if block.timestamp >= period_finish:
        self.reward_data[_reward_token].rate = _amount / WEEK
    else:
        remaining: uint256 = period_finish - block.timestamp
        leftover: uint256 = remaining * self.reward_data[_reward_token].rate
        self.reward_data[_reward_token].rate = (_amount + leftover) / WEEK

    self.reward_data[_reward_token].last_update = block.timestamp
    self.reward_data[_reward_token].period_finish = block.timestamp + WEEK


@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 mint CRV
    @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":"_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":3123352},{"stateMutability":"nonpayable","type":"function","name":"claimable_tokens","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3038594},{"stateMutability":"view","type":"function","name":"claimed_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3006},{"stateMutability":"view","type":"function","name":"claimable_reward","inputs":[{"name":"_user","type":"address"},{"name":"_reward_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":20225},{"stateMutability":"nonpayable","type":"function","name":"set_rewards_receiver","inputs":[{"name":"_receiver","type":"address"}],"outputs":[],"gas":35643},{"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":3137443},{"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":18062446},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":18100396},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":39421},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_added_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":41965},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_subtracted_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":41989},{"stateMutability":"nonpayable","type":"function","name":"add_reward","inputs":[{"name":"_reward_token","type":"address"},{"name":"_distributor","type":"address"}],"outputs":[],"gas":113003},{"stateMutability":"nonpayable","type":"function","name":"set_reward_distributor","inputs":[{"name":"_reward_token","type":"address"},{"name":"_distributor","type":"address"}],"outputs":[],"gas":40753},{"stateMutability":"nonpayable","type":"function","name":"deposit_reward_token","inputs":[{"name":"_reward_token","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[],"gas":1540169},{"stateMutability":"nonpayable","type":"function","name":"set_killed","inputs":[{"name":"_is_killed","type":"bool"}],"outputs":[],"gas":38115},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":40045},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[],"gas":39990},{"stateMutability":"view","type":"function","name":"lp_token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3048},{"stateMutability":"view","type":"function","name":"future_epoch_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3078},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3323},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3138},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3598},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":13428},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":11181},{"stateMutability":"view","type":"function","name":"working_balances","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3473},{"stateMutability":"view","type":"function","name":"working_supply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3288},{"stateMutability":"view","type":"function","name":"period","inputs":[],"outputs":[{"name":"","type":"int128"}],"gas":3318},{"stateMutability":"view","type":"function","name":"period_timestamp","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3393},{"stateMutability":"view","type":"function","name":"integrate_inv_supply","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3423},{"stateMutability":"view","type":"function","name":"integrate_inv_supply_of","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3623},{"stateMutability":"view","type":"function","name":"integrate_checkpoint_of","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3653},{"stateMutability":"view","type":"function","name":"integrate_fraction","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3683},{"stateMutability":"view","type":"function","name":"inflation_rate","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3498},{"stateMutability":"view","type":"function","name":"reward_count","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3528},{"stateMutability":"view","type":"function","name":"reward_tokens","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3603},{"stateMutability":"view","type":"function","name":"reward_data","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"token","type":"address"},{"name":"distributor","type":"address"},{"name":"period_finish","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"last_update","type":"uint256"},{"name":"integral","type":"uint256"}],"gas":15033},{"stateMutability":"view","type":"function","name":"rewards_receiver","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"address"}],"gas":3833},{"stateMutability":"view","type":"function","name":"reward_integral_for","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":4078},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3678},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3708},{"stateMutability":"view","type":"function","name":"is_killed","inputs":[],"outputs":[{"name":"","type":"bool"}],"gas":3738}]

Deployed Bytecode

0x600436101561000d57611b44565b600035601c5260005134612c3d5763313ce56781141561003257601260005260206000f35b63d31f3f6d8114156100665760016014546c01431e0fae6d7217caa0000000811015612c3d57026015015460005260206000f35b634b8200938114156101475760043560a01c612c3d576004356101605273d061d61a4d941c39e5453435b6345dc261c2fce06101805260006101405261014061012060006002818352015b6101205160200261016001513314156100cd57600183526100de565b5b81516001018083528114156100b1575b5050506101405115612c3d5760043561014052610140516006580161231f565b60005060043561014052600860043560e05260c052604060c02054610160526009546101805261018051610160516101405160065801611b4a565b600050600160005260206000f35b63331345838114156101f35760043560a01c612c3d5760043561014052610140516006580161231f565b6000506c02863c1f5cdae420000000001760043560e05260c052604060c0205460206101e06044638b752bb06101405260043561016052306101805261015c73d061d61a4d941c39e5453435b6345dc261c2fce05afa15612c3d57601f3d1115612c3d576000506101e051808210612c3d578082039050905060005260206000f35b63e77e74378114156102605760043560a01c612c3d5760243560a01c612c3d576c02863c1f5cdae420000000002560043560e05260c052604060c02060243560e05260c052604060c020547001000000000000000000000000000000008082069050905060005260206000f35b6333fd6f748114156104775760043560a01c612c3d5760243560a01c612c3d5760056c02863c1f5cdae420000000002260243560e05260c052604060c0200154610140526009546101605260006101605118156103ab574260026c02863c1f5cdae420000000002260243560e05260c052604060c0200154808211156102e657806102e8565b815b90509050610180526101805160046c02863c1f5cdae420000000002260243560e05260c052604060c0200154808210612c3d57808203905090506101a05261014080516101a05160036c02863c1f5cdae420000000002260243560e05260c052604060c0200154808202821582848304141715612c3d5780905090509050670de0b6b3a7640000808202821582848304141715612c3d578090509050905061016051808015612c3d578204905090508181830110612c3d57808201905090508152505b6c02863c1f5cdae420000000002460243560e05260c052604060c02060043560e05260c052604060c0205461018052600860043560e05260c052604060c020546101405161018051808210612c3d5780820390509050808202821582848304141715612c3d5780905090509050670de0b6b3a7640000808204905090506101a0526c02863c1f5cdae420000000002560043560e05260c052604060c02060243560e05260c052604060c0205460801c6101a0518181830110612c3d578082019050905060005260206000f35b63bdf981168114156104ad5760043560a01c612c3d576004356c02863c1f5cdae42000000000233360e05260c052604060c02055005b63e6f1daf28114156104c9573361014052600061016052610532565b6384e9bd7e8114156104f55760006101605260043560a01c612c3d576020600461014037600050610532565b639faceb1b81141561052d5760043560a01c612c3d57602060046101403760243560a01c612c3d576020602461016037600050610532565b6105a6565b600054612c3d57600160005560006101605118156105565733610140511415612c3d575b610140516101605161014051610180526009546101a05260016101c052610160516101e0526101e0516101c0516101a0516101805160065801611d88565b61016052610140526000506000600055005b6396c551758114156107a85760043560a01c612c3d576c02863c1f5cdae420000000001660043560e05260c052604060c020546101405260206102c0604463da020a1861022052600435610240526020610200602463010ae757610180526004356101a05261019c735f3b5dfeb7b28cdbd7faba78963ee202a494e2a25afa15612c3d57601f3d1115612c3d57600050610200516102605261023c735f3b5dfeb7b28cdbd7faba78963ee202a494e2a25afa15612c3d57601f3d1115612c3d576000506102c05161016052600860043560e05260c052604060c020546101805260206102c060246370a08231610240526004356102605261025c735f3b5dfeb7b28cdbd7faba78963ee202a494e2a25afa15612c3d57601f3d1115612c3d576000506102c0516106d75760016106e1565b6101405161016051115b5b15612c3d57610180516028808202821582848304141715612c3d5780905090509050606480820490509050601260043560e05260c052604060c020541115612c3d576101405161016051610180516004356101a0526101a0516006580161231f565b6101805261016052610140526000506101405161016051610180516004356101a052600860043560e05260c052604060c020546101c0526009546101e0526101e0516101c0516101a05160065801611b4a565b610180526101605261014052600050005b63b6b55f258114156107c457336101405260006101605261082d565b636e553f658114156107f05760006101605260243560a01c612c3d57602060246101403760005061082d565b6383df67478114156108285760243560a01c612c3d57602060246101403760443560011c612c3d57602060446101603760005061082d565b610a69565b600154612c3d57600160015561014051610160516101405161018052610180516006580161231f565b6101605261014052600050600060043518156109e85760006c02863c1f5cdae4200000000019541415610180526009546101a05261018051156108ee576101405161016051610180516101a051610140516101c0526101a0516101e052610160516102005260006102205261022051610200516101e0516101c05160065801611d88565b6101a0526101805261016052610140526000505b6101a080516004358181830110612c3d578082019050905081525060086101405160e05260c052604060c020546004358181830110612c3d57808201905090506101c0526101c05160086101405160e05260c052604060c020556101a0516009556101405161016051610180516101a0516101c051610140516101e0526101c051610200526101a0516102205261022051610200516101e05160065801611b4a565b6101c0526101a05261018052610160526101405260005060206102a060646323b872dd6101e05233610200523061022052600435610240526101fc60006006545af115612c3d57601f3d1115612c3d576000506102a0505b610140517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c61018080808060043581525050602090509050610180a26101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61018080808060043581525050602090509050610180a36000600155005b632e1a7d4d811415610a8057600061014052610aab565b6338d07436811415610aa65760243560011c612c3d576020602461014037600050610aab565b610cb1565b600254612c3d576001600255610140513361016052610160516006580161231f565b6101405260005060006004351815610c365760006c02863c1f5cdae420000000001954141561016052600954610180526101605115610b5657610140516101605161018051336101a052610180516101c052610140516101e052600061020052610200516101e0516101c0516101a05160065801611d88565b6101805261016052610140526000505b6101808051600435808210612c3d578082039050905081525060083360e05260c052604060c02054600435808210612c3d57808203905090506101a0526101a05160083360e05260c052604060c02055610180516009556101405161016051610180516101a051336101c0526101a0516101e0526101805161020052610200516101e0516101c05160065801611b4a565b6101a0526101805261016052610140526000506020610260604463a9059cbb6101c052336101e052600435610200526101dc60006006545af115612c3d57601f3d1115612c3d57600050610260505b337f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436461016080808060043581525050602090509050610160a26000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61016080808060043581525050602090509050610160a36000600255005b63a9059cbb811415610d0e57600354612c3d57600160035560043560a01c612c3d573361014052600435610160526024356101805261018051610160516101405160065801612911565b6000506001600052600060035560206000f35b6323b872dd811415610dfe57600454612c3d57600160045560043560a01c612c3d5760243560a01c612c3d57600a60043560e05260c052604060c0203360e05260c052604060c02054610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610140511815610db95761014051604435808210612c3d5780820390509050600a60043560e05260c052604060c0203360e05260c052604060c020555b6101405160043561016052602435610180526044356101a0526101a051610180516101605160065801612911565b610140526000506001600052600060045560206000f35b63095ea7b3811415610e7b5760043560a01c612c3d57602435600a3360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561014080808060243581525050602090509050610140a3600160005260206000f35b6339509351811415610f2e5760043560a01c612c3d57600a3360e05260c052604060c02060043560e05260c052604060c020546024358181830110612c3d57808201905090506101405261014051600a3360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256101608080806101405181525050602090509050610160a3600160005260206000f35b63a457c2d7811415610fdf5760043560a01c612c3d57600a3360e05260c052604060c02060043560e05260c052604060c02054602435808210612c3d57808203905090506101405261014051600a3360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256101608080806101405181525050602090509050610160a3600160005260206000f35b63e8de0d4d8114156110c55760043560a01c612c3d5760243560a01c612c3d576c02863c1f5cdae420000000002654331415612c3d576c02863c1f5cdae420000000001954610140526008610140511015612c3d5760016c02863c1f5cdae420000000002260043560e05260c052604060c0200154612c3d5760243560016c02863c1f5cdae420000000002260043560e05260c052604060c02001556004356001610140516008811015612c3d57026c02863c1f5cdae420000000001a01556101405160018181830110612c3d57808201905090506c02863c1f5cdae420000000001955005b63058a3a2481141561116f5760043560a01c612c3d5760243560a01c612c3d5760016c02863c1f5cdae420000000002260043560e05260c052604060c0200154610140526101405133141561111b57600161112d565b6c02863c1f5cdae42000000000265433145b5b15612c3d576000610140511815612c3d5760006024351815612c3d5760243560016c02863c1f5cdae420000000002260043560e05260c052604060c0200155005b6393f7aa6781141561147457600554612c3d57600160055560043560a01c612c3d5760016c02863c1f5cdae420000000002260043560e05260c052604060c0200154331415612c3d576000610140526009546101605260006101805260006101a0526101a05161018051610160516101405160065801611d88565b600050600060046101a0527f23b872dd000000000000000000000000000000000000000000000000000000006101c0526101a060048060208461020001018260208501600060045af15050805182019150503360208261020001015260208101905030602082610200010152602081019050602435602082610200010152602081019050806102005261020090508051602001806102c08284600060045af115612c3d57505060206103a06102c0516102e060006004355af115612c3d5760203d808211156112b957806112bb565b815b90509050610380526103808051602001806101408284600060045af115612c3d575050600061014051181561131d576101408060200151600082518060209013612c3d5780919012612c3d57806020036101000a820490509050905015612c3d575b60026c02863c1f5cdae420000000002260043560e05260c052604060c02001546101a0526101a051421061137e5760243562093a808082049050905060036c02863c1f5cdae420000000002260043560e05260c052604060c0200155611417565b6101a05142808210612c3d57808203905090506101c0526101c05160036c02863c1f5cdae420000000002260043560e05260c052604060c0200154808202821582848304141715612c3d57809050905090506101e0526024356101e0518181830110612c3d578082019050905062093a808082049050905060036c02863c1f5cdae420000000002260043560e05260c052604060c02001555b4260046c02863c1f5cdae420000000002260043560e05260c052604060c02001554262093a808181830110612c3d578082019050905060026c02863c1f5cdae420000000002260043560e05260c052604060c02001556000600555005b6390b229978114156114b45760043560011c612c3d576c02863c1f5cdae420000000002654331415612c3d576004356c02863c1f5cdae420000000002855005b636b441a4081141561152c5760043560a01c612c3d576c02863c1f5cdae420000000002654331415612c3d576004356c02863c1f5cdae4200000000027557f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e961014080808060043581525050602090509050610140a1005b63e5ea47b88114156115a4576c02863c1f5cdae4200000000027546101405261014051331415612c3d57610140516c02863c1f5cdae4200000000026557febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056101608080806101405181525050602090509050610160a1005b6382c630668114156115bc5760065460005260206000f35b63be5d1be98114156115d45760075460005260206000f35b6370a082318114156116045760043560a01c612c3d57600860043560e05260c052604060c0205460005260206000f35b6318160ddd81141561161c5760095460005260206000f35b63dd62ed3e8114156116645760043560a01c612c3d5760243560a01c612c3d57600a60043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6306fdde0381141561170157600b80610180602082540161012060006003818352015b8261012051602002111561169a576116bc565b61012051850154610120516020028501525b8151600101808352811415611687575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6395d89b4181141561179e57600f80610180602082540161012060006002818352015b8261012051602002111561173757611759565b61012051850154610120516020028501525b8151600101808352811415611724575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6313ecb1ca8114156117ce5760043560a01c612c3d57601260043560e05260c052604060c0205460005260206000f35b6317e280898114156117e65760135460005260206000f35b63ef78d4fd8114156117fe5760145460005260206000f35b637598108c8114156118325760016004356c01431e0fae6d7217caa0000000811015612c3d57026015015460005260206000f35b63fec8ee0c8114156118725760016004356c01431e0fae6d7217caa0000000811015612c3d57026c01431e0fae6d72100000000015015460005260206000f35b63de263bfa8114156118ae5760043560a01c612c3d576c02863c1f5cdae420000000001560043560e05260c052604060c0205460005260206000f35b639bd324f28114156118ea5760043560a01c612c3d576c02863c1f5cdae420000000001660043560e05260c052604060c0205460005260206000f35b63094007078114156119265760043560a01c612c3d576c02863c1f5cdae420000000001760043560e05260c052604060c0205460005260206000f35b63180692d081141561194a576c02863c1f5cdae42000000000185460005260206000f35b63963c94b981141561196e576c02863c1f5cdae42000000000195460005260206000f35b6354c49fe98114156119a25760016004356008811015612c3d57026c02863c1f5cdae420000000001a015460005260206000f35b6348e9c65e811415611a465760043560a01c612c3d576c02863c1f5cdae420000000002260043560e05260c052604060c0206101408080808454815250506020810190508080600185015481525050602081019050808060028501548152505060208101905080806003850154815250506020810190508080600485015481525050602081019050808060058501548152505060c09050905060c05260c051610140f35b6301ddabf1811415611a825760043560a01c612c3d576c02863c1f5cdae420000000002360043560e05260c052604060c0205460005260206000f35b63f05cc058811415611ad65760043560a01c612c3d5760243560a01c612c3d576c02863c1f5cdae420000000002460043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b63f851a440811415611afa576c02863c1f5cdae42000000000265460005260206000f35b6317f7182a811415611b1e576c02863c1f5cdae42000000000275460005260206000f35b639c868ac0811415611b42576c02863c1f5cdae42000000000285460005260206000f35b505b60006000fd5b6101a0526101405261016052610180526020610260602463bbf7408a6101e05261014051610200526101fc738e0c00ed546602fd9927df742bbabf726d5b0d165afa15612c3d57601f3d1115612c3d57600050610260516101c052602061026060046318160ddd6102005261021c735f3b5dfeb7b28cdbd7faba78963ee202a494e2a25afa15612c3d57601f3d1115612c3d57600050610260516101e052610160516028808202821582848304141715612c3d57809050905090506064808204905090506102005260006101e0511115611c89576102008051610180516101c051808202821582848304141715612c3d57809050905090506101e051808015612c3d57820490509050603c808202821582848304141715612c3d57809050905090506064808204905090508181830110612c3d57808201905090508152505b610160516102005180821115611c9f5780611ca1565b815b905090506102005260126101405160e05260c052604060c02054610220526102005160126101405160e05260c052604060c02055601354610200518181830110612c3d578082019050905061022051808210612c3d578082039050905061024052610240516013557f7ecd84343f76a23d2227290e0288da3251b045541698e575a5515af4f04197a361026080808061014051815250506020810190508080610160518152505060208101905080806101805181525050602081019050808061020051815250506020810190508080610240518152505060a090509050610260a16101a051565b6101c0526101405261016052610180526101a05260006101e0526101a051610200526000610140511815611e1c5760086101405160e05260c052604060c020546101e0526101805115611ddf576101a05115611de2565b60005b15611e1b576c02863c1f5cdae42000000000236101405160e05260c052604060c020546102005261020051611e1a5761014051610200525b5b5b6c02863c1f5cdae4200000000019546102205261024060006008818352015b61022051610240511415611e4e57612317565b6001610240516008811015612c3d57026c02863c1f5cdae420000000001a01546102605260056c02863c1f5cdae42000000000226102605160e05260c052604060c0200154610280524260026c02863c1f5cdae42000000000226102605160e05260c052604060c020015480821115611ec75780611ec9565b815b905090506102a0526102a05160046c02863c1f5cdae42000000000226102605160e05260c052604060c0200154808210612c3d57808203905090506102c05260006102c0511815611ff1576102a05160046c02863c1f5cdae42000000000226102605160e05260c052604060c02001556000610160511815611ff05761028080516102c05160036c02863c1f5cdae42000000000226102605160e05260c052604060c0200154808202821582848304141715612c3d5780905090509050670de0b6b3a7640000808202821582848304141715612c3d578090509050905061016051808015612c3d578204905090508181830110612c3d57808201905090508152506102805160056c02863c1f5cdae42000000000226102605160e05260c052604060c02001555b5b6000610140511815612306576c02863c1f5cdae42000000000246102605160e05260c052604060c0206101405160e05260c052604060c020546102e052600061030052610280516102e05110156120b957610280516c02863c1f5cdae42000000000246102605160e05260c052604060c0206101405160e05260c052604060c020556101e051610280516102e051808210612c3d5780820390509050808202821582848304141715612c3d5780905090509050670de0b6b3a764000080820490509050610300525b6c02863c1f5cdae42000000000256101405160e05260c052604060c0206102605160e05260c052604060c02054610320526103205160801c610300518181830110612c3d57808201905090506103405260006103405111156123055761032051700100000000000000000000000000000000808206905090506103605261018051156122ae57600060046103e0527fa9059cbb00000000000000000000000000000000000000000000000000000000610400526103e060048060208461044001018260208501600060045af15050805182019150506102005160208261044001015260208101905061034051602082610440010152602081019050806104405261044090508051602001806104e08284600060045af115612c3d57505060206105a06104e0516105006000610260515af115612c3d5760203d808211156122005780612202565b815b90509050610580526105808051602001806103808284600060045af115612c3d5750506000610380511815612264576103808060200151600082518060209013612c3d5780919012612c3d57806020036101000a820490509050905015612c3d575b61036051610340518181830110612c3d57808201905090506c02863c1f5cdae42000000000256101405160e05260c052604060c0206102605160e05260c052604060c02055612304565b600061030051111561230357610360516103405160801b8181830110612c3d57808201905090506c02863c1f5cdae42000000000256101405160e05260c052604060c0206102605160e05260c052604060c020555b5b5b5b5b8151600101808352811415611e3b575b50506101c051565b6101605261014052601454610180526001610180516c01431e0fae6d7217caa0000000811015612c3d5702601501546101a0526001610180516c01431e0fae6d7217caa0000000811015612c3d57026c01431e0fae6d7210000000001501546101c0526c02863c1f5cdae4200000000018546101e0526101e05161020052600754610220526101a051610220511061244c5760206102a0600463b26b238e6102405261025c600073d533a949740bb3306d119cc777fa900ba034cd525af115612c3d57601f3d1115612c3d576000506102a05160075560206102a06004632c4e722e6102405261025c73d533a949740bb3306d119cc777fa900ba034cd525afa15612c3d57601f3d1115612c3d576000506102a05161020052610200516c02863c1f5cdae4200000000018555b6c02863c1f5cdae420000000002854156124675760006101e0525b6101a0514211156127ad5760135461024052732f50d538606fa9edd2b11e2446beb18c9d5846bb3b15612c3d5760006000602463615e523761026052306102805261027c6000732f50d538606fa9edd2b11e2446beb18c9d5846bb5af115612c3d576101a051610260526101a05162093a808181830110612c3d578082019050905062093a808082049050905062093a80808202821582848304141715612c3d5780905090509050428082111561251e5780612520565b815b90509050610280526102a060006101f4818352015b6102805161026051808210612c3d57808203905090506102c05260206103a0604463d3078c946103005230610320526102605162093a808082049050905062093a80808202821582848304141715612c3d57809050905090506103405261031c732f50d538606fa9edd2b11e2446beb18c9d5846bb5afa15612c3d57601f3d1115612c3d576000506103a0516102e0526000610240511115612750576102605161022051106125ec576102805161022051106125ef565b60005b156126eb576101c080516101e0516102e051808202821582848304141715612c3d57809050905090506102205161026051808210612c3d5780820390509050808202821582848304141715612c3d578090509050905061024051808015612c3d578204905090508181830110612c3d5780820190509050815250610200516101e0526101c080516101e0516102e051808202821582848304141715612c3d57809050905090506102805161022051808210612c3d5780820390509050808202821582848304141715612c3d578090509050905061024051808015612c3d578204905090508181830110612c3d578082019050905081525061274f565b6101c080516101e0516102e051808202821582848304141715612c3d57809050905090506102c051808202821582848304141715612c3d578090509050905061024051808015612c3d578204905090508181830110612c3d57808201905090508152505b5b42610280511415612760576127aa565b61028051610260526102805162093a808181830110612c3d5780820190509050428082111561278f5780612791565b815b90509050610280525b8151600101808352811415612535575b50505b6101808051600180820180607f1d8160801d1415612c3d578090509050905081525061018051601455426001610180516c01431e0fae6d7217caa0000000811015612c3d5702601501556101c0516001610180516c01431e0fae6d7217caa0000000811015612c3d57026c01431e0fae6d72100000000015015560126101405160e05260c052604060c02054610240526c02863c1f5cdae42000000000176101405160e05260c052604060c0208054610240516101c0516c02863c1f5cdae42000000000156101405160e05260c052604060c02054808210612c3d5780820390509050808202821582848304141715612c3d5780905090509050670de0b6b3a7640000808204905090508181830110612c3d57808201905090508155506101c0516c02863c1f5cdae42000000000156101405160e05260c052604060c02055426c02863c1f5cdae42000000000166101405160e05260c052604060c0205561016051565b6101a0526101405261016052610180526101405161016051610180516101a051610140516101c0526101c0516006580161231f565b6101a0526101805261016052610140526000506101405161016051610180516101a051610160516101c0526101c0516006580161231f565b6101a0526101805261016052610140526000506000610180511815612bf6576009546101c05260006c02863c1f5cdae42000000000195414156101e0526101e05115612a2d576101405161016051610180516101a0516101c0516101e05161014051610200526101c051610220526000610240526000610260526102605161024051610220516102005160065801611d88565b6101e0526101c0526101a0526101805261016052610140526000505b60086101405160e05260c052604060c0205461018051808210612c3d5780820390509050610200526102005160086101405160e05260c052604060c020556101405161016051610180516101a0516101c0516101e05161020051610140516102205261020051610240526101c0516102605261026051610240516102205160065801611b4a565b610200526101e0526101c0526101a0526101805261016052610140526000506101e05115612b4d576101405161016051610180516101a0516101c0516101e0516102005161016051610220526101c051610240526000610260526000610280526102805161026051610240516102205160065801611d88565b610200526101e0526101c0526101a0526101805261016052610140526000505b60086101605160e05260c052604060c02054610180518181830110612c3d5780820190509050610200526102005160086101605160e05260c052604060c020556101405161016051610180516101a0516101c0516101e05161020051610160516102205261020051610240526101c0516102605261026051610240516102205160065801611b4a565b610200526101e0526101c0526101a0526101805261016052610140526000505b61016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6101c080808061018051815250506020905090506101c0a36101a051565b600080fd

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.