Contract 0xffbacce0cc7c19d46132f1258fc16cf6871d153c 4

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc81ccf205faec92f4d3226de1b2063b4a6b480f4fe12bd00158894e091ca5ec1Deposit242954902022-01-29 7:18:483 hrs 29 mins ago0xdea59e0340ffef2c664962b76079256527e6c7f4 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.00329092093130.06999992
0xae0f8c9f8bce242447b6ff37718dded5826f4bdaefa2f5278c068c7c4c4972c1Deposit242940182022-01-29 6:21:484 hrs 26 mins ago0xb6bf8e4d9c2aacb1b097d0a8f806494c61e3630c IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.004699054862 30.410264313
0x1320a400a128ffc92d56a7b5da5c79d50f4b443ffe9907093a551f9a9703b633Claim_rewards242935422022-01-29 6:03:164 hrs 45 mins ago0xeeab1c3b6f441c9824a27c91e45b6a17586ce3bb IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.003084546443 25.930799922
0x2037e74b0584fcbfaa0b6eb7da7a14a24fdfd33e1ec79b1b123eaaceacdfe022Deposit242913532022-01-29 4:41:386 hrs 7 mins ago0xd3710e7691bff0d08b27aa881b86a25bd2acabc7 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.007859773737 30.419200011
0x0283c19ea3646f06403592ea7a1465212b6193e510b6613c06fc10dce4fc2a3eDeposit242894402022-01-29 3:31:367 hrs 17 mins ago0xe9c4e1aba9c5eaf16407a36b70052ae2cdaf1b15 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.00464683738 30.070000005
0x75f2a784e117a460f9706ac22d667688eb60b9b27a6564f64231b4019f8472adDeposit242883942022-01-29 2:55:397 hrs 53 mins ago0x269c0b59e2f8e6ece62ecc9535c4fc4354b79080 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.004647198221 30.070000007
0x6d879f0c1931eeca73cbab76f225df73c1a260c583dbc2ad2e1151fad45a1e77Claim_rewards242868882022-01-29 2:01:438 hrs 47 mins ago0x8d1272dd135016d2defa665044eac58761ade7ca IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.00716961059130.599999963
0xfa84b2572f9aa47ab90434865126e2e46146b96e6f74ee1dd7c4dbcb68830075Withdraw242811222022-01-28 22:32:5112 hrs 15 mins ago0x66912b4ca378ccb8afcb41028edec4b786127194 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.006681433698 30.069999905
0x469516d32d6e51ba65f7960f8d24dd8e55f1f6d14985ef0dfd5e6828fbdb2959Claim_rewards242764402022-01-28 19:30:3515 hrs 18 mins ago0x8188ae9d89e4c4899a8fcc7d69a0e9d6ca43670a IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.00230406055230.070090605
0x2c81b9deb934effd90acee0826a5877a1dbef1dba56473c42a74b8e78310618dClaim_rewards242764362022-01-28 19:30:2715 hrs 18 mins ago0x8188ae9d89e4c4899a8fcc7d69a0e9d6ca43670a IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.00460532458630.070090605
0x8bc809d9f6fb661d205eb7a5adfc0f97b5301fdc70bc9fd60868f14d19e583faWithdraw242752232022-01-28 18:42:2116 hrs 6 mins ago0x5d0ebce321f94ac05bb4d8513a2ef72a37213c2c IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.0022486420
0xc6657d8905c59c08a3cf45d4d825592d3f0c03de3704a49b6b0013b988222533Deposit242750962022-01-28 18:37:5916 hrs 10 mins ago0x5d0ebce321f94ac05bb4d8513a2ef72a37213c2c IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.00464673913630.069364258
0xfb41ede7144821d3ebef96083a82e9897d6846db2f04400e63c52f03837d540aWithdraw242750912022-01-28 18:37:4916 hrs 10 mins ago0xf46c3acd242d980d07101b8a180ef9f131418924 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.003735817815 30.069364258
0x92f4667c46c4d14d89023ca93b6f868100f9748142d280f60b527c52597b5d3aWithdraw242745592022-01-28 18:19:2916 hrs 29 mins ago0xc9f9c319827c49a8e201a4c35f5ab9488261267a IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.00624469257 30.453001904
0xb4e37f2902606f711d1cbaf146f949b6a062a940612fdced411277a1b30bfba9Claim_rewards242721902022-01-28 16:51:3517 hrs 57 mins ago0xd74c68ecf78a5f8848304fa10c9e989ddf810908 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.003583956719 30.129183121
0x3bca28d5fdcc85a83ca9ed09292908ad2daa6d474d56186ea6bb8ab81166b07dClaim_rewards242633502022-01-28 11:23:4023 hrs 25 mins ago0xc8f9c074cbd381a46d7363009ddd09e76ef6f025 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.002892844365 30.380000063
0x3a74d2bd6a99d3f24bb84baede98735dc9a959be89622662ac46a8b78161ec30Withdraw242633072022-01-28 11:20:4823 hrs 27 mins ago0xc8f9c074cbd381a46d7363009ddd09e76ef6f025 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.003804427854 32.146110242
0x0e80d615e12d10d8a33f603d41fc0f8041a2a9e00129baeb0676d2f506b6ceaaClaim_rewards242612482022-01-28 10:06:431 day 42 mins ago0xf2fcce30951846eafdafa72e370176137b40432a IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.003568616413 30.000222052
0x70b5f24e18dc6eaecacacc82c74bf8d47282cb446c8c8958dca29a6a3d78277cClaim_rewards242587882022-01-28 8:37:511 day 2 hrs ago0xa5a663b7951dddff89b01194ee16f3af276051c1 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.00594765 50
0x0a0eed7359e89342a528f616c232a95d3188ae21cce980672c3e5a163e5f149cClaim_rewards242571762022-01-28 7:41:091 day 3 hrs ago0x21a94e2e3e97aaf59a0fbdb8ef1bb6bc033facc3 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.004091127315 30.070100005
0x1e0768055217c8359805965579bfdae0b3d26fa9fa98a83e0c6377777a00873bClaim_rewards242550112022-01-28 6:21:361 day 4 hrs ago0x77f8cb741c3ede8b166d4ed94c2fc6ffba0aa87f IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.002309255639 30.137891231
0x5503f667185689d563895cfda2aefc9842408e5bebdd4bd4a08b3107947b3045Claim_rewards242550032022-01-28 6:21:201 day 4 hrs ago0x77f8cb741c3ede8b166d4ed94c2fc6ffba0aa87f IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.004615708455 30.137891231
0x5af2fe798d9b20be08b5c7b9a8c5784f24d740bc82e8de3e50dd42e5f8911636Claim_rewards242456532022-01-28 0:38:361 day 10 hrs ago0x5d4d70a48093805bd24091d3c1cf41f9b7709dfb IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.004597681977 30.579250014
0x6ccd9710f4a2034e4e16c56e0ebb204b7973a8ad84a17cb6410b8032695f6cadClaim_rewards242405512022-01-27 21:36:371 day 13 hrs ago0xa66f809378acc90b5d36cfc9b45c7390257aa5ed IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.003593210599 30.206977544
0x933c30467d88eeb34ad1bc3eee352652c58322003f7b46ced38d019623cae38eDeposit242381662022-01-27 20:12:211 day 14 hrs ago0x04574c15a59e5bf0fbce165e71ce85ec166a34b9 IN  0xffbacce0cc7c19d46132f1258fc16cf6871d153c0 MATIC0.00320719870730.009999977
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xb0a366b987d77b5ed5803cbd95c80bb6deab48c0

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.12

