ETH Price: $3,115.24 (+1.46%)

Contract

0xd662908ADA2Ea1916B3318327A97eB18aD588b5d
 
Transaction Hash
Method
Block
From
To
Withdraw207583402024-09-15 20:14:3561 days ago1726431275IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.001399322.35610228
Withdraw206629512024-09-02 12:41:5974 days ago1725280919IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.001826562.79125451
Claim_rewards204294202024-07-31 22:08:59107 days ago1722463739IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.001622226.37263583
Withdraw204184592024-07-30 9:24:11108 days ago1722331451IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.002038322.69494053
Withdraw203262002024-07-17 12:18:35121 days ago1721218715IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.00416127.37240889
Set_approve_depo...202604862024-07-08 8:04:47131 days ago1720425887IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.000138923.13148496
Withdraw202476072024-07-06 12:56:59132 days ago1720270619IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.001159462.25000246
Transfer202410202024-07-05 14:52:11133 days ago1720191131IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.007566839.72146046
Withdraw197385632024-04-26 9:12:59203 days ago1714122779IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.004809067.90904383
Set_approve_depo...196874712024-04-19 5:41:23211 days ago1713505283IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.000361118.13955642
Deposit196466152024-04-13 12:21:23216 days ago1713010883IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.007173210.85014704
Withdraw196304642024-04-11 6:01:59219 days ago1712815319IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0082479913.88773144
Withdraw194435262024-03-15 23:10:59245 days ago1710544259IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.026595932.93696613
Set_approve_depo...193828402024-03-07 10:56:47253 days ago1709809007IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0022636251.02285319
Set_approve_depo...191070772024-01-28 19:19:59292 days ago1706469599IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0004939411.13373973
Set_approve_depo...190838492024-01-25 13:12:47295 days ago1706188367IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0017949740.45918133
Withdraw190066952024-01-14 17:44:23306 days ago1705254263IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0140370627.24024616
Deposit189854142024-01-11 18:18:11309 days ago1704997091IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0196508527.42750952
Set_approve_depo...188815932023-12-28 3:59:35324 days ago1703735975IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0011535326.00093116
Withdraw188745072023-12-27 4:04:47325 days ago1703649887IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0063078612.24129576
Set_approve_depo...188714942023-12-26 17:56:11325 days ago1703613371IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0021499848.4613258
Set_approve_depo...186570412023-11-26 16:29:59355 days ago1701016199IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0019225743.33536584
Withdraw186504162023-11-25 18:12:11356 days ago1700935931IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.0140304324.86320853
Withdraw183619072023-10-16 9:01:35396 days ago1697446895IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.004244548.44355868
Set_approve_depo...183558122023-10-15 12:35:23397 days ago1697373323IN
Curve.fi: AAVE Liquidity Gauge
0 ETH0.00040839.20329072
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
211057282024-11-03 7:50:2313 days ago1730620223
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
209422312024-10-11 11:58:3535 days ago1728647915
0xd662908A...8aD588b5d
0 ETH
207583402024-09-15 20:14:3561 days ago1726431275
0xd662908A...8aD588b5d
0 ETH
207583402024-09-15 20:14:3561 days ago1726431275
0xd662908A...8aD588b5d
0 ETH
207583402024-09-15 20:14:3561 days ago1726431275
0xd662908A...8aD588b5d
0 ETH
207583402024-09-15 20:14:3561 days ago1726431275
0xd662908A...8aD588b5d
0 ETH
207583402024-09-15 20:14:3561 days ago1726431275
0xd662908A...8aD588b5d
0 ETH
207583402024-09-15 20:14:3561 days ago1726431275
0xd662908A...8aD588b5d
0 ETH
207583402024-09-15 20:14:3561 days ago1726431275
0xd662908A...8aD588b5d
0 ETH
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x3C0FFFF1...c94e1d238
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.8

Optimization Enabled:
N/A

