Contract 0x93B546D85337C5a96437d9211fB50f0028dbaE1d

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe0d46c15a4383dad8ad05171c69ed5257ff384c4428d95c7553f05e18a7a34db0x60205461328925942022-09-09 15:31:2779 days 20 hrs ago0x4210b1803f7cb057435ff1135f5dfdfbee086c27 IN  Create: Vyper_contract0 MATIC0.0942419550
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.3.3

Optimization Enabled:
N/A

Other Settings:
, MIT license

Contract Source Code (Vyper language format)

# @version 0.3.3
"""
@title Liquidity Gauge v4
@author DFX Finance
@license MIT
"""

# Original idea and credit:
# Angle Protocol's liquidity gauge (v4)
# https://github.com/AngleProtocol/angle-core/blob/main/contracts/staking/LiquidityGaugeV4.vy
# Curve Finance's liquidity gauge (v4)
# https://github.com/curvefi/curve-dao-contracts/blob/master/contracts/gauges/LiquidityGaugeV4.vy


from vyper.interfaces import ERC20

implements: ERC20

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

interface VotingEscrowBoost:
    def adjusted_balance_of(_account: address) -> uint256: view

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

event RewardDataUpdate:
    _token: indexed(address)
    _amount: uint256

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


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

DFX: public(address)
voting_escrow: public(address)
veBoost_proxy: public(address)

staking_token: public(address)
decimal_staking_token: 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)

integrate_checkpoint_of: public(HashMap[address, uint256])

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

reward_data: public(HashMap[address, Reward])

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

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

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

admin: public(address)
future_admin: public(address)

initialized: public(bool)


@external
def __init__():
    """
    @notice Contract constructor
    @dev The contract has an initializer to prevent the take over of the implementation
    """
    assert self.initialized == False #dev: contract is already initialized
    self.initialized = True

@external
def initialize(_staking_token: address, _admin: address, _DFX: address, _voting_escrow: address, _veBoost_proxy: address, _distributor: address):
    """
    @notice Contract initializer
    @param _staking_token Liquidity Pool contract address
    @param _admin Admin who can kill the gauge
    @param _DFX Address of the DFX token
    @param _voting_escrow Address of the veDFX contract
    @param _veBoost_proxy Address of the proxy contract used to query veDFX balances and taking into account potential delegations
    @param _distributor Address of the contract responsible for distributing DFX tokens to this gauge
    """
    assert self.initialized == False #dev: contract is already initialized
    self.initialized = True

    assert _admin != ZERO_ADDRESS
    assert _DFX != ZERO_ADDRESS
    assert _voting_escrow != ZERO_ADDRESS
    assert _veBoost_proxy != ZERO_ADDRESS
    assert _distributor != ZERO_ADDRESS

    self.admin = _admin
    self.staking_token = _staking_token
    self.decimal_staking_token = ERC20Extended(_staking_token).decimals()

    symbol: String[26] = ERC20Extended(_staking_token).symbol()
    self.name = concat("DFX ", symbol, " Gauge")
    self.symbol = concat(symbol, "-gauge")
    self.DFX = _DFX
    self.voting_escrow = _voting_escrow
    self.veBoost_proxy = _veBoost_proxy

    # add in all liquidityGauge the DFX reward - the distribution could be null though
    self.reward_data[_DFX].distributor = _distributor
    self.reward_tokens[0] = _DFX
    self.reward_count = 1
    

@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 self.decimal_staking_token


