ETH Price: $2,407.39 (-0.45%)

Contract

0xe7f3a90AEe824a55B0F8969b6e29698966EE0191
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw203423182024-07-19 18:17:5957 days ago1721413079IN
0xe7f3a90A...966EE0191
0 ETH0.003203787.82043638
Withdraw194086622024-03-11 1:46:35188 days ago1710121595IN
0xe7f3a90A...966EE0191
0 ETH0.0176010547.49891091
Withdraw189139522024-01-01 17:05:11257 days ago1704128711IN
0xe7f3a90A...966EE0191
0 ETH0.0048873515.23361081
Withdraw186053562023-11-19 10:47:11301 days ago1700390831IN
0xe7f3a90A...966EE0191
0 ETH0.003796716.35613629
Withdraw185263302023-11-08 9:25:23312 days ago1699435523IN
0xe7f3a90A...966EE0191
0 ETH0.0047678420.05597509
Withdraw185186572023-11-07 7:42:47313 days ago1699342967IN
0xe7f3a90A...966EE0191
0 ETH0.0053987921.18713085
Withdraw185169922023-11-07 2:05:59313 days ago1699322759IN
0xe7f3a90A...966EE0191
0 ETH0.0058788824.72957873
Withdraw184949282023-11-03 23:52:59316 days ago1699055579IN
0xe7f3a90A...966EE0191
0 ETH0.0033012513.06815982
Withdraw181463842023-09-16 4:36:11365 days ago1694838971IN
0xe7f3a90A...966EE0191
0 ETH0.002217819.22183158
Withdraw181286332023-09-13 16:41:11367 days ago1694623271IN
0xe7f3a90A...966EE0191
0 ETH0.0031164213.10924589
Withdraw181191672023-09-12 8:49:47369 days ago1694508587IN
0xe7f3a90A...966EE0191
0 ETH0.0024433510.27796761
Withdraw181073912023-09-10 17:13:23370 days ago1694366003IN
0xe7f3a90A...966EE0191
0 ETH0.002073948.9345168
Withdraw180567112023-09-03 14:58:35377 days ago1693753115IN
0xe7f3a90A...966EE0191
0 ETH0.0037931815.77390031
Withdraw179918682023-08-25 13:00:47386 days ago1692968447IN
0xe7f3a90A...966EE0191
0 ETH0.0057759423.38267231
Withdraw179702982023-08-22 12:37:23389 days ago1692707843IN
0xe7f3a90A...966EE0191
0 ETH0.0063364725.08442563
Withdraw178726302023-08-08 20:37:59403 days ago1691527079IN
0xe7f3a90A...966EE0191
0 ETH0.0061052826.30148858
Withdraw178308882023-08-03 0:26:59409 days ago1691022419IN
0xe7f3a90A...966EE0191
0 ETH0.0061181517.40539347
Withdraw178304312023-08-02 22:54:59409 days ago1691016899IN
0xe7f3a90A...966EE0191
0 ETH0.0056969623.96432903
Withdraw178131242023-07-31 12:55:11411 days ago1690808111IN
0xe7f3a90A...966EE0191
0 ETH0.0054271222.82923375
Withdraw178119452023-07-31 8:58:11412 days ago1690793891IN
0xe7f3a90A...966EE0191
0 ETH0.0032967214.20222994
Withdraw178076082023-07-30 18:23:35412 days ago1690741415IN
0xe7f3a90A...966EE0191
0 ETH0.0037727815.87022415
Withdraw177964102023-07-29 4:47:47414 days ago1690606067IN
0xe7f3a90A...966EE0191
0 ETH0.0039913615.8
Deposit177745472023-07-26 3:23:11417 days ago1690341791IN
0xe7f3a90A...966EE0191
0 ETH0.0049291819.02778173
Withdraw177665352023-07-25 0:27:35418 days ago1690244855IN
0xe7f3a90A...966EE0191
0 ETH0.0051267122.43118057
Withdraw177579792023-07-23 19:44:23419 days ago1690141463IN
0xe7f3a90A...966EE0191
0 ETH0.0056691623.84977452
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 0xdC5cD6bc...c2367Bfdf
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.12

Optimization Enabled:
N/A

Other Settings:
MIT license
# @version 0.2.12
"""
@title Liquidity Gauge v3
@author Curve Finance
@license MIT
"""

from vyper.interfaces import ERC20

implements: ERC20


interface BAO20:
    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 ERC20Extended:
    def symbol() -> String[26]: view


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

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

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

event CommitOwnership:
    admin: address

event ApplyOwnership:
    admin: address

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

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


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

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

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

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

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

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

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

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