Optimization Enabled:
N/A

Other Settings:
, MIT license

Contract Source Code (Vyper language format)

# @version 0.2.12
"""
@title Rewards-Only Gauge
@author Curve Finance
@license MIT
@notice Distribution of third-party rewards without CRV
"""

from vyper.interfaces import ERC20

implements: ERC20


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


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

event Withdraw:
    provider: indexed(address)
    value: 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
CLAIM_FREQUENCY: constant(uint256) = 3600

lp_token: public(address)

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

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

# For tracking external rewards
reward_data: uint256
reward_tokens: public(address[MAX_REWARDS])
reward_balances: public(HashMap[address, uint256])
# claimant -> default reward receiver
rewards_receiver: public(HashMap[address, address])

claim_sig: public(Bytes[4])

# 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


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

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

    self.lp_token = _lp_token
    self.admin = _admin


@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


@internal
def _checkpoint_rewards(_user: address, _total_supply: uint256, _claim: bool, _receiver: address):
    """
    @notice Claim pending rewards and checkpoint rewards for a user
    """
    # claim from reward contract

    reward_data: uint256 = self.reward_data
    if _total_supply != 0 and reward_data != 0 and block.timestamp > shift(reward_data, -160) + CLAIM_FREQUENCY:
        reward_contract: address = convert(reward_data % 2**160, address)
        raw_call(reward_contract, self.claim_sig)  # dev: bad claim sig
        self.reward_data = convert(reward_contract, uint256) + shift(block.timestamp, 160)

    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

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

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

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

            claim_data: uint256 = self.claim_data[_user][token]
            total_claimed: uint256 = claim_data % 2 ** 128  # lower order bytes
            total_claimable: uint256 = shift(claim_data, -128) + new_claimable

            if _claim and total_claimable > 0:
                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.reward_balances[token] -= total_claimable
                # 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)