@internal
def _update_liquidity_limit(addr: address, l: uint256, L: uint256):
    """
    @notice Calculate limits which depend on the amount of DFX token per-user.
            Effectively it calculates working balances to apply amplification
            of DFX production by
    @param addr User address
    @param l User's amount of liquidity (LP tokens)
    @param L Total amount of liquidity (LP tokens)
    """
    # To be called after totalSupply is updated
    voting_balance: uint256 = VotingEscrowBoost(self.veBoost_proxy).adjusted_balance_of(addr)
    voting_total: uint256 = ERC20(self.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_reward(_user: address, token: address, _total_supply: uint256, _user_balance: uint256, _claim: bool, receiver: address):
    """
    @notice Claim pending rewards and checkpoint rewards for a user
    """
    total_supply: uint256 = _total_supply
    user_balance: uint256 = _user_balance
    if token == self.DFX: 
        total_supply = self.working_supply
        user_balance = self.working_balances[_user]

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

    if _user != ZERO_ADDRESS:
        integral_for: uint256 = self.reward_integral_for[token][_user]
        new_claimable: uint256 = 0

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

        claim_data: uint256 = self.claim_data[_user][token]
        total_claimable: uint256 = shift(claim_data, -128) + new_claimable
        if total_claimable > 0:
            total_claimed: uint256 = claim_data % 2**128
            if _claim:
                response: Bytes[32] = raw_call(
                    token,
                    concat(
                        method_id("transfer(address,uint256)"),
                        convert(receiver, bytes32),
                        convert(total_claimable, bytes32),
                    ),
                    max_outsize=32,
                )
                if len(response) != 0:
                    assert convert(response, bool)
                self.claim_data[_user][token] = total_claimed + total_claimable
            elif new_claimable > 0:
                self.claim_data[_user][token] = total_claimed + shift(total_claimable, 128)
    
    if token == self.DFX : 
        self.integrate_checkpoint_of[_user] = block.timestamp
                
@internal
def _checkpoint_rewards(_user: address, _total_supply: uint256, _claim: bool, _receiver: address, _only_checkpoint:bool = False):
    """
    @notice Claim pending rewards and checkpoint rewards for a user
    """

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

    if _only_checkpoint:
        self._checkpoint_reward(_user, self.DFX, _total_supply, user_balance, False, receiver)
    else:
        reward_count: uint256 = self.reward_count
        for i in range(MAX_REWARDS):
            if i == reward_count:
                break
            token: address = self.reward_tokens[i]
            self._checkpoint_reward(_user, token, _total_supply, user_balance, _claim, receiver)

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

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


@view
@external
def claimable_reward(_user: address, _reward_token: address) -> uint256:
    """
    @notice Get the number of claimable reward tokens for a user
    @param _user Account to get reward amount for
    @param _reward_token Token to get reward amount for
    @return uint256 Claimable reward token amount
    """
    integral: uint256 = self.reward_data[_reward_token].integral
    total_supply: uint256 = self.totalSupply
    user_balance: uint256 = self.balanceOf[_user]
    if _reward_token == self.DFX : 
        total_supply = self.working_supply
        user_balance = self.working_balances[_user]
        
    if total_supply != 0:
        last_update: uint256 = min(block.timestamp, self.reward_data[_reward_token].period_finish)
        duration: uint256 = last_update - self.reward_data[_reward_token].last_update
        integral += (duration * self.reward_data[_reward_token].rate * 10**18 / total_supply)

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

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


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


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


@external
def kick(addr: address):
    """
    @notice Kick `addr` for abusing their boost
    @dev Only if either they had another voting event, or their voting escrow lock expired
    @param addr Address to kick
    """
    t_last: uint256 = self.integrate_checkpoint_of[addr]
    t_ve: uint256 = VotingEscrow(self.voting_escrow).user_point_history__ts(
        addr, VotingEscrow(self.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

    total_supply: uint256 = self.totalSupply
    self._checkpoint_rewards(addr, total_supply, False, ZERO_ADDRESS, True)

    self._update_liquidity_limit(addr, self.balanceOf[addr], total_supply)


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

    if _value != 0:
        is_rewards: bool = self.reward_count != 0
        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.staking_token).transferFrom(msg.sender, self, _value)
    else:
        self._checkpoint_rewards(_addr, total_supply, False, ZERO_ADDRESS, True)

    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
    """
    total_supply: uint256 = self.totalSupply

    if _value != 0:
        is_rewards: bool = self.reward_count != 0
        if is_rewards:
            self._checkpoint_rewards(msg.sender, total_supply, _claim_rewards, ZERO_ADDRESS)

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

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

        ERC20(self.staking_token).transfer(msg.sender, _value)
    else:
        self._checkpoint_rewards(msg.sender, total_supply, False, ZERO_ADDRESS, True)

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


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

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

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

    log Transfer(_from, _to, _value)


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

    return True


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

    self._transfer(_from, _to, _value)

    return True


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

    return True


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

    log Approval(msg.sender, _spender, allowance)

    return True


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

    log Approval(msg.sender, _spender, allowance)

    return True

@external
def add_reward(_reward_token: address, _distributor: address):
    """
    @notice Set the active reward contract
    """
    assert msg.sender == self.admin  # dev: only owner

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

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

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

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

    self.reward_data[_reward_token].distributor = _distributor


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

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

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

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

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

    log RewardDataUpdate(_reward_token,_amount)

@external
def commit_transfer_ownership(addr: address):
    """
    @notice Transfer ownership of Gauge to `addr`
    @param addr Address to have ownership transferred to
    """
    assert msg.sender == self.admin  # dev: admin only
    assert addr != ZERO_ADDRESS  # dev: future admin cannot be the 0 address

    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"},{"name":"RewardDataUpdate","inputs":[{"name":"_token","type":"address","indexed":true},{"name":"_amount","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"initialize","inputs":[{"name":"_staking_token","type":"address"},{"name":"_admin","type":"address"},{"name":"_DFX","type":"address"},{"name":"_voting_escrow","type":"address"},{"name":"_veBoost_proxy","type":"address"},{"name":"_distributor","type":"address"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"user_checkpoint","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"view","type":"function","name":"claimed_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"claimable_reward","inputs":[{"name":"_user","type":"address"},{"name":"_reward_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"set_rewards_receiver","inputs":[{"name":"_receiver","type":"address"}],"outputs":[]},{"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":[]},{"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"}]},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_added_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_subtracted_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"nonpayable","type":"function","name":"add_reward","inputs":[{"name":"_reward_token","type":"address"},{"name":"_distributor","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_reward_distributor","inputs":[{"name":"_reward_token","type":"address"},{"name":"_distributor","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"deposit_reward_token","inputs":[{"name":"_reward_token","type":"address"},{"name":"_amount","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"addr","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[]},{"stateMutability":"view","type":"function","name":"DFX","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"voting_escrow","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"veBoost_proxy","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"staking_token","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"decimal_staking_token","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}]},{"stateMutability":"view","type":"function","name":"working_balances","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"working_supply","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"integrate_checkpoint_of","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"reward_count","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"reward_tokens","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"reward_data","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"token","type":"address"},{"name":"distributor","type":"address"},{"name":"period_finish","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"last_update","type":"uint256"},{"name":"integral","type":"uint256"}]}]},{"stateMutability":"view","type":"function","name":"rewards_receiver","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"reward_integral_for","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"initialized","inputs":[],"outputs":[{"name":"","type":"bool"}]}]

6020546120f35760016020556120ce6100246300000000396120ce6000016300000000f3600436101561000d57611807565b60003560e01c346120c95763cc2a9a5b8118610302576004358060a01c6120c9576040526024358060a01c6120c9576060526044358060a01c6120c9576080526064358060a01c6120c95760a0526084358060a01c6120c95760c05260a4358060a01c6120c95760e0526020546120c95760016020556000606051146120c9576000608051146120c957600060a051146120c957600060c051146120c957600060e051146120c957606051601e5560405160045563313ce567610100526020610100600461011c6040515afa6100e8573d600060003e3d6000fd5b60203d106120c957610100516005556395d89b41610140526060610140600461015c6040515afa61011e573d600060003e3d6000fd5b60403d106120c9576101405161014001601a8151116120c9578051806101c0526020820180516101e0525050506101c0805180610100526020820180516101205250505060006004610140527f444658200000000000000000000000000000000000000000000000000000000061016052610140805160208201836101e0018151815250508083019250505061010051816101e001610120518152508082019150506006610180527f20476175676500000000000000000000000000000000000000000000000000006101a052610180805160208201836101e00181518152505080830192505050806101c0526101c09050805180600955602082016000602083601f0104600281116120c957801561024a57905b6020810283015181600a0155600101818118610233575b5050505050600061010051816101a001610120518152508082019150506006610140527f2d6761756765000000000000000000000000000000000000000000000000000061016052610140805160208201836101a0018151815250508083019250505080610180526101809050805180600c55602082018051600d5550505060805160015560a05160025560c05160035560e051601a6080516020526000526040600020600181019050556080516012556001601155005b63313ce56781186103195760055460405260206040f35b634b82009381186103a1576004358060a01c6120c9576104c0526104c05133186120c9576007546104e0526104c051610380526104e0516103a0526040366103c037600161040052610369611de0565b6104c05160405260066104c0516020526000526040600020546060526104e05160805261039461180d565b6001610500526020610500f35b63e77e7437811861040c576004358060a01c6120c9576040526024358060a01c6120c957606052601d60405160205260005260406000208060605160205260005260406000209050547001000000000000000000000000000000008082069050905060805260206080f35b6333fd6f748118610606576004358060a01c6120c9576040526024358060a01c6120c957606052601a60605160205260005260406000206005810190505460805260075460a052600660405160205260005260406000205460c0526001546060511861048d57600f5460a052600e60405160205260005260406000205460c0525b600060a0511461055e5742601a6060516020526000526040600020600281019050548082811882841002189050905060e05260e051601a6060516020526000526040600020600481019050548082106120c957808203905090506101005260805161010051601a6060516020526000526040600020600381019050548082028215828483041417156120c95790509050670de0b6b3a76400008082028215828483041417156120c9579050905060a0518080156120c95782049050905081818301106120c957808201905090506080525b601c606051602052600052604060002080604051602052600052604060002090505460e05260c05160805160e0518082106120c957808203905090508082028215828483041417156120c95790509050670de0b6b3a76400008082049050905061010052601d604051602052600052604060002080606051602052600052604060002090505460801c6101005181818301106120c95780820190509050610120526020610120f35b63bdf981168118610633576004358060a01c6120c957604052604051601b33602052600052604060002055005b63e6f1daf2811861064e57336104c05260006104e05261069d565b6384e9bd7e8118610673576004358060a01c6120c9576104c05260006104e05261069d565b639faceb1b81186106f1576004358060a01c6120c9576104c0526024358060a01c6120c9576104e0525b6000546120c957600160005560006104e051146106bf57336104c051186120c9575b6104c051610380526007546103a05260016103c0526104e0516103e0526000610400526106ea611de0565b6000600055005b6396c55175811861089f576004358060a01c6120c9576104c05260106104c0516020526000526040600020546104e05263da020a18610560526104c0516105805263010ae757610520526104c051610540526020610520602461053c6002545afa610761573d600060003e3d6000fd5b60203d106120c957610520516105a0526020610560604461057c6002545afa61078f573d600060003e3d6000fd5b60203d106120c957610560516105005260066104c051602052600052604060002054610520526370a08231610580526104c0516105a0526020610580602461059c6002545afa6107e4573d600060003e3d6000fd5b60203d106120c9576105805115610803576104e0516105005111610806565b60015b156120c9576105205160288082028215828483041417156120c95790509050606480820490509050600e6104c05160205260005260406000205411156120c957600754610540526104c05161038052610540516103a0526040366103c037600161040052610872611de0565b6104c05160405260066104c0516020526000526040600020546060526105405160805261089d61180d565b005b63b6b55f2581186108ba57336104c05260006104e052610909565b636e553f6581186108df576024358060a01c6120c9576104c05260006104e052610909565b6383df67478118610ad2576024358060a01c6120c9576104c0526044358060011c6120c9576104e0525b6000546120c95760016000556007546105005260006004351415610950576104c05161038052610500516103a0526040366103c037600161040052610a65611de056610a65565b60006011541415610520526105205115610990576104c05161038052610500516103a0526104e0516103c05260006103e052600061040052610990611de0565b6105005160043581818301106120c957808201905090506105005260066104c05160205260005260406000205460043581818301106120c95780820190509050610540526105405160066104c051602052600052604060002055610500516007556104c0516040526105405160605261050051608052610a0e61180d565b6323b872dd610560523361058052306105a0526004356105c0526020610560606461057c60006004545af1610a48573d600060003e3d6000fd5b60203d106120c957610560518060011c6120c9576105e0526105e0505b6104c0517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c600435610520526020610520a26104c05160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600435610520526020610520a36000600055005b632e1a7d4d8118610ae85760006104c052610b03565b6338d074368118610cae576024358060011c6120c9576104c0525b6000546120c95760016000556007546104e05260006004351415610b475733610380526104e0516103a0526040366103c037600161040052610c47611de056610c47565b60006011541415610500526105005115610b845733610380526104e0516103a0526104c0516103c05260006103e052600061040052610b84611de0565b6104e0516004358082106120c957808203905090506104e0526006336020526000526040600020546004358082106120c9578082039050905061052052610520516006336020526000526040600020556104e05160075533604052610520516060526104e051608052610bf561180d565b63a9059cbb610540523361056052600435610580526020610540604461055c60006004545af1610c2a573d600060003e3d6000fd5b60203d106120c957610540518060011c6120c9576105a0526105a0505b337f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364600435610500526020610500a26000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600435610500526020610500a36000600055005b63a9059cbb8118610d02576004358060a01c6120c957610580526000546120c9576001600055336104c052610580516104e05260243561050052610cf0611f06565b60016105a05260206105a06000600055f35b6323b872dd8118610dee576004358060a01c6120c957610580526024358060a01c6120c9576105a0526000546120c95760016000556008610580516020526000526040600020803360205260005260406000209050546105c0527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6105c05114610dbd576105c0516044358082106120c957808203905090506008610580516020526000526040600020803360205260005260406000209050555b610580516104c0526105a0516104e05260443561050052610ddc611f06565b60016105e05260206105e06000600055f35b63095ea7b38118610e65576004358060a01c6120c9576040526024356008336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560243560605260206060a3600160605260206060f35b63395093518118610f12576004358060a01c6120c957604052600833602052600052604060002080604051602052600052604060002090505460243581818301106120c957808201905090506060526060516008336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560605160805260206080a3600160805260206080f35b63a457c2d78118610fbd576004358060a01c6120c95760405260083360205260005260406000208060405160205260005260406000209050546024358082106120c957808203905090506060526060516008336020526000526040600020806040516020526000526040600020905055604051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560605160805260206080a3600160805260206080f35b63e8de0d4d8118611060576004358060a01c6120c9576040526024358060a01c6120c957606052601e5433186120c957601154608052600860805110156120c957601a6040516020526000526040600020600181019050546120c957606051601a60405160205260005260406000206001810190505560405160805160088110156120c95760120155608051600181818301106120c95780820190509050601155005b63058a3a2481186110ec576004358060a01c6120c9576040526024358060a01c6120c957606052601a60405160205260005260406000206001810190505460805260805133186110b15760016110b7565b601e5433145b156120c9576000608051146120c9576000606051146120c957606051601a604051602052600052604060002060018101905055005b6393f7aa67811861139b576004358060a01c6120c9576104c0526000546120c9576001600055601a6104c05160205260005260406000206001810190505433186120c9576000610380526007546103a05260006103c05260006103e052600061040052611157611de0565b60006004610520527f23b872dd000000000000000000000000000000000000000000000000000000006105405261052080516020820183610580018151815250508083019250505033816105800152602081019050308161058001526020810190506024358161058001526020810190508061056052610560505060206106206105605161058060006104c0515af16111f5573d600060003e3d6000fd5b61060060203d808211611208578161120a565b805b9050905081528051806104e0526020820180516105005250505060006104e0511461124457610500516104e0516020036008021c156120c9575b601a6104c05160205260005260406000206002810190505461052052610520514210156112f55761052051428082106120c957808203905090506105405261054051601a6104c0516020526000526040600020600381019050548082028215828483041417156120c95790509050610560526024356105605181818301106120c9578082019050905062093a8080820490509050601a6104c05160205260005260406000206003810190505561131c565b60243562093a8080820490509050601a6104c0516020526000526040600020600381019050555b42601a6104c0516020526000526040600020600481019050554262093a8081818301106120c95780820190509050601a6104c0516020526000526040600020600281019050556104c0517f656e648408f08a8f933b2d1375eb24c442eafd5537451a75561a264a56963922602435610540526020610540a26000600055005b636b441a4081186113fb576004358060a01c6120c957604052601e5433186120c9576000604051146120c957604051601f557f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e960405160605260206060a1005b63e5ea47b8811861144957601f5460405260405133186120c957604051601e557febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a118910560405160605260206060a1005b63d56a4da581186114605760015460405260206040f35b63dfe0503181186114775760025460405260206040f35b63dca6e0bc811861148e5760035460405260206040f35b632dc7d74c81186114a55760045460405260206040f35b63178f318581186114bc5760055460405260206040f35b6370a0823181186114ef576004358060a01c6120c957604052600660405160205260005260406000205460605260206060f35b6318160ddd81186115065760075460405260206040f35b63dd62ed3e8118611558576004358060a01c6120c9576040526024358060a01c6120c9576060526008604051602052600052604060002080606051602052600052604060002090505460805260206080f35b6306fdde0381186115d55760208060405280604001600954808252602082016000602083601f0104600281116120c95780156115a757905b80600a015460208202840152600101818118611590575b50505050805180602083010181600003601f163682375050601f19601f825160200101169050810190506040f35b6395d89b4181186116255760208060405280604001600c5480825260208201600d5481525050805180602083010181600003601f163682375050601f19601f825160200101169050810190506040f35b6313ecb1ca8118611658576004358060a01c6120c957604052600e60405160205260005260406000205460605260206060f35b6317e28089811861166f57600f5460405260206040f35b639bd324f281186116a2576004358060a01c6120c957604052601060405160205260005260406000205460605260206060f35b63963c94b981186116b95760115460405260206040f35b6354c49fe981186116dd5760043560088110156120c9576012015460405260206040f35b6348e9c65e811861173b576004358060a01c6120c957604052601a604051602052600052604060002080546060526001810154608052600281015460a052600381015460c052600481015460e0526005810154610100525060c06060f35b6301ddabf1811861176e576004358060a01c6120c957604052601b60405160205260005260406000205460605260206060f35b63f05cc05881186117c0576004358060a01c6120c9576040526024358060a01c6120c957606052601c604051602052600052604060002080606051602052600052604060002090505460805260206080f35b63f851a44081186117d757601e5460405260206040f35b6317f7182a81186117ee57601f5460405260206040f35b63158ef93e81186118055760205460405260206040f35b505b60006000fd5b63bbf7408a60c05260405160e052602060c0602460dc6003545afa611837573d600060003e3d6000fd5b60203d106120c95760c05160a0526318160ddd60e052602060e0600460fc6002545afa611869573d600060003e3d6000fd5b60203d106120c95760e05160c05260605160288082028215828483041417156120c9579050905060648082049050905060e052600060c05111156119075760e05160805160a0518082028215828483041417156120c9579050905060c0518080156120c957820490509050603c8082028215828483041417156120c9579050905060648082049050905081818301106120c9578082019050905060e0525b60605160e0518082811882841002189050905060e052600e6040516020526000526040600020546101005260e051600e604051602052600052604060002055600f5460e05181818301106120c95780820190509050610100518082106120c957808203905090506101205261012051600f557f7ecd84343f76a23d2227290e0288da3251b045541698e575a5515af4f04197a360405161014052606051610160526080516101805260e0516101a052610120516101c05260a0610140a1565b6080516101005260a05161012052600154606051186119fc57600f5461010052600e604051602052600052604060002054610120525b601a6060516020526000526040600020600581019050546101405242601a606051602052600052604060002060028101905054808281188284100218905090506101605261016051601a6060516020526000526040600020600481019050548082106120c957808203905090506101805260006101805114611b2f5761016051601a60605160205260005260406000206004810190505560006101005114611b2f576101405161018051601a6060516020526000526040600020600381019050548082028215828483041417156120c95790509050670de0b6b3a76400008082028215828483041417156120c95790509050610100518080156120c95782049050905081818301106120c957808201905090506101405261014051601a6060516020526000526040600020600581019050555b600060405114611dc057601c60605160205260005260406000208060405160205260005260406000209050546101a05260006101c052610140516101a0511015611bdc5761014051601c606051602052600052604060002080604051602052600052604060002090505561012051610140516101a0518082106120c957808203905090508082028215828483041417156120c95790509050670de0b6b3a7640000808204905090506101c0525b601d60405160205260005260406000208060605160205260005260406000209050546101e0526101e05160801c6101c05181818301106120c95780820190509050610200526000610200511115611dc0576101e051700100000000000000000000000000000000808206905090506102205260c051611ca35760006101c0511115611dc057610220516102005160801b81818301106120c95780820190509050601d6040516020526000526040600020806060516020526000526040600020905055611dc0565b60006004610280527fa9059cbb000000000000000000000000000000000000000000000000000000006102a052610280805160208201836102e0018151815250508083019250505060e051816102e0015260208101905061020051816102e00152602081019050806102c0526102c0505060206103606102c0516102e060006060515af1611d36573d600060003e3d6000fd5b61034060203d808211611d495781611d4b565b805b905090508152805180610240526020820180516102605250505060006102405114611d855761026051610240516020036008021c156120c9575b610220516102005181818301106120c95780820190509050601d60405160205260005260406000208060605160205260005260406000209050555b60015460605118611dde574260106040516020526000526040600020555b565b6103e0516104205260006104405260006103805114611e5057600661038051602052600052604060002054610440526103c051611e1e576000611e24565b6103e051155b15611e5057601b610380516020526000526040600020546104205261042051611e505761038051610420525b61040051611ed5576011546104605260006008905b8061048052610460516104805118611e7c57611ece565b6104805160088110156120c957601201546104a052610380516040526104a0516060526103a0516080526104405160a0526103c05160c0526104205160e052611ec36119c6565b600101818118611e65575b5050611f04565b610380516040526001546060526103a0516080526104405160a052600060c0526104205160e052611f046119c6565b565b600754610520526000610500511415611f67576104c05161038052610520516103a0526040366103c037600161040052611f3e611de0565b6104e05161038052610520516103a0526040366103c037600161040052612090611de056612090565b60006011541415610540526105405115611fa5576104c05161038052610520516103a05260006103c05260006103e052600061040052611fa5611de0565b60066104c051602052600052604060002054610500518082106120c95780820390509050610560526105605160066104c0516020526000526040600020556104c051604052610560516060526105205160805261200061180d565b6105405115612033576104e05161038052610520516103a05260006103c05260006103e052600061040052612033611de0565b60066104e0516020526000526040600020546105005181818301106120c95780820190509050610560526105605160066104e0516020526000526040600020556104e051604052610560516060526105205160805261209061180d565b6104e0516104c0517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61050051610540526020610540a3565b600080fd005b600080fd

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.