inflation_rate: public(uint256)

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

# deposit / withdraw / claim
reward_sigs: bytes32

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

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

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

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

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


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

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

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

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

    self.period_timestamp[0] = block.timestamp
    self.inflation_rate = BAO20(bao_token).rate()
    self.future_epoch_time = BAO20(bao_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 BAO token per-user.
            Effectively it calculates working balances to apply amplification
            of BAO production by BAO
    @param addr User address
    @param l User's amount of liquidity (LP tokens)
    @param L Total amount of liquidity (LP tokens)
    """
    # To be called after totalSupply is updated
    _voting_escrow: address = self.voting_escrow
    voting_balance: uint256 = ERC20(_voting_escrow).balanceOf(addr)
    voting_total: uint256 = ERC20(_voting_escrow).totalSupply()

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

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

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


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

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

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

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

    if _user != ZERO_ADDRESS:

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

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

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

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


@internal
def _checkpoint(addr: address):
    """
    @notice Checkpoint for a user
    @param addr User address
    """
    _period: int128 = self.period
    _period_time: uint256 = self.period_timestamp[_period]
    _integrate_inv_supply: uint256 = self.integrate_inv_supply[_period]
    rate: uint256 = self.inflation_rate
    new_rate: uint256 = rate
    prev_future_epoch: uint256 = self.future_epoch_time
    if prev_future_epoch >= _period_time:
        _token: address = self.bao_token
        self.future_epoch_time = BAO20(_token).future_epoch_time_write()
        new_rate = BAO20(_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)


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


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


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


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


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


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


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


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

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

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


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

    self._checkpoint(_addr)

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

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

        self._update_liquidity_limit(_addr, new_balance, total_supply)

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

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


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

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

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

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

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

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


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

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

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

    log Transfer(_from, _to, _value)


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

    return True


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

    self._transfer(_from, _to, _value)

    return True


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

    return True


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

    log Approval(msg.sender, _spender, allowance)

    return True


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

    log Approval(msg.sender, _spender, allowance)

    return True


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

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

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

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

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

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

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

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


@external
def set_killed(_is_killed: bool):
    """
    @notice Set the killed status for this contract
    @dev When killed, the gauge always yields a rate of 0 and so cannot mint BAO
    @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":"_minter","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":4624},{"stateMutability":"nonpayable","type":"function","name":"user_checkpoint","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"bool"}],"gas":3133638},{"stateMutability":"nonpayable","type":"function","name":"claimable_tokens","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3046705},{"stateMutability":"view","type":"function","name":"reward_contract","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2718},{"stateMutability":"view","type":"function","name":"last_claim","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2544},{"stateMutability":"view","type":"function","name":"claimed_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3066},{"stateMutability":"view","type":"function","name":"claimable_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3034},{"stateMutability":"nonpayable","type":"function","name":"claimable_reward_write","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":1211018},{"stateMutability":"nonpayable","type":"function","name":"set_rewards_receiver","inputs":[{"name":"_receiver","type":"address"}],"outputs":[],"gas":35733},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[{"name":"_addr","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[{"name":"_addr","type":"address"},{"name":"_receiver","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"kick","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":3148229},{"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":17172316},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":17210266},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":38211},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_added_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":40755},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_subtracted_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":40779},{"stateMutability":"nonpayable","type":"function","name":"set_rewards","inputs":[{"name":"_reward_contract","type":"address"},{"name":"_sigs","type":"bytes32"},{"name":"_reward_tokens","type":"address[8]"}],"outputs":[],"gas":2743591},{"stateMutability":"nonpayable","type":"function","name":"set_killed","inputs":[{"name":"_is_killed","type":"bool"}],"outputs":[],"gas":38145},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":39525},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[],"gas":39470},{"stateMutability":"view","type":"function","name":"minter","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3078},{"stateMutability":"view","type":"function","name":"bao_token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3108},{"stateMutability":"view","type":"function","name":"lp_token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3138},{"stateMutability":"view","type":"function","name":"controller","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3168},{"stateMutability":"view","type":"function","name":"voting_escrow","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3198},{"stateMutability":"view","type":"function","name":"future_epoch_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3228},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3473},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3288},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3748},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":13650},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":11403},{"stateMutability":"view","type":"function","name":"working_balances","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3623},{"stateMutability":"view","type":"function","name":"working_supply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3438},{"stateMutability":"view","type":"function","name":"period","inputs":[],"outputs":[{"name":"","type":"int128"}],"gas":3468},{"stateMutability":"view","type":"function","name":"period_timestamp","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3607},{"stateMutability":"view","type":"function","name":"integrate_inv_supply","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3637},{"stateMutability":"view","type":"function","name":"integrate_inv_supply_of","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3773},{"stateMutability":"view","type":"function","name":"integrate_checkpoint_of","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3803},{"stateMutability":"view","type":"function","name":"integrate_fraction","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3833},{"stateMutability":"view","type":"function","name":"inflation_rate","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3648},{"stateMutability":"view","type":"function","name":"reward_tokens","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3787},{"stateMutability":"view","type":"function","name":"rewards_receiver","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"address"}],"gas":3923},{"stateMutability":"view","type":"function","name":"reward_integral","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3953},{"stateMutability":"view","type":"function","name":"reward_integral_for","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":4198},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3798},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3828},{"stateMutability":"view","type":"function","name":"is_killed","inputs":[],"outputs":[{"name":"","type":"bool"}],"gas":3858}]

Deployed Bytecode

0x600436101561000d576120dc565b600035601c52600051341561002157600080fd5b63313ce56781141561003857601260005260206000f35b63d31f3f6d81141561007557600d546c01431e0fae6d7217caa0000000811061006057600080fd5b600e60c052602060c020015460005260206000f35b634b82009381141561010e5760043560a01c1561009157600080fd5b6004353314156100a25760016100a8565b60005433145b6100b157600080fd5b600435610140526101405160065801612b03565b60005060043561014052600660043560e05260c052604060c020546101605260075461018052610180516101605161014051600658016120e2565b600050600160005260206000f35b63331345838114156101b05760043560a01c1561012a57600080fd5b600435610140526101405160065801612b03565b600050601260043560e05260c052604060c0205460206101e06044638b752bb06101405260043561016052306101805261015c6000545afa61017f57600080fd5b601f3d1161018c57600080fd5b6000506101e051808210156101a057600080fd5b8082039050905060005260206000f35b63bf88a6ff8114156101f65760145474010000000000000000000000000000000000000000808206905090508060a01c156101ea57600080fd5b80905060005260206000f35b633488bd198114156102115760145460a01c60005260206000f35b63e77e743781141561027e5760043560a01c1561022d57600080fd5b60243560a01c1561023d57600080fd5b601a60043560e05260c052604060c02060243560e05260c052604060c020547001000000000000000000000000000000008082069050905060005260206000f35b6333fd6f748114156102d55760043560a01c1561029a57600080fd5b60243560a01c156102aa57600080fd5b601a60043560e05260c052604060c02060243560e05260c052604060c0205460801c60005260206000f35b6359b7e40981141561038d57601e54156102ee57600080fd5b6001601e5560043560a01c1561030357600080fd5b60243560a01c1561031357600080fd5b6000601560c052602060c02054181561035d57600435610140526007546101605260006101805260006101a0526101a0516101805161016051610140516006580161230d565b6000505b601a60043560e05260c052604060c02060243560e05260c052604060c0205460801c6000526000601e5560206000f35b63bdf981168114156103bd5760043560a01c156103a957600080fd5b60043560173360e05260c052604060c02055005b63e6f1daf28114156103d9573361014052600061016052610454565b6384e9bd7e81141561040b5760006101605260043560a01c156103fb57600080fd5b6020600461014037600050610454565b639faceb1b81141561044f5760043560a01c1561042757600080fd5b602060046101403760243560a01c1561043f57600080fd5b6020602461016037600050610454565b6104d1565b601e541561046157600080fd5b6001601e5560006101605118156104815733610140511461048157600080fd5b610140516101605161014051610180526007546101a05260016101c052610160516101e0526101e0516101c0516101a051610180516006580161230d565b61016052610140526000506000601e55005b6396c551758114156106d65760043560a01c156104ed57600080fd5b60045461014052601160043560e05260c052604060c020546101605260206102e0604463da020a1861024052600435610260526020610220602463010ae7576101a0526004356101c0526101bc610140515afa61054957600080fd5b601f3d1161055657600080fd5b600050610220516102805261025c610140515afa61057357600080fd5b601f3d1161058057600080fd5b6000506102e05161018052600660043560e05260c052604060c020546101a05260206102e060246370a08231610260526004356102805261027c610140515afa6105c957600080fd5b601f3d116105d657600080fd5b6000506102e05115156105ea5760016105f4565b6101605161018051115b6105fd57600080fd5b6101a0516028808202821582848304141761061757600080fd5b80905090509050606480820490509050600b60043560e05260c052604060c020541161064257600080fd5b6101405161016051610180516101a0516004356101c0526101c05160065801612b03565b6101a0526101805261016052610140526000506101405161016051610180516101a0516004356101c052600660043560e05260c052604060c020546101e05260075461020052610200516101e0516101c051600658016120e2565b6101a052610180526101605261014052600050005b63b6b55f258114156106f257336101405260006101605261076d565b636e553f658114156107245760006101605260243560a01c1561071457600080fd5b602060246101403760005061076d565b6383df67478114156107685760243560a01c1561074057600080fd5b602060246101403760443560011c1561075857600080fd5b602060446101603760005061076d565b610b3e565b601e541561077a57600080fd5b6001601e55610140516101605161014051610180526101805160065801612b03565b610160526101405260005060006004351815610ad1576000601560c052602060c020541415610180526007546101a0526101805115610830576101405161016051610180516101a051610140516101c0526101a0516101e052610160516102005260006102205261022051610200516101e0516101c0516006580161230d565b6101a0526101805261016052610140526000505b6101a0805160043581818301101561084757600080fd5b8082019050905081525060066101405160e05260c052604060c0205460043581818301101561087557600080fd5b808201905090506101c0526101c05160066101405160e05260c052604060c020556101a0516007556101405161016051610180516101a0516101c051610140516101e0526101c051610200526101a0516102205261022051610200516101e051600658016120e2565b6101c0526101a05261018052610160526101405260005060206102a060646323b872dd6101e05233610200523061022052600435610240526101fc60006002545af161092957600080fd5b601f3d1161093657600080fd5b6000506102a0506101805115610ad1576014546101e05260006101e0511115610ad1576000600460208206610260016020828401111561097557600080fd5b60166102806020840161012060006001818352015b8261012051602002111561099d576109bf565b61012051850154610120516020028501525b815160010180835281141561098a575b5050505050818152809050905090508051602001806102008284600060045af16109e857600080fd5b50506000610200806020015160008251806020901315610a0757600080fd5b8091901215610a1557600080fd5b806020036101000a82049050905090501815610ad157600061020060048060208461026001018260208501600060045af1505080518201915050600435602082610260010152602081019050806102605261026090508051602001806102e08284600060045af1610a8557600080fd5b5050600060006102e05161030060006101e05174010000000000000000000000000000000000000000808206905090508060a01c15610ac357600080fd5b8090505af1610ad157600080fd5b60043561018052610140517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c6020610180a2600435610180526101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610180a36000601e55005b632e1a7d4d811415610b5557600061014052610b86565b6338d07436811415610b815760243560011c15610b7157600080fd5b6020602461014037600050610b86565b610f22565b601e5415610b9357600080fd5b6001601e556101405133610160526101605160065801612b03565b6101405260005060006004351815610ebb576000601560c052602060c02054141561016052600754610180526101605115610c3357610140516101605161018051336101a052610180516101c052610140516101e052600061020052610200516101e0516101c0516101a0516006580161230d565b6101805261016052610140526000505b610180805160043580821015610c4857600080fd5b8082039050905081525060063360e05260c052604060c0205460043580821015610c7157600080fd5b808203905090506101a0526101a05160063360e05260c052604060c02055610180516007556101405161016051610180516101a051336101c0526101a0516101e0526101805161020052610200516101e0516101c051600658016120e2565b6101a0526101805261016052610140526000506101605115610e77576014546101c05260006101c0511115610e775760046004602082066102400160208284011115610d1b57600080fd5b60166102606020840161012060006001818352015b82610120516020021115610d4357610d65565b61012051850154610120516020028501525b8151600101808352811415610d30575b5050505050818152809050905090508051602001806101e08284600060045af1610d8e57600080fd5b505060006101e0806020015160008251806020901315610dad57600080fd5b8091901215610dbb57600080fd5b806020036101000a82049050905090501815610e775760006101e060048060208461024001018260208501600060045af1505080518201915050600435602082610240010152602081019050806102405261024090508051602001806102c08284600060045af1610e2b57600080fd5b5050600060006102c0516102e060006101c05174010000000000000000000000000000000000000000808206905090508060a01c15610e6957600080fd5b8090505af1610e7757600080fd5b6020610260604463a9059cbb6101c052336101e052600435610200526101dc60006002545af1610ea657600080fd5b601f3d11610eb357600080fd5b600050610260505b60043561016052337f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243646020610160a2600435610160526000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610160a36000601e55005b63a9059cbb811415610f8b57601e5415610f3b57600080fd5b6001601e5560043560a01c15610f5057600080fd5b3361014052600435610160526024356101805261018051610160516101405160065801613100565b60005060016000526000601e5560206000f35b6323b872dd81141561109357601e5415610fa457600080fd5b6001601e5560043560a01c15610fb957600080fd5b60243560a01c15610fc957600080fd5b600860043560e05260c052604060c0203360e05260c052604060c02054610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61014051181561104e57610140516044358082101561102957600080fd5b80820390509050600860043560e05260c052604060c0203360e05260c052604060c020555b6101405160043561016052602435610180526044356101a0526101a051610180516101605160065801613100565b6101405260005060016000526000601e5560206000f35b63095ea7b381141561110c5760043560a01c156110af57600080fd5b60243560083360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f35b63395093518114156111c15760043560a01c1561112857600080fd5b60083360e05260c052604060c02060043560e05260c052604060c0205460243581818301101561115757600080fd5b80820190509050610140526101405160083360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f35b63a457c2d78114156112745760043560a01c156111dd57600080fd5b60083360e05260c052604060c02060043560e05260c052604060c020546024358082101561120a57600080fd5b80820390509050610140526101405160083360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f35b6347d2d5d3811415611a9f57601e541561128d57600080fd5b6001601e5560043560a01c156112a257600080fd5b6000610120525b610120516044013560a01c156112be57600080fd5b60206101205101610120526101006101205110156112db576112a9565b601b5433146112e957600080fd5b6002546101405260145474010000000000000000000000000000000000000000808206905090508060a01c1561131e57600080fd5b80905061016052600754610180526000601560c052602060c02054181561138e5761014051610160516101805160006101a052610180516101c05260006101e052600061020052610200516101e0516101c0516101a0516006580161230d565b6101805261016052610140526000505b600061016051181561153857600460046020820661020001602082840111156113b657600080fd5b60166102206020840161012060006001818352015b826101205160200211156113de57611400565b61012051850154610120516020028501525b81516001018083528114156113cb575b5050505050818152809050905090508051602001806101a08284600060045af161142957600080fd5b505060006101a080602001516000825180602090131561144857600080fd5b809190121561145657600080fd5b806020036101000a820490509050905018156115385760006101805118156114f15760006101a060048060208461020001018260208501600060045af150508051820191505061018051602082610200010152602081019050806102005261020090508051602001806102808284600060045af16114d357600080fd5b505060006000610280516102a06000610160515af16114f157600080fd5b60206102a0604463095ea7b361020052610160516102205260006102405261021c6000610140515af161152357600080fd5b601f3d1161153057600080fd5b6000506102a0505b6000600435181561197d5760006044351861155257600080fd5b60006004353b1161156257600080fd5b6000600460208206610200016020828401111561157e57600080fd5b60246102206020840161012060006001818352015b826101205160200211156115a6576115cb565b61012051602002850135610120516020028501525b8151600101808352811415611593575b5050505050818152809050905090508051602001806101a08284600060045af16115f457600080fd5b50506004600460208206610260016020828401111561161257600080fd5b60246102806020840161012060006001818352015b8261012051602002111561163a5761165f565b61012051602002850135610120516020028501525b8151600101808352811415611627575b5050505050818152809050905090508051602001806102008284600060045af161168857600080fd5b505060006101a08060200151600082518060209013156116a757600080fd5b80919012156116b557600080fd5b806020036101000a8204905090509050181561193a57600061018051186116db57600080fd5b6020610300604463095ea7b361026052600435610280527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6102a05261027c6000610140515af161172b57600080fd5b601f3d1161173857600080fd5b6000506103005060006101a060048060208461026001018260208501600060045af150508051820191505061018051602082610260010152602081019050806102605261026090508051602001806102e08284600060045af161179a57600080fd5b5050600060006102e05161030060006004355af16117b757600080fd5b60206102e060246370a0823161026052306102805261027c610140515afa6117de57600080fd5b601f3d116117eb57600080fd5b6000506102e051156117fc57600080fd5b600061020060048060208461026001018260208501600060045af150508051820191505061018051602082610260010152602081019050806102605261026090508051602001806102e08284600060045af161185757600080fd5b5050600060006102e05161030060006004355af161187457600080fd5b6101805160206102e060246370a0823161026052306102805261027c610140515afa61189f57600080fd5b601f3d116118ac57600080fd5b6000506102e051146118bd57600080fd5b60006101a060048060208461026001018260208501600060045af150508051820191505061018051602082610260010152602081019050806102605261026090508051602001806102e08284600060045af161191857600080fd5b5050600060006102e05161030060006004355af161193557600080fd5b61197d565b61020080602001516000825180602090131561195557600080fd5b809190121561196357600080fd5b806020036101000a82049050905090501561197d57600080fd5b6004356014556024356016556101a060006008818352015b6101a051600881106119a657600080fd5b601560c052602060c02001546101c05260446101a051600881106119c957600080fd5b60200201356101e05260006101c05118156119f5576101e0516101c051146119f057600080fd5b611a2c565b60006101e0511815611a27576101e0516101a05160088110611a1657600080fd5b601560c052602060c0200155611a2c565b611a3c565b8151600101808352811415611995575b505060006004351815611a985761014051610160516101805160006101a052610180516101c05260006101e052600061020052610200516101e0516101c0516101a0516006580161230d565b6101805261016052610140526000505b6000601e55005b6390b22997811415611ad15760043560011c15611abb57600080fd5b601b543314611ac957600080fd5b600435601d55005b636b441a40811415611b315760043560a01c15611aed57600080fd5b601b543314611afb57600080fd5b600435601c55600435610140527f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e96020610140a1005b63e5ea47b8811415611b8b57601c5461014052610140513314611b5357600080fd5b61014051601b5561014051610160527febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056020610160a1005b6307546172811415611ba35760005460005260206000f35b63f7235661811415611bbb5760015460005260206000f35b6382c63066811415611bd35760025460005260206000f35b63f77c4791811415611beb5760035460005260206000f35b63dfe05031811415611c035760045460005260206000f35b63be5d1be9811415611c1b5760055460005260206000f35b6370a08231811415611c515760043560a01c15611c3757600080fd5b600660043560e05260c052604060c0205460005260206000f35b6318160ddd811415611c695760075460005260206000f35b63dd62ed3e811415611cbd5760043560a01c15611c8557600080fd5b60243560a01c15611c9557600080fd5b600860043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6306fdde03811415611d625760098060c052602060c020610180602082540161012060006003818352015b82610120516020021115611cfb57611d1d565b61012051850154610120516020028501525b8151600101808352811415611ce8575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6395d89b41811415611e0757600a8060c052602060c020610180602082540161012060006002818352015b82610120516020021115611da057611dc2565b61012051850154610120516020028501525b8151600101808352811415611d8d575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6313ecb1ca811415611e3d5760043560a01c15611e2357600080fd5b600b60043560e05260c052604060c0205460005260206000f35b6317e28089811415611e5557600c5460005260206000f35b63ef78d4fd811415611e6d57600d5460005260206000f35b637598108c811415611eaa576004356c01431e0fae6d7217caa00000008110611e9557600080fd5b600e60c052602060c020015460005260206000f35b63fec8ee0c811415611ee7576004356c01431e0fae6d7217caa00000008110611ed257600080fd5b600f60c052602060c020015460005260206000f35b63de263bfa811415611f1d5760043560a01c15611f0357600080fd5b601060043560e05260c052604060c0205460005260206000f35b639bd324f2811415611f535760043560a01c15611f3957600080fd5b601160043560e05260c052604060c0205460005260206000f35b6309400707811415611f895760043560a01c15611f6f57600080fd5b601260043560e05260c052604060c0205460005260206000f35b63180692d0811415611fa15760135460005260206000f35b6354c49fe9811415611fd25760043560088110611fbd57600080fd5b601560c052602060c020015460005260206000f35b6301ddabf18114156120085760043560a01c15611fee57600080fd5b601760043560e05260c052604060c0205460005260206000f35b6373861fb381141561203e5760043560a01c1561202457600080fd5b601860043560e05260c052604060c0205460005260206000f35b63f05cc0588114156120925760043560a01c1561205a57600080fd5b60243560a01c1561206a57600080fd5b601960043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b63f851a4408114156120aa57601b5460005260206000f35b6317f7182a8114156120c257601c5460005260206000f35b639c868ac08114156120da57601d5460005260206000f35b505b60006000fd5b6101a0526101405261016052610180526004546101c052602061028060246370a0823161020052610140516102205261021c6101c0515afa61212357600080fd5b601f3d1161213057600080fd5b600050610280516101e052602061028060046318160ddd6102205261023c6101c0515afa61215d57600080fd5b601f3d1161216a57600080fd5b6000506102805161020052610160516028808202821582848304141761218f57600080fd5b8090509050905060648082049050905061022052600061020051111561222c576102208051610180516101e05180820282158284830414176121d057600080fd5b809050905090506102005180806121e657600080fd5b820490509050603c808202821582848304141761220257600080fd5b8090509050905060648082049050905081818301101561222157600080fd5b808201905090508152505b6101605161022051808211156122425780612244565b815b9050905061022052600b6101405160e05260c052604060c020546102405261022051600b6101405160e05260c052604060c02055600c546102205181818301101561228e57600080fd5b8082019050905061024051808210156122a657600080fd5b808203905090506102605261026051600c556101405161028052610160516102a052610180516102c052610220516102e05261026051610300527f7ecd84343f76a23d2227290e0288da3251b045541698e575a5515af4f04197a360a0610280a16101a051565b6101c0526101405261016052610180526101a052610200366101e0376103e060006008818352015b6103e0516008811061234657600080fd5b601560c052602060c020015461040052610400511515612365576123be565b610400516101e06103e0516008811061237d57600080fd5b602002015260186104005160e05260c052604060c020546102e06103e051600881106123a857600080fd5b60200201525b8151600101808352811415612335575b50506014546103e052600061016051181561240e5760006103e0511815612406576103e05160a01c610e108181830110156123f857600080fd5b808201905090504211612409565b60005b612411565b60005b1561272457610100366104003761050060006008818352015b610500516008811061243b57600080fd5b601560c052602060c02001546105205261052051151561245a576124bf565b60206105c060246370a0823161054052306105605261055c610520515afa61248157600080fd5b601f3d1161248e57600080fd5b6000506105c05161040061050051600881106124a957600080fd5b60200201525b815160010180835281141561242a575b50506103e05174010000000000000000000000000000000000000000808206905090508060a01c156124f057600080fd5b809050610500526008600460208206610520016020828401111561251357600080fd5b60166105406020840161012060006001818352015b8261012051602002111561253b5761255d565b61012051850154610120516020028501525b8151600101808352811415612528575b5050505050818152809050905090508051602001806105a08284600060045af161258657600080fd5b5050600060006105a0516105c06000610500515af16125a457600080fd5b610500514260a01b8181830110156125bb57600080fd5b8082019050905060145561052060006008818352015b6101e061052051600881106125e557600080fd5b6020020151610540526105405115156125fd57612721565b670de0b6b3a7640000602061060060246370a0823161058052306105a05261059c610540515afa61262d57600080fd5b601f3d1161263a57600080fd5b60005061060051610400610520516008811061265557600080fd5b60200201518082101561266757600080fd5b80820390509050808202821582848304141761268257600080fd5b8090509050905061016051808061269857600080fd5b820490509050610560526000610560511115612711576102e061052051600881106126c257600080fd5b602002018051610560518181830110156126db57600080fd5b808201905090508152506102e061052051600881106126f957600080fd5b602002015160186105405160e05260c052604060c020555b81516001018083528114156125d1575b50505b6000610140511815612afd576101a05161040052610180511561274b57610400511561274e565b60005b1561277c5760176101405160e05260c052604060c020546104005261040051151561277c5761014051610400525b60066101405160e05260c052604060c020546104205261044060006008818352015b6101e061044051600881106127b257600080fd5b6020020151610460526104605115156127ca57612afa565b6102e061044051600881106127de57600080fd5b60200201516104805260196104605160e05260c052604060c0206101405160e05260c052604060c020546104a05260006104c052610480516104a0511015612895576104805160196104605160e05260c052604060c0206101405160e05260c052604060c0205561042051610480516104a0518082101561285e57600080fd5b80820390509050808202821582848304141761287957600080fd5b80905090509050670de0b6b3a7640000808204905090506104c0525b601a6101405160e05260c052604060c0206104605160e05260c052604060c020546104e0526104e05160801c6104c0518181830110156128d457600080fd5b80820190509050610500526000610500511115612aea576104e05170010000000000000000000000000000000080820690509050610520526101805115612a9b57600060046105a0527fa9059cbb000000000000000000000000000000000000000000000000000000006105c0526105a060048060208461060001018260208501600060045af15050805182019150506104005160208261060001015260208101905061050051602082610600010152602081019050806106005261060090508051602001806106a08284600060045af16129ae57600080fd5b505060206107606106a0516106c06000610460515af16129cd57600080fd5b60203d808211156129de57806129e0565b815b90509050610740526107408051602001806105408284600060045af1612a0557600080fd5b50506000610540511815612a5757610540806020015160008251806020901315612a2e57600080fd5b8091901215612a3c57600080fd5b806020036101000a82049050905090501515612a5757600080fd5b6105205161050051818183011015612a6e57600080fd5b80820190509050601a6101405160e05260c052604060c0206104605160e05260c052604060c02055612aea565b60006104c0511115612aea57610520516105005160801b818183011015612ac157600080fd5b80820190509050601a6101405160e05260c052604060c0206104605160e05260c052604060c020555b815160010180835281141561279e575b50505b6101c051565b6101605261014052600d5461018052610180516c01431e0fae6d7217caa00000008110612b2f57600080fd5b600e60c052602060c02001546101a052610180516c01431e0fae6d7217caa00000008110612b5c57600080fd5b600f60c052602060c02001546101c0526013546101e0526101e05161020052600554610220526101a05161022051101515612c15576001546102405260206102c0600463b26b238e6102605261027c6000610240515af1612bbc57600080fd5b601f3d11612bc957600080fd5b6000506102c05160055560206102c06004632c4e722e6102605261027c610240515afa612bf557600080fd5b601f3d11612c0257600080fd5b6000506102c05161020052610200516013555b601d5415612c245760006101e0525b6101a051421115612fab57600c546102405260035461026052610260513b612c4b57600080fd5b60006000602463615e523761028052306102a05261029c6000610260515af1612c7357600080fd5b6101a051610280526101a05162093a80818183011015612c9257600080fd5b8082019050905062093a808082049050905062093a808082028215828483041417612cbc57600080fd5b809050905090504280821115612cd25780612cd4565b815b905090506102a0526102c060006101f4818352015b6102a0516102805180821015612cfe57600080fd5b808203905090506102e05260206103c0604463d3078c946103205230610340526102805162093a808082049050905062093a808082028215828483041417612d4557600080fd5b809050905090506103605261033c610260515afa612d6257600080fd5b601f3d11612d6f57600080fd5b6000506103c051610300526000610240511115612f48576102805161022051101515612da3576102a0516102205110612da6565b60005b15612ed2576101c080516101e051610300518082028215828483041417612dcc57600080fd5b80905090509050610220516102805180821015612de857600080fd5b808203905090508082028215828483041417612e0357600080fd5b80905090509050610240518080612e1957600080fd5b820490509050818183011015612e2e57600080fd5b80820190509050815250610200516101e0526101c080516101e051610300518082028215828483041417612e6157600080fd5b809050905090506102a0516102205180821015612e7d57600080fd5b808203905090508082028215828483041417612e9857600080fd5b80905090509050610240518080612eae57600080fd5b820490509050818183011015612ec357600080fd5b80820190509050815250612f48565b6101c080516101e051610300518082028215828483041417612ef357600080fd5b809050905090506102e0518082028215828483041417612f1257600080fd5b80905090509050610240518080612f2857600080fd5b820490509050818183011015612f3d57600080fd5b808201905090508152505b426102a0511415612f5857612fa8565b6102a051610280526102a05162093a80818183011015612f7757600080fd5b808201905090504280821115612f8d5780612f8f565b815b905090506102a0525b8151600101808352811415612ce9575b50505b6101808051600180820180806000811215612fc257195b607f1c15612fcf57600080fd5b90509050905081525061018051600d5542610180516c01431e0fae6d7217caa00000008110612ffd57600080fd5b600e60c052602060c02001556101c051610180516c01431e0fae6d7217caa0000000811061302a57600080fd5b600f60c052602060c0200155600b6101405160e05260c052604060c020546102405260126101405160e05260c052604060c0208054610240516101c05160106101405160e05260c052604060c020548082101561308657600080fd5b8082039050905080820282158284830414176130a157600080fd5b80905090509050670de0b6b3a7640000808204905090508181830110156130c757600080fd5b808201905090508155506101c05160106101405160e05260c052604060c020554260116101405160e05260c052604060c0205561016051565b6101a0526101405261016052610180526101405161016051610180516101a051610140516101c0526101c05160065801612b03565b6101a0526101805261016052610140526000506101405161016051610180516101a051610160516101c0526101c05160065801612b03565b6101a05261018052610160526101405260005060006101805118156133ed576007546101c0526000601560c052602060c0205414156101e0526101e05115613218576101405161016051610180516101a0516101c0516101e05161014051610200526101c05161022052600061024052600061026052610260516102405161022051610200516006580161230d565b6101e0526101c0526101a0526101805261016052610140526000505b60066101405160e05260c052604060c02054610180518082101561323b57600080fd5b80820390509050610200526102005160066101405160e05260c052604060c020556101405161016051610180516101a0516101c0516101e05161020051610140516102205261020051610240526101c05161026052610260516102405161022051600658016120e2565b610200526101e0526101c0526101a0526101805261016052610140526000506101e0511561333e576101405161016051610180516101a0516101c0516101e0516102005161016051610220526101c05161024052600061026052600061028052610280516102605161024051610220516006580161230d565b610200526101e0526101c0526101a0526101805261016052610140526000505b60066101605160e05260c052604060c020546101805181818301101561336357600080fd5b80820190509050610200526102005160066101605160e05260c052604060c020556101405161016051610180516101a0516101c0516101e05161020051610160516102205261020051610240526101c05161026052610260516102405161022051600658016120e2565b610200526101e0526101c0526101a0526101805261016052610140526000505b610180516101c05261016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101c0a36101a05156

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.