Other Settings:
MIT license
# @version 0.2.8
"""
@title Liquidity Gauge v2
@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


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
BOOST_WARMUP: constant(uint256) = 2 * 7 * 86400
WEEK: constant(uint256) = 604800

minter: public(address)
crv_token: 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)
allowances: HashMap[address, HashMap[address, uint256]]

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

# caller -> recipient -> can deposit?
approved_to_deposit: public(HashMap[address, HashMap[address, bool]])

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

# deposit / withdraw / claim
reward_sigs: bytes32

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

# reward token -> claiming address -> integral
reward_integral_for: public(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__(
    _name: String[64],
    _symbol: String[32],
    _lp_token: address,
    _minter: address,
    _admin: address,
):
    """
    @notice Contract constructor
    @param _name Token full name
    @param _symbol Token symbol
    @param _lp_token Liquidity Pool contract address
    @param _minter Minter contract address
    @param _admin Admin who can kill the gauge
    """
    self.name = _name
    self.symbol = _symbol

    crv_token: address = Minter(_minter).token()
    controller: address = Minter(_minter).controller()

    self.lp_token = _lp_token
    self.minter = _minter
    self.admin = _admin
    self.crv_token = crv_token
    self.controller = controller
    self.voting_escrow = Controller(controller).voting_escrow()

    self.period_timestamp[0] = block.timestamp
    self.inflation_rate = CRV20(crv_token).rate()
    self.future_epoch_time = CRV20(crv_token).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_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) and (block.timestamp > self.period_timestamp[0] + BOOST_WARMUP):
        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(_addr: address, _total_supply: uint256):
    """
    @notice Claim pending rewards and checkpoint rewards for a user
    """
    if _total_supply == 0:
        return

    balances: uint256[MAX_REWARDS] = empty(uint256[MAX_REWARDS])
    reward_tokens: address[MAX_REWARDS] = empty(address[MAX_REWARDS])
    for i in range(MAX_REWARDS):
        token: address = self.reward_tokens[i]
        if token == ZERO_ADDRESS:
            break
        reward_tokens[i] = token
        balances[i] = ERC20(token).balanceOf(self)

    # claim from reward contract
    raw_call(self.reward_contract, slice(self.reward_sigs, 8, 4))  # dev: bad claim sig

    for i in range(MAX_REWARDS):
        token: address = reward_tokens[i]
        if token == ZERO_ADDRESS:
            break
        dI: uint256 = 10**18 * (ERC20(token).balanceOf(self) - balances[i]) / _total_supply
        if _addr == ZERO_ADDRESS:
            if dI != 0:
                self.reward_integral[token] += dI
            continue

        integral: uint256 = self.reward_integral[token] + dI
        if dI != 0:
            self.reward_integral[token] = integral

        integral_for: uint256 = self.reward_integral_for[token][_addr]
        if integral_for < integral:
            claimable: uint256 = self.balanceOf[_addr] * (integral - integral_for) / 10**18
            self.reward_integral_for[token][_addr] = integral
            response: Bytes[32] = raw_call(
                token,
                concat(
                    method_id("transfer(address,uint256)"),
                    convert(_addr, bytes32),
                    convert(claimable, bytes32),
                ),
                max_outsize=32,
            )
            if len(response) != 0:
                assert convert(response, bool)


@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:
        _token: address = self.crv_token
        self.future_epoch_time = CRV20(_token).future_epoch_time_write()
        new_rate = CRV20(_token).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.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(self.minter).minted(addr, self)


@external
@nonreentrant('lock')
def claimable_reward(_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
    """
    claimable: uint256 = ERC20(_token).balanceOf(_addr)
    if self.reward_contract != ZERO_ADDRESS:
        self._checkpoint_rewards(_addr, self.totalSupply)
    claimable = ERC20(_token).balanceOf(_addr) - claimable

    integral: uint256 = self.reward_integral[_token]
    integral_for: uint256 = self.reward_integral_for[_token][_addr]

    if integral_for < integral:
        claimable += self.balanceOf[_addr] * (integral - integral_for) / 10**18

    return claimable


@external
@nonreentrant('lock')
def claim_rewards(_addr: address = msg.sender):
    """
    @notice Claim available reward tokens for `_addr`
    @param _addr Address to claim for
    """
    self._checkpoint_rewards(_addr, self.totalSupply)


@external
@nonreentrant('lock')
def claim_historic_rewards(_reward_tokens: address[MAX_REWARDS], _addr: address = msg.sender):
    """
    @notice Claim reward tokens available from a previously-set staking contract
    @param _reward_tokens Array of reward token addresses to claim
    @param _addr Address to claim for
    """
    for token in _reward_tokens:
        if token == ZERO_ADDRESS:
            break
        integral: uint256 = self.reward_integral[token]
        integral_for: uint256 = self.reward_integral_for[token][_addr]

        if integral_for < integral:
            claimable: uint256 = self.balanceOf[_addr] * (integral - integral_for) / 10**18
            self.reward_integral_for[token][_addr] = integral
            response: Bytes[32] = raw_call(
                token,
                concat(
                    method_id("transfer(address,uint256)"),
                    convert(_addr, bytes32),
                    convert(claimable, bytes32),
                ),
                max_outsize=32,
            )
            if len(response) != 0:
                assert convert(response, bool)