@view
@external
def reward_contract() -> address:
    """
    @notice Address of the reward contract providing non-CRV 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
@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
    """
    if _value != 0:
        reward_contract: address = convert(self.reward_data % 2**160, address)
        total_supply: uint256 = self.totalSupply

        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

        ERC20(self.lp_token).transferFrom(msg.sender, self, _value)

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


@external
@nonreentrant('lock')
def withdraw(_value: uint256, _claim_rewards: bool = False):
    """
    @notice Withdraw `_value` LP tokens
    @dev Withdrawing also claims pending reward tokens
    @param _value Number of tokens to withdraw
    """
    if _value != 0:
        reward_contract: address = convert(self.reward_data % 2**160, address)
        total_supply: uint256 = self.totalSupply

        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

        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):
    reward_contract: address = convert(self.reward_data % 2**160, address)

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

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

    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, _claim_sig: 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 _claim_sig Four byte selectors for staking, withdrawing and claiming,
                 left 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
    self._checkpoint_rewards(ZERO_ADDRESS, total_supply, False, ZERO_ADDRESS)

    if _reward_contract != ZERO_ADDRESS:
        assert _reward_tokens[0] != ZERO_ADDRESS  # dev: no reward token
        assert _reward_contract.is_contract  # dev: not a contract

    self.reward_data = convert(_reward_contract, uint256)
    self.claim_sig = slice(_claim_sig, 28, 4)
    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:
            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 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":"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":"_admin","type":"address"},{"name":"_lp_token","type":"address"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":288},{"stateMutability":"view","type":"function","name":"reward_contract","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2628},{"stateMutability":"view","type":"function","name":"last_claim","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2454},{"stateMutability":"view","type":"function","name":"claimed_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2976},{"stateMutability":"view","type":"function","name":"claimable_reward","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2944},{"stateMutability":"nonpayable","type":"function","name":"claimable_reward_write","inputs":[{"name":"_addr","type":"address"},{"name":"_token","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2067617},{"stateMutability":"nonpayable","type":"function","name":"set_rewards_receiver","inputs":[{"name":"_receiver","type":"address"}],"outputs":[],"gas":35643},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[{"name":"_addr","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim_rewards","inputs":[{"name":"_addr","type":"address"},{"name":"_receiver","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"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":8092597},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":8130547},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":38091},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_added_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":40635},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_subtracted_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":40659},{"stateMutability":"nonpayable","type":"function","name":"set_rewards","inputs":[{"name":"_reward_contract","type":"address"},{"name":"_claim_sig","type":"bytes32"},{"name":"_reward_tokens","type":"address[8]"}],"outputs":[],"gas":4442660},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":39375},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[],"gas":39320},{"stateMutability":"view","type":"function","name":"lp_token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2928},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3173},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2988},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3448},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":13350},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":11103},{"stateMutability":"view","type":"function","name":"reward_tokens","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3217},{"stateMutability":"view","type":"function","name":"reward_balances","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3353},{"stateMutability":"view","type":"function","name":"rewards_receiver","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"address"}],"gas":3383},{"stateMutability":"view","type":"function","name":"claim_sig","inputs":[],"outputs":[{"name":"","type":"bytes"}],"gas":11223},{"stateMutability":"view","type":"function","name":"reward_integral","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3443},{"stateMutability":"view","type":"function","name":"reward_integral_for","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3688},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3288},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":3318}]