@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(self.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
def set_approve_deposit(addr: address, can_deposit: bool):
    """
    @notice Set whether `addr` can deposit tokens for `msg.sender`
    @param addr Address to set approval on
    @param can_deposit bool - can this account deposit for `msg.sender`?
    """
    self.approved_to_deposit[addr][msg.sender] = can_deposit


@external
@nonreentrant('lock')
def deposit(_value: uint256, _addr: address = msg.sender):
    """
    @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
    """
    if _addr != msg.sender:
        assert self.approved_to_deposit[msg.sender][_addr], "Not approved"

    self._checkpoint(_addr)

    if _value != 0:
        reward_contract: address = self.reward_contract
        total_supply: uint256 = self.totalSupply
        if reward_contract != ZERO_ADDRESS:
            self._checkpoint_rewards(_addr, total_supply)

        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 reward_contract != ZERO_ADDRESS:
            deposit_sig: Bytes[4] = slice(self.reward_sigs, 0, 4)
            if convert(deposit_sig, uint256) != 0:
                raw_call(
                    reward_contract,
                    concat(deposit_sig, convert(_value, bytes32))
                )

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


@external
@nonreentrant('lock')
def withdraw(_value: uint256):
    """
    @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:
        reward_contract: address = self.reward_contract
        total_supply: uint256 = self.totalSupply
        if reward_contract != ZERO_ADDRESS:
            self._checkpoint_rewards(msg.sender, total_supply)

        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 reward_contract != ZERO_ADDRESS:
            withdraw_sig: Bytes[4] = slice(self.reward_sigs, 4, 4)
            if convert(withdraw_sig, uint256) != 0:
                raw_call(
                    reward_contract,
                    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)


@view
@external
def allowance(_owner : address, _spender : address) -> uint256:
    """
    @notice Check the amount of tokens that an owner allowed to a spender
    @param _owner The address which owns the funds
    @param _spender The address which will spend the funds
    @return uint256 Amount of tokens still available for the spender
    """
    return self.allowances[_owner][_spender]


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

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

        if reward_contract != ZERO_ADDRESS:
            self._checkpoint_rewards(_to, total_supply)
        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.allowances[_from][msg.sender]
    if _allowance != MAX_UINT256:
        self.allowances[_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.allowances[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.allowances[msg.sender][_spender] + _added_value
    self.allowances[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.allowances[msg.sender][_spender] - _subtracted_value
    self.allowances[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 tokens for this reward contract
    """
    assert msg.sender == self.admin

    lp_token: address = self.lp_token
    current_reward_contract: address = self.reward_contract
    total_supply: uint256 = self.totalSupply
    if current_reward_contract != ZERO_ADDRESS:
        self._checkpoint_rewards(ZERO_ADDRESS, total_supply)
        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_contract.is_contract  # dev: not a contract
        sigs: bytes32 = _sigs
        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_contract = _reward_contract
    self.reward_sigs = _sigs
    for i in range(MAX_REWARDS):
        if _reward_tokens[i] != ZERO_ADDRESS:
            self.reward_tokens[i] = _reward_tokens[i]
        elif self.reward_tokens[i] != ZERO_ADDRESS:
            self.reward_tokens[i] = ZERO_ADDRESS
        else:
            assert i != 0  # dev: no reward token
            break

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


@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":[{"type":"address","name":"provider","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false,"type":"event"},{"name":"Withdraw","inputs":[{"type":"address","name":"provider","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false,"type":"event"},{"name":"UpdateLiquidityLimit","inputs":[{"type":"address","name":"user","indexed":false},{"type":"uint256","name":"original_balance","indexed":false},{"type":"uint256","name":"original_supply","indexed":false},{"type":"uint256","name":"working_balance","indexed":false},{"type":"uint256","name":"working_supply","indexed":false}],"anonymous":false,"type":"event"},{"name":"CommitOwnership","inputs":[{"type":"address","name":"admin","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyOwnership","inputs":[{"type":"address","name":"admin","indexed":false}],"anonymous":false,"type":"event"},{"name":"Transfer","inputs":[{"type":"address","name":"_from","indexed":true},{"type":"address","name":"_to","indexed":true},{"type":"uint256","name":"_value","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"type":"address","name":"_owner","indexed":true},{"type":"address","name":"_spender","indexed":true},{"type":"uint256","name":"_value","indexed":false}],"anonymous":false,"type":"event"},{"outputs":[],"inputs":[{"type":"string","name":"_name"},{"type":"string","name":"_symbol"},{"type":"address","name":"_lp_token"},{"type":"address","name":"_minter"},{"type":"address","name":"_admin"}],"stateMutability":"nonpayable","type":"constructor"},{"name":"decimals","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":261},{"name":"integrate_checkpoint","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1997},{"name":"user_checkpoint","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"addr"}],"stateMutability":"nonpayable","type":"function","gas":2070619},{"name":"claimable_tokens","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"addr"}],"stateMutability":"nonpayable","type":"function","gas":1989830},{"name":"claimable_reward","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_addr"},{"type":"address","name":"_token"}],"stateMutability":"nonpayable","type":"function","gas":1023787},{"name":"claim_rewards","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function"},{"name":"claim_rewards","outputs":[],"inputs":[{"type":"address","name":"_addr"}],"stateMutability":"nonpayable","type":"function"},{"name":"claim_historic_rewards","outputs":[],"inputs":[{"type":"address[8]","name":"_reward_tokens"}],"stateMutability":"nonpayable","type":"function"},{"name":"claim_historic_rewards","outputs":[],"inputs":[{"type":"address[8]","name":"_reward_tokens"},{"type":"address","name":"_addr"}],"stateMutability":"nonpayable","type":"function"},{"name":"kick","outputs":[],"inputs":[{"type":"address","name":"addr"}],"stateMutability":"nonpayable","type":"function","gas":2075807},{"name":"set_approve_deposit","outputs":[],"inputs":[{"type":"address","name":"addr"},{"type":"bool","name":"can_deposit"}],"stateMutability":"nonpayable","type":"function","gas":35981},{"name":"deposit","outputs":[],"inputs":[{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function"},{"name":"deposit","outputs":[],"inputs":[{"type":"uint256","name":"_value"},{"type":"address","name":"_addr"}],"stateMutability":"nonpayable","type":"function"},{"name":"withdraw","outputs":[],"inputs":[{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":3148888},{"name":"allowance","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_owner"},{"type":"address","name":"_spender"}],"stateMutability":"view","type":"function","gas":1911},{"name":"transfer","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_to"},{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":12187848},{"name":"transferFrom","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_from"},{"type":"address","name":"_to"},{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":12224498},{"name":"approve","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_spender"},{"type":"uint256","name":"_value"}],"stateMutability":"nonpayable","type":"function","gas":38244},{"name":"increaseAllowance","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_spender"},{"type":"uint256","name":"_added_value"}],"stateMutability":"nonpayable","type":"function","gas":39488},{"name":"decreaseAllowance","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"_spender"},{"type":"uint256","name":"_subtracted_value"}],"stateMutability":"nonpayable","type":"function","gas":39512},{"name":"set_rewards","outputs":[],"inputs":[{"type":"address","name":"_reward_contract"},{"type":"bytes32","name":"_sigs"},{"type":"address[8]","name":"_reward_tokens"}],"stateMutability":"nonpayable","type":"function","gas":2315908},{"name":"set_killed","outputs":[],"inputs":[{"type":"bool","name":"_is_killed"}],"stateMutability":"nonpayable","type":"function","gas":36878},{"name":"commit_transfer_ownership","outputs":[],"inputs":[{"type":"address","name":"addr"}],"stateMutability":"nonpayable","type":"function","gas":38258},{"name":"accept_transfer_ownership","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":38203},{"name":"minter","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1811},{"name":"crv_token","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1841},{"name":"lp_token","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1871},{"name":"controller","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1901},{"name":"voting_escrow","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1931},{"name":"future_epoch_time","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1961},{"name":"balanceOf","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2206},{"name":"totalSupply","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2021},{"name":"name","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":8453},{"name":"symbol","outputs":[{"type":"string","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":7506},{"name":"approved_to_deposit","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"arg0"},{"type":"address","name":"arg1"}],"stateMutability":"view","type":"function","gas":2541},{"name":"working_balances","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2356},{"name":"working_supply","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2171},{"name":"period","outputs":[{"type":"int128","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2201},{"name":"period_timestamp","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"arg0"}],"stateMutability":"view","type":"function","gas":2340},{"name":"integrate_inv_supply","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"uint256","name":"arg0"}],"stateMutability":"view","type":"function","gas":2370},{"name":"integrate_inv_supply_of","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2506},{"name":"integrate_checkpoint_of","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2536},{"name":"integrate_fraction","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2566},{"name":"inflation_rate","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2381},{"name":"reward_contract","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2411},{"name":"reward_tokens","outputs":[{"type":"address","name":""}],"inputs":[{"type":"uint256","name":"arg0"}],"stateMutability":"view","type":"function","gas":2550},{"name":"reward_integral","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2686},{"name":"reward_integral_for","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"},{"type":"address","name":"arg1"}],"stateMutability":"view","type":"function","gas":2931},{"name":"admin","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2531},{"name":"future_admin","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2561},{"name":"is_killed","outputs":[{"type":"bool","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":2591}]

Deployed Bytecode

0x341561000a57600080fd5b600436101561001857613359565b600035601c5263313ce567600051141561003957601260005260206000f350005b63d31f3f6d600051141561007a57600e546c01431e0fae6d7217caa0000000811061006357600080fd5b600f60c052602060c020015460005260206000f350005b6000156102e1575b6101a0526101405261016052610180526004546101c052602061028060246370a0823161020052610140516102205261021c6101c0515afa6100c357600080fd5b601f3d116100d057600080fd5b600050610280516101e052602061028060046318160ddd6102205261023c6101c0515afa6100fd57600080fd5b601f3d1161010a57600080fd5b6000506102805161020052610160516028808202821582848304141761012f57600080fd5b8090509050905060648082049050905061022052600061020051111561017b57600f60c052602060c020546212750081818301101561016d57600080fd5b80820190509050421161017e565b60005b15610200576102208051610180516101e05180820282158284830414176101a457600080fd5b809050905090506102005180806101ba57600080fd5b820490509050603c80820282158284830414176101d657600080fd5b809050905090506064808204905090508181830110156101f557600080fd5b808201905090508152505b6101605161022051808211156102165780610218565b815b9050905061022052600c6101405160e05260c052604060c020546102405261022051600c6101405160e05260c052604060c02055600d546102205181818301101561026257600080fd5b80820190509050610240518082101561027a57600080fd5b808203905090506102605261026051600d556101405161028052610160516102a052610180516102c052610220516102e05261026051610300527f7ecd84343f76a23d2227290e0288da3251b045541698e575a5515af4f04197a360a0610280a16101a051565b600015610807575b6101805261014052610160526101605115156103055761018051565b610200366101a0376103a060006008818352015b6103a0516008811061032a57600080fd5b601660c052602060c02001546103c0526103c0511515610349576103cb565b6103c0516102a06103a0516008811061036157600080fd5b6020020152602061046060246370a082316103e05230610400526103fc6103c0515afa61038d57600080fd5b601f3d1161039a57600080fd5b600050610460516101a06103a051600881106103b557600080fd5b60200201525b8151600101808352811415610319575b505060086004602082066103a001602082840111156103e957600080fd5b60176103c06020840161012060006001818352015b8261012051602002111561041157610433565b61012051850154610120516020028501525b81516001018083528114156103fe575b5050505050818152809050905090508051602001806104208284600060045af161045c57600080fd5b5050600060006104205161044060006015545af161047957600080fd5b6103a060006008818352015b6102a06103a0516008811061049957600080fd5b60200201516103c0526103c05115156104b1576107ff565b670de0b6b3a7640000602061048060246370a0823161040052306104205261041c6103c0515afa6104e157600080fd5b601f3d116104ee57600080fd5b600050610480516101a06103a0516008811061050957600080fd5b60200201518082101561051b57600080fd5b80820390509050808202821582848304141761053657600080fd5b8090509050905061016051808061054c57600080fd5b8204905090506103e0526101405115156105a25760006103e051181561059d5760186103c05160e05260c052604060c02080546103e05181818301101561059257600080fd5b808201905090508155505b6107ef565b60186103c05160e05260c052604060c020546103e0518181830110156105c757600080fd5b808201905090506104005260006103e05118156105f5576104005160186103c05160e05260c052604060c020555b60196103c05160e05260c052604060c0206101405160e05260c052604060c0205461042052610400516104205110156107ee5760066101405160e05260c052604060c0205461040051610420518082101561064f57600080fd5b80820390509050808202821582848304141761066a57600080fd5b80905090509050670de0b6b3a764000080820490509050610440526104005160196103c05160e05260c052604060c0206101405160e05260c052604060c02055600060046104c0527fa9059cbb000000000000000000000000000000000000000000000000000000006104e0526104c060048060208461052001018260208501600060045af15050805182019150506101405160208261052001015260208101905061044051602082610520010152602081019050806105205261052090508051602001806105c08284600060045af161074357600080fd5b505060206106806105c0516105e060006103c0515af161076257600080fd5b60203d808211156107735780610775565b815b90509050610660526106608051602001806104608284600060045af161079a57600080fd5b505060006104605118156107ed576104608060200151600082518060209013156107c357600080fd5b80919012156107d157600080fd5b806020036101000a820490509050905015156107ec57600080fd5b5b5b5b8151600101808352811415610485575b505061018051565b600015610e0d575b6101605261014052600e5461018052610180516c01431e0fae6d7217caa0000000811061083b57600080fd5b600f60c052602060c02001546101a052610180516c01431e0fae6d7217caa0000000811061086857600080fd5b601060c052602060c02001546101c0526014546101e0526101e05161020052600554610220526101a05161022051101515610921576001546102405260206102c0600463b26b238e6102605261027c6000610240515af16108c857600080fd5b601f3d116108d557600080fd5b6000506102c05160055560206102c06004632c4e722e6102605261027c610240515afa61090157600080fd5b601f3d1161090e57600080fd5b6000506102c05161020052610200516014555b601c54156109305760006101e0525b6101a051421115610cb857600d546102405260035461026052610260513b61095757600080fd5b60006000602463615e523761028052306102a05261029c6000610260515af161097f57600080fd5b6101a051610280526101a05162093a8081818301101561099e57600080fd5b8082019050905062093a808082049050905062093a8080820282158284830414176109c857600080fd5b8090509050905042808211156109de57806109e0565b815b905090506102a0526102c060006101f4818352015b6102a0516102805180821015610a0a57600080fd5b808203905090506102e05260206103c0604463d3078c946103205230610340526102805162093a808082049050905062093a808082028215828483041417610a5157600080fd5b809050905090506103605261033c610260515afa610a6e57600080fd5b601f3d11610a7b57600080fd5b6000506103c051610300526000610240511115610c55576102805161022051101515610aaf576102a0516102205110610ab2565b60005b15610bde576101c080516101e051610300518082028215828483041417610ad857600080fd5b80905090509050610220516102805180821015610af457600080fd5b808203905090508082028215828483041417610b0f57600080fd5b80905090509050610240518080610b2557600080fd5b820490509050818183011015610b3a57600080fd5b80820190509050815250610200516101e0526101c080516101e051610300518082028215828483041417610b6d57600080fd5b809050905090506102a0516102205180821015610b8957600080fd5b808203905090508082028215828483041417610ba457600080fd5b80905090509050610240518080610bba57600080fd5b820490509050818183011015610bcf57600080fd5b80820190509050815250610c54565b6101c080516101e051610300518082028215828483041417610bff57600080fd5b809050905090506102e0518082028215828483041417610c1e57600080fd5b80905090509050610240518080610c3457600080fd5b820490509050818183011015610c4957600080fd5b808201905090508152505b5b426102a0511415610c6557610cb5565b6102a051610280526102a05162093a80818183011015610c8457600080fd5b808201905090504280821115610c9a5780610c9c565b815b905090506102a0525b81516001018083528114156109f5575b50505b6101808051600180820180806000811215610ccf57195b607f1c15610cdc57600080fd5b90509050905081525061018051600e5542610180516c01431e0fae6d7217caa00000008110610d0a57600080fd5b600f60c052602060c02001556101c051610180516c01431e0fae6d7217caa00000008110610d3757600080fd5b601060c052602060c0200155600c6101405160e05260c052604060c020546102405260136101405160e05260c052604060c0208054610240516101c05160116101405160e05260c052604060c0205480821015610d9357600080fd5b808203905090508082028215828483041417610dae57600080fd5b80905090509050670de0b6b3a764000080820490509050818183011015610dd457600080fd5b808201905090508155506101c05160116101405160e05260c052604060c020554260126101405160e05260c052604060c0205561016051565b634b8200936000511415610eab5760043560a01c15610e2b57600080fd5b600435331415610e3c576001610e42565b60005433145b5b610e4c57600080fd5b60043561014052610140516006580161080f565b60005060043561014052600660043560e05260c052604060c02054610160526007546101805261018051610160516101405160065801610082565b600050600160005260206000f350005b63331345836000511415610f515760043560a01c15610ec957600080fd5b60043561014052610140516006580161080f565b600050601360043560e05260c052604060c0205460206101e06044638b752bb06101405260043561016052306101805261015c6000545afa610f1e57600080fd5b601f3d11610f2b57600080fd5b6000506101e05180821015610f3f57600080fd5b8082039050905060005260206000f350005b6333fd6f74600051141561113d5762ffffff5415610f6e57600080fd5b600162ffffff5560043560a01c15610f8557600080fd5b60243560a01c15610f9557600080fd5b60206101e060246370a08231610160526004356101805261017c6024355afa610fbd57600080fd5b601f3d11610fca57600080fd5b6000506101e051610140526000601554181561100b576101405160043561016052600754610180526101805161016051600658016102e9565b610140526000505b60206101e060246370a08231610160526004356101805261017c6024355afa61103357600080fd5b601f3d1161104057600080fd5b6000506101e051610140518082101561105857600080fd5b8082039050905061014052601860243560e05260c052604060c0205461016052601960243560e05260c052604060c02060043560e05260c052604060c020546101805261016051610180511015611120576101408051600660043560e05260c052604060c020546101605161018051808210156110d457600080fd5b8082039050905080820282158284830414176110ef57600080fd5b80905090509050670de0b6b3a76400008082049050905081818301101561111557600080fd5b808201905090508152505b61014051600052600062ffffff5560206000f350600062ffffff55005b63e6f1daf2600051141561115557336101405261118b565b6384e9bd7e60005114156111835760043560a01c1561117357600080fd5b602060046101403760005061118b565b6000156111d5575b62ffffff541561119a57600080fd5b600162ffffff55610140516101405161016052600754610180526101805161016051600658016102e9565b61014052600050600062ffffff55005b63b9fa7a6960005114156111ed573361014052611225565b637a22ef67600051141561121d576101043560a01c1561120c57600080fd5b602061010461014037600050611225565b6000156114c9575b62ffffff541561123457600080fd5b600162ffffff556000610120525b610120516004013560a01c1561125757600080fd5b602061012051016101205261010061012051101561127457611242565b61018060006008818352015b60206101805102600401356101605261016051151561129e576114be565b60186101605160e05260c052604060c020546101a05260196101605160e05260c052604060c0206101405160e05260c052604060c020546101c0526101a0516101c05110156114ad5760066101405160e05260c052604060c020546101a0516101c0518082101561130e57600080fd5b80820390509050808202821582848304141761132957600080fd5b80905090509050670de0b6b3a7640000808204905090506101e0526101a05160196101605160e05260c052604060c0206101405160e05260c052604060c0205560006004610260527fa9059cbb00000000000000000000000000000000000000000000000000000000610280526102606004806020846102c001018260208501600060045af1505080518201915050610140516020826102c00101526020810190506101e0516020826102c0010152602081019050806102c0526102c090508051602001806103608284600060045af161140257600080fd5b50506020610420610360516103806000610160515af161142157600080fd5b60203d808211156114325780611434565b815b90509050610400526104008051602001806102008284600060045af161145957600080fd5b505060006102005118156114ac5761020080602001516000825180602090131561148257600080fd5b809190121561149057600080fd5b806020036101000a820490509050905015156114ab57600080fd5b5b5b5b8151600101808352811415611280575b5050600062ffffff55005b6396c5517560005114156116d05760043560a01c156114e757600080fd5b60045461014052601260043560e05260c052604060c020546101605260206102e0604463da020a1861024052600435610260526020610220602463010ae7576101a0526004356101c0526101bc610140515afa61154357600080fd5b601f3d1161155057600080fd5b600050610220516102805261025c610140515afa61156d57600080fd5b601f3d1161157a57600080fd5b6000506102e05161018052600660043560e05260c052604060c020546101a05260206102e060246370a08231610260526004356102805261027c6004545afa6115c257600080fd5b601f3d116115cf57600080fd5b6000506102e05115156115e35760016115ed565b6101605161018051115b5b6115f757600080fd5b6101a0516028808202821582848304141761161157600080fd5b80905090509050606480820490509050600c60043560e05260c052604060c020541161163c57600080fd5b6101405161016051610180516101a0516004356101c0526101c0516006580161080f565b6101a0526101805261016052610140526000506101405161016051610180516101a0516004356101c052600660043560e05260c052604060c020546101e05260075461020052610200516101e0516101c05160065801610082565b6101a052610180526101605261014052600050005b631d2747d460005114156117205760043560a01c156116ee57600080fd5b60243560011c156116fe57600080fd5b602435600b60043560e05260c052604060c0203360e05260c052604060c02055005b63b6b55f25600051141561173857336101405261176e565b636e553f6560005114156117665760243560a01c1561175657600080fd5b602060246101403760005061176e565b600015611b48575b62ffffff541561177d57600080fd5b600162ffffff55336101405118156117f957600b3360e05260c052604060c0206101405160e05260c052604060c0205415156117f8576308c379a061016052602061018052600c6101a0527f4e6f7420617070726f76656400000000000000000000000000000000000000006101c0526101a050606461017cfd5b5b610140516101405161016052610160516006580161080f565b6101405260005060006004351815611ad9576015546101605260075461018052600061016051181561187b57610140516101605161018051610140516101a052610180516101c0526101c0516101a051600658016102e9565b6101805261016052610140526000505b610180805160043581818301101561189257600080fd5b8082019050905081525060066101405160e05260c052604060c020546004358181830110156118c057600080fd5b808201905090506101a0526101a05160066101405160e05260c052604060c02055610180516007556101405161016051610180516101a051610140516101c0526101a0516101e0526101805161020052610200516101e0516101c05160065801610082565b6101a052610180526101605261014052600050602061028060646323b872dd6101c052336101e0523061020052600435610220526101dc60006002545af161196c57600080fd5b601f3d1161197957600080fd5b600050610280506000610160511815611ad857600060046020820661022001602082840111156119a857600080fd5b60176102406020840161012060006001818352015b826101205160200211156119d0576119f2565b61012051850154610120516020028501525b81516001018083528114156119bd575b5050505050818152809050905090508051602001806101c08284600060045af1611a1b57600080fd5b505060006101c0806020015160008251806020901315611a3a57600080fd5b8091901215611a4857600080fd5b806020036101000a82049050905090501815611ad75760006101c060048060208461022001018260208501600060045af1505080518201915050600435602082610220010152602081019050806102205261022090508051602001806102a08284600060045af1611ab857600080fd5b5050600060006102a0516102c06000610160515af1611ad657600080fd5b5b5b5b60043561016052610140517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c6020610160a2600435610160526101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610160a3600062ffffff55005b632e1a7d4d6000511415611e855762ffffff5415611b6557600080fd5b600162ffffff553361014052610140516006580161080f565b60005060006004351815611e1c5760155461014052600754610160526000610140511815611bd85761014051610160513361018052610160516101a0526101a05161018051600658016102e9565b61016052610140526000505b610160805160043580821015611bed57600080fd5b8082039050905081525060063360e05260c052604060c0205460043580821015611c1657600080fd5b80820390509050610180526101805160063360e05260c052604060c0205561016051600755610140516101605161018051336101a052610180516101c052610160516101e0526101e0516101c0516101a05160065801610082565b6101805261016052610140526000506000610140511815611dd85760046004602082066102000160208284011115611ca857600080fd5b60176102206020840161012060006001818352015b82610120516020021115611cd057611cf2565b61012051850154610120516020028501525b8151600101808352811415611cbd575b5050505050818152809050905090508051602001806101a08284600060045af1611d1b57600080fd5b505060006101a0806020015160008251806020901315611d3a57600080fd5b8091901215611d4857600080fd5b806020036101000a82049050905090501815611dd75760006101a060048060208461020001018260208501600060045af1505080518201915050600435602082610200010152602081019050806102005261020090508051602001806102808284600060045af1611db857600080fd5b505060006000610280516102a06000610140515af1611dd657600080fd5b5b5b6020610240604463a9059cbb6101a052336101c0526004356101e0526101bc60006002545af1611e0757600080fd5b601f3d11611e1457600080fd5b600050610240505b60043561014052337f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243646020610140a2600435610140526000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600062ffffff55005b63dd62ed3e6000511415611edd5760043560a01c15611ea357600080fd5b60243560a01c15611eb357600080fd5b600860043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f350005b6000156121e1575b6101a0526101405261016052610180526101405161016051610180516101a051610140516101c0526101c0516006580161080f565b6101a0526101805261016052610140526000506101405161016051610180516101a051610160516101c0526101c0516006580161080f565b6101a0526101805261016052610140526000506015546101c05260006101805118156121a4576007546101e05260006101c0511815611fe0576101405161016051610180516101a0516101c0516101e05161014051610200526101e051610220526102205161020051600658016102e9565b6101e0526101c0526101a0526101805261016052610140526000505b60066101405160e05260c052604060c02054610180518082101561200357600080fd5b80820390509050610200526102005160066101405160e05260c052604060c020556101405161016051610180516101a0516101c0516101e05161020051610140516102205261020051610240526101e0516102605261026051610240516102205160065801610082565b610200526101e0526101c0526101a05261018052610160526101405260005060006101c05118156120f5576101405161016051610180516101a0516101c0516101e0516102005161016051610220526101e051610240526102405161022051600658016102e9565b610200526101e0526101c0526101a0526101805261016052610140526000505b60066101605160e05260c052604060c020546101805181818301101561211a57600080fd5b80820190509050610200526102005160066101605160e05260c052604060c020556101405161016051610180516101a0516101c0516101e05161020051610160516102205261020051610240526101e0516102605261026051610240516102205160065801610082565b610200526101e0526101c0526101a0526101805261016052610140526000505b610180516101e05261016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101e0a36101a051565b63a9059cbb600051141561225b5762ffffff54156121fe57600080fd5b600162ffffff5560043560a01c1561221557600080fd5b3361014052600435610160526024356101805261018051610160516101405160065801611ee5565b6000506001600052600062ffffff5560206000f350600062ffffff55005b6323b872dd60005114156123745762ffffff541561227857600080fd5b600162ffffff5560043560a01c1561228f57600080fd5b60243560a01c1561229f57600080fd5b600860043560e05260c052604060c0203360e05260c052604060c02054610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101405118156123245761014051604435808210156122ff57600080fd5b80820390509050600860043560e05260c052604060c0203360e05260c052604060c020555b6101405160043561016052602435610180526044356101a0526101a051610180516101605160065801611ee5565b610140526000506001600052600062ffffff5560206000f350600062ffffff55005b63095ea7b360005114156123f15760043560a01c1561239257600080fd5b60243560083360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f350005b633950935160005114156124aa5760043560a01c1561240f57600080fd5b60083360e05260c052604060c02060043560e05260c052604060c0205460243581818301101561243e57600080fd5b80820190509050610140526101405160083360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f350005b63a457c2d760005114156125615760043560a01c156124c857600080fd5b60083360e05260c052604060c02060043560e05260c052604060c02054602435808210156124f557600080fd5b80820390509050610140526101405160083360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f350005b6347d2d5d36000511415612cc95762ffffff541561257e57600080fd5b600162ffffff5560043560a01c1561259557600080fd5b6000610120525b610120516044013560a01c156125b157600080fd5b60206101205101610120526101006101205110156125ce5761259c565b601a5433146125dc57600080fd5b60025461014052601554610160526007546101805260006101605118156127d75761014051610160516101805160006101a052610180516101c0526101c0516101a051600658016102e9565b6101805261016052610140526000506004600460208206610200016020828401111561265357600080fd5b60176102206020840161012060006001818352015b8261012051602002111561267b5761269d565b61012051850154610120516020028501525b8151600101808352811415612668575b5050505050818152809050905090508051602001806101a08284600060045af16126c657600080fd5b505060006101a08060200151600082518060209013156126e557600080fd5b80919012156126f357600080fd5b806020036101000a820490509050905018156127d657600061018051181561278f5760006101a060048060208461020001018260208501600060045af150508051820191505061018051602082610200010152602081019050806102005261020090508051602001806102808284600060045af161277057600080fd5b505060006000610280516102a06000610160515af161278e57600080fd5b5b60206102a0604463095ea7b361020052610160516102205260006102405261021c6000610140515af16127c157600080fd5b601f3d116127ce57600080fd5b6000506102a0505b5b60006004351815612b965760006004353b116127f257600080fd5b6024356101a0526000600460208206610220016020828401111561281557600080fd5b602080610240826101a0600060045af15050818152809050905090508051602001806101c08284600060045af161284b57600080fd5b50506004600460208206610280016020828401111561286957600080fd5b6020806102a0826101a0600060045af15050818152809050905090508051602001806102208284600060045af161289f57600080fd5b505060006101c08060200151600082518060209013156128be57600080fd5b80919012156128cc57600080fd5b806020036101000a82049050905090501815612b5157600061018051186128f257600080fd5b6020610320604463095ea7b3610280526004356102a0527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6102c05261029c6000610140515af161294257600080fd5b601f3d1161294f57600080fd5b6000506103205060006101c060048060208461028001018260208501600060045af150508051820191505061018051602082610280010152602081019050806102805261028090508051602001806103008284600060045af16129b157600080fd5b5050600060006103005161032060006004355af16129ce57600080fd5b602061030060246370a0823161028052306102a05261029c610140515afa6129f557600080fd5b601f3d11612a0257600080fd5b6000506103005115612a1357600080fd5b600061022060048060208461028001018260208501600060045af150508051820191505061018051602082610280010152602081019050806102805261028090508051602001806103008284600060045af1612a6e57600080fd5b5050600060006103005161032060006004355af1612a8b57600080fd5b61018051602061030060246370a0823161028052306102a05261029c610140515afa612ab657600080fd5b601f3d11612ac357600080fd5b6000506103005114612ad457600080fd5b60006101c060048060208461028001018260208501600060045af150508051820191505061018051602082610280010152602081019050806102805261028090508051602001806103008284600060045af1612b2f57600080fd5b5050600060006103005161032060006004355af1612b4c57600080fd5b612b95565b610220806020015160008251806020901315612b6c57600080fd5b8091901215612b7a57600080fd5b806020036101000a820490509050905015612b9457600080fd5b5b5b6004356015556024356017556101a060006008818352015b600060446101a05160088110612bc357600080fd5b60200201351815612c085760446101a05160088110612be157600080fd5b60200201356101a05160088110612bf757600080fd5b601660c052602060c0200155612c67565b60006101a05160088110612c1b57600080fd5b601660c052602060c02001541815612c515760006101a05160088110612c4057600080fd5b601660c052602060c0200155612c66565b60006101a05118612c6157600080fd5b612c78565b5b5b8151600101808352811415612bae575b505060006004351815612cc05761014051610160516101805160006101a052610180516101c0526101c0516101a051600658016102e9565b6101805261016052610140526000505b600062ffffff55005b6390b229976000511415612cfd5760043560011c15612ce757600080fd5b601a543314612cf557600080fd5b600435601c55005b636b441a406000511415612d5f5760043560a01c15612d1b57600080fd5b601a543314612d2957600080fd5b600435601b55600435610140527f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e96020610140a1005b63e5ea47b86000511415612dbb57601b5461014052610140513314612d8357600080fd5b61014051601a5561014051610160527febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056020610160a1005b63075461726000511415612dd75760005460005260206000f350005b6376d8b1176000511415612df35760015460005260206000f350005b6382c630666000511415612e0f5760025460005260206000f350005b63f77c47916000511415612e2b5760035460005260206000f350005b63dfe050316000511415612e475760045460005260206000f350005b63be5d1be96000511415612e635760055460005260206000f350005b6370a082316000511415612e9d5760043560a01c15612e8157600080fd5b600660043560e05260c052604060c0205460005260206000f350005b6318160ddd6000511415612eb95760075460005260206000f350005b6306fdde036000511415612f625760098060c052602060c020610180602082540161012060006003818352015b82610120516020021115612ef957612f1b565b61012051850154610120516020028501525b8151600101808352811415612ee6575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b6395d89b41600051141561300b57600a8060c052602060c020610180602082540161012060006002818352015b82610120516020021115612fa257612fc4565b61012051850154610120516020028501525b8151600101808352811415612f8f575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f350005b63e152253660005114156130635760043560a01c1561302957600080fd5b60243560a01c1561303957600080fd5b600b60043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f350005b6313ecb1ca600051141561309d5760043560a01c1561308157600080fd5b600c60043560e05260c052604060c0205460005260206000f350005b6317e2808960005114156130b957600d5460005260206000f350005b63ef78d4fd60005114156130d557600e5460005260206000f350005b637598108c6000511415613116576004356c01431e0fae6d7217caa000000081106130ff57600080fd5b600f60c052602060c020015460005260206000f350005b63fec8ee0c6000511415613157576004356c01431e0fae6d7217caa0000000811061314057600080fd5b601060c052602060c020015460005260206000f350005b63de263bfa60005114156131915760043560a01c1561317557600080fd5b601160043560e05260c052604060c0205460005260206000f350005b639bd324f260005114156131cb5760043560a01c156131af57600080fd5b601260043560e05260c052604060c0205460005260206000f350005b630940070760005114156132055760043560a01c156131e957600080fd5b601360043560e05260c052604060c0205460005260206000f350005b63180692d060005114156132215760145460005260206000f350005b63bf88a6ff600051141561323d5760155460005260206000f350005b6354c49fe96000511415613272576004356008811061325b57600080fd5b601660c052602060c020015460005260206000f350005b6373861fb360005114156132ac5760043560a01c1561329057600080fd5b601860043560e05260c052604060c0205460005260206000f350005b63f05cc05860005114156133045760043560a01c156132ca57600080fd5b60243560a01c156132da57600080fd5b601960043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f350005b63f851a440600051141561332057601a5460005260206000f350005b6317f7182a600051141561333c57601b5460005260206000f350005b639c868ac0600051141561335857601c5460005260206000f350005b5b60006000fd

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.