6040611e48610140396020611e4860c03960c05160a01c1561002057600080fd5b60206020611e480160c03960c05160a01c1561003b57600080fd5b606061024060046395d89b416101e0526101fc610160515afa61005d57600080fd5b603f3d1161006a57600080fd5b601b6102406102405101511061007f57600080fd5b6000506102608051602001806101808284600060045af161009f57600080fd5b5050600060096101e0527f43757276652e6669200000000000000000000000000000000000000000000000610200526101e06009806020846102a001018260208501600060045af1505080518201915050610180601a806020846102a001018260208501600060045af15050805182019150506014610240527f205265776172644761756765204465706f736974000000000000000000000000610260526102406014806020846102a001018260208501600060045af1505080518201915050806102a0526102a0905080600460c052602060c020602082510161012060006003818352015b82610120516020021115610198576101ba565b61012051602002850151610120518501555b8151600101808352811415610185575b5050505050506000610180601a8060208461024001018260208501600060045af150508051820191505060066101e0527f2d67617567650000000000000000000000000000000000000000000000000000610200526101e060068060208461024001018260208501600060045af15050805182019150508061024052610240905080600560c052602060c020602082510161012060006002818352015b8261012051602002111561026a5761028c565b61012051602002850151610120518501555b8151600101808352811415610257575b5050505050506101605160005561014051600e55611e3056600436101561000d576112ed565b600035601c52600051341561002157600080fd5b63313ce56781141561003857601260005260206000f35b63bf88a6ff81141561007e5760065474010000000000000000000000000000000000000000808206905090508060a01c1561007257600080fd5b80905060005260206000f35b633488bd198114156100995760065460a01c60005260206000f35b63e77e74378114156101065760043560a01c156100b557600080fd5b60243560a01c156100c557600080fd5b600d60043560e05260c052604060c02060243560e05260c052604060c020547001000000000000000000000000000000008082069050905060005260206000f35b6333fd6f7481141561015d5760043560a01c1561012257600080fd5b60243560a01c1561013257600080fd5b600d60043560e05260c052604060c02060243560e05260c052604060c0205460801c60005260206000f35b6359b7e409811415610215576010541561017657600080fd5b600160105560043560a01c1561018b57600080fd5b60243560a01c1561019b57600080fd5b6000600760c052602060c0205418156101e557600435610140526002546101605260006101805260006101a0526101a051610180516101605161014051600658016112f3565b6000505b600d60043560e05260c052604060c02060243560e05260c052604060c0205460801c600052600060105560206000f35b63bdf981168114156102455760043560a01c1561023157600080fd5b60043560093360e05260c052604060c02055005b63e6f1daf28114156102615733610140526000610160526102dc565b6384e9bd7e8114156102935760006101605260043560a01c1561028357600080fd5b60206004610140376000506102dc565b639faceb1b8114156102d75760043560a01c156102af57600080fd5b602060046101403760243560a01c156102c757600080fd5b60206024610160376000506102dc565b610359565b601054156102e957600080fd5b600160105560006101605118156103095733610140511461030957600080fd5b610140516101605161014051610180526002546101a05260016101c052610160516101e0526101e0516101c0516101a05161018051600658016112f3565b61016052610140526000506000601055005b63b6b55f258114156103755733610140526000610160526103f0565b636e553f658114156103a75760006101605260243560a01c1561039757600080fd5b60206024610140376000506103f0565b6383df67478114156103eb5760243560a01c156103c357600080fd5b602060246101403760443560011c156103db57600080fd5b60206044610160376000506103f0565b6105c6565b601054156103fd57600080fd5b6001601055600060043518156105595760065474010000000000000000000000000000000000000000808206905090508060a01c1561043b57600080fd5b809050610180526002546101a0526101405161016051610180516101a051610140516101c0526101a0516101e052610160516102005260006102205261022051610200516101e0516101c051600658016112f3565b6101a0526101805261016052610140526000506101a080516004358181830110156104ba57600080fd5b8082019050905081525060016101405160e05260c052604060c020546004358181830110156104e857600080fd5b808201905090506101c0526101c05160016101405160e05260c052604060c020556101a05160025560206102a060646323b872dd6101e05233610200523061022052600435610240526101fc60006000545af161054457600080fd5b601f3d1161055157600080fd5b6000506102a0505b60043561018052610140517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c6020610180a2600435610180526101405160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610180a36000601055005b632e1a7d4d8114156105dd5760006101405261060e565b6338d074368114156106095760243560011c156105f957600080fd5b602060246101403760005061060e565b6107c4565b6010541561061b57600080fd5b60016010556000600435181561075d5760065474010000000000000000000000000000000000000000808206905090508060a01c1561065957600080fd5b8090506101605260025461018052610140516101605161018051336101a052610180516101c052610140516101e052600061020052610200516101e0516101c0516101a051600658016112f3565b6101805261016052610140526000506101808051600435808210156106cb57600080fd5b8082039050905081525060013360e05260c052604060c02054600435808210156106f457600080fd5b808203905090506101a0526101a05160013360e05260c052604060c02055610180516002556020610260604463a9059cbb6101c052336101e052600435610200526101dc60006000545af161074857600080fd5b601f3d1161075557600080fd5b600050610260505b60043561016052337f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243646020610160a2600435610160526000337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610160a36000601055005b63a9059cbb81141561082d57601054156107dd57600080fd5b600160105560043560a01c156107f257600080fd5b3361014052600435610160526024356101805261018051610160516101405160065801611993565b6000506001600052600060105560206000f35b6323b872dd811415610935576010541561084657600080fd5b600160105560043560a01c1561085b57600080fd5b60243560a01c1561086b57600080fd5b600360043560e05260c052604060c0203360e05260c052604060c02054610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101405118156108f05761014051604435808210156108cb57600080fd5b80820390509050600360043560e05260c052604060c0203360e05260c052604060c020555b6101405160043561016052602435610180526044356101a0526101a051610180516101605160065801611993565b610140526000506001600052600060105560206000f35b63095ea7b38114156109ae5760043560a01c1561095157600080fd5b60243560033360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f35b6339509351811415610a635760043560a01c156109ca57600080fd5b60033360e05260c052604060c02060043560e05260c052604060c020546024358181830110156109f957600080fd5b80820190509050610140526101405160033360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f35b63a457c2d7811415610b165760043560a01c15610a7f57600080fd5b60033360e05260c052604060c02060043560e05260c052604060c0205460243580821015610aac57600080fd5b80820390509050610140526101405160033360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f35b6347d2d5d3811415610e315760105415610b2f57600080fd5b600160105560043560a01c15610b4457600080fd5b6000610120525b610120516044013560a01c15610b6057600080fd5b6020610120510161012052610100610120511015610b7d57610b4b565b600e543314610b8b57600080fd5b6000546101405260065474010000000000000000000000000000000000000000808206905090508060a01c15610bc057600080fd5b809050610160526002546101805261014051610160516101805160006101a052610180516101c05260006101e052600061020052610200516101e0516101c0516101a051600658016112f3565b61018052610160526101405260005060006004351815610c4657600060443518610c3657600080fd5b60006004353b11610c4657600080fd5b600435600655601c6004602082066101a00160208284011115610c6857600080fd5b60246101c06020840161012060006001818352015b82610120516020021115610c9057610cb5565b61012051602002850135610120516020028501525b8151600101808352811415610c7d575b50505050508181528090509050905080600a60c052602060c020602082510161012060006002818352015b82610120516020021115610cf357610d15565b61012051602002850151610120518501555b8151600101808352811415610ce0575b5050505050506101a060006008818352015b6101a05160088110610d3857600080fd5b600760c052602060c02001546101c05260446101a05160088110610d5b57600080fd5b60200201356101e05260006101c0511815610d87576101e0516101c05114610d8257600080fd5b610dbe565b60006101e0511815610db9576101e0516101a05160088110610da857600080fd5b600760c052602060c0200155610dbe565b610dce565b8151600101808352811415610d27575b505060006004351815610e2a5761014051610160516101805160006101a052610180516101c05260006101e052600061020052610200516101e0516101c0516101a051600658016112f3565b6101805261016052610140526000505b6000601055005b636b441a40811415610e915760043560a01c15610e4d57600080fd5b600e543314610e5b57600080fd5b600435600f55600435610140527f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e96020610140a1005b63e5ea47b8811415610eeb57600f5461014052610140513314610eb357600080fd5b61014051600e5561014051610160527febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056020610160a1005b6382c63066811415610f035760005460005260206000f35b6370a08231811415610f395760043560a01c15610f1f57600080fd5b600160043560e05260c052604060c0205460005260206000f35b6318160ddd811415610f515760025460005260206000f35b63dd62ed3e811415610fa55760043560a01c15610f6d57600080fd5b60243560a01c15610f7d57600080fd5b600360043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6306fdde0381141561104a5760048060c052602060c020610180602082540161012060006003818352015b82610120516020021115610fe357611005565b61012051850154610120516020028501525b8151600101808352811415610fd0575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6395d89b418114156110ef5760058060c052602060c020610180602082540161012060006002818352015b82610120516020021115611088576110aa565b61012051850154610120516020028501525b8151600101808352811415611075575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6354c49fe9811415611120576004356008811061110b57600080fd5b600760c052602060c020015460005260206000f35b63fe9e21788114156111565760043560a01c1561113c57600080fd5b600860043560e05260c052604060c0205460005260206000f35b6301ddabf181141561118c5760043560a01c1561117257600080fd5b600960043560e05260c052604060c0205460005260206000f35b63b7aca56881141561123157600a8060c052602060c020610180602082540161012060006002818352015b826101205160200211156111ca576111ec565b61012051850154610120516020028501525b81516001018083528114156111b7575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6373861fb38114156112675760043560a01c1561124d57600080fd5b600b60043560e05260c052604060c0205460005260206000f35b63f05cc0588114156112bb5760043560a01c1561128357600080fd5b60243560a01c1561129357600080fd5b600c60043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b63f851a4408114156112d357600e5460005260206000f35b6317f7182a8114156112eb57600f5460005260206000f35b505b60006000fd5b6101c0526101405261016052610180526101a0526006546101e05260006101605118156113555760006101e051181561134d576101e05160a01c610e1081818301101561133f57600080fd5b808201905090504211611350565b60005b611358565b60005b1561142b576101e05174010000000000000000000000000000000000000000808206905090508060a01c1561138c57600080fd5b80905061020052600a8060c052602060c020610220602082540161012060006002818352015b826101205160200211156113c5576113e7565b61012051850154610120516020028501525b81516001018083528114156113b2575b50505050505060006000610220516102406000610200515af161140957600080fd5b610200514260a01b81818301101561142057600080fd5b808201905090506006555b6101a051610200526101805115611446576102005115611449565b60005b156114775760096101405160e05260c052604060c02054610200526102005115156114775761014051610200525b60016101405160e05260c052604060c020546102205261024060006008818352015b61024051600881106114aa57600080fd5b600760c052602060c0200154610260526102605115156114c95761198b565b60006102805260006101605118156115e357602061034060246370a082316102c052306102e0526102dc610260515afa61150257600080fd5b601f3d1161150f57600080fd5b600050610340516102a052670de0b6b3a76400006102a05160086102605160e05260c052604060c020548082101561154657600080fd5b80820390509050808202821582848304141761156157600080fd5b8090509050905061016051808061157757600080fd5b820490509050610280526102a05160086102605160e05260c052604060c020556101405115156115e35760006102805118156115de57600b6102605160e05260c052604060c0208054610280518181830110156115d357600080fd5b808201905090508155505b61197b565b600b6102605160e05260c052604060c020546102805181818301101561160857600080fd5b808201905090506102a0526000610280511815611636576102a051600b6102605160e05260c052604060c020555b600c6102605160e05260c052604060c0206101405160e05260c052604060c020546102c0526102a0516102c051111515611671576001611677565b61016051155b1561197b57610220516102a0516102c0518082101561169557600080fd5b8082039050905080820282158284830414176116b057600080fd5b80905090509050670de0b6b3a7640000808204905090506102e0526102a051600c6102605160e05260c052604060c0206101405160e05260c052604060c02055600d6101405160e05260c052604060c0206102605160e05260c052604060c02054610300526103005170010000000000000000000000000000000080820690509050610320526103005160801c6102e05181818301101561175057600080fd5b808201905090506103405261018051156117705760006103405111611773565b60005b1561192c57600060046103c0527fa9059cbb000000000000000000000000000000000000000000000000000000006103e0526103c060048060208461042001018260208501600060045af15050805182019150506102005160208261042001015260208101905061034051602082610420010152602081019050806104205261042090508051602001806104c08284600060045af161181157600080fd5b505060206105806104c0516104e06000610260515af161183057600080fd5b60203d808211156118415780611843565b815b90509050610560526105608051602001806103608284600060045af161186857600080fd5b505060006103605118156118ba5761036080602001516000825180602090131561189157600080fd5b809190121561189f57600080fd5b806020036101000a820490509050905015156118ba57600080fd5b60086102605160e05260c052604060c020805461034051808210156118de57600080fd5b8082039050905081555061032051610340518181830110156118ff57600080fd5b80820190509050600d6101405160e05260c052604060c0206102605160e05260c052604060c0205561197b565b60006102e051111561197b57610320516103405160801b81818301101561195257600080fd5b80820190509050600d6101405160e05260c052604060c0206102605160e05260c052604060c020555b8151600101808352811415611499575b50506101c051565b6101a05261014052610160526101805260065474010000000000000000000000000000000000000000808206905090508060a01c156119d157600080fd5b8090506101c0526000610180511815611b4e576002546101e0526101405161016051610180516101a0516101c0516101e05161014051610200526101e0516102205260006102405260006102605261026051610240516102205161020051600658016112f3565b6101e0526101c0526101a05261018052610160526101405260005060016101405160e05260c052604060c020546101805180821015611a7657600080fd5b80820390509050610200526102005160016101405160e05260c052604060c020556101405161016051610180516101a0516101c0516101e0516102005161016051610220526101e0516102405260006102605260006102805261028051610260516102405161022051600658016112f3565b610200526101e0526101c0526101a05261018052610160526101405260005060016101605160e05260c052604060c0205461018051818183011015611b2c57600080fd5b80820190509050610200526102005160016101605160e05260c052604060c020555b610180516101e05261016051610140517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60206101e0a36101a051565b6102a5611e30036102a56000396102a5611e30036000f30000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a0000000000000000000000008096ac61db23291252574d49f036f0f9ed8ab390

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.