Contract 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 4

 

Contract Overview

Balance:
0 ETH

ETH Value:
$0.00

Token:

Txn Hash Method
Block
From
To
Value [Txn Fee]
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x4057e257093ffcb8ee55ca10349109f7a82b0c9fde40405013f743da4874b294557066052023-01-26 21:57:088 days 17 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0x4057e257093ffcb8ee55ca10349109f7a82b0c9fde40405013f743da4874b294557066052023-01-26 21:57:088 days 17 hrs ago 0x4fd63966879300cafafbb35d157dc5229278ed23 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0xb942084c65d1f34d724375fd7f26adc2d3d810c5c23b77553f208678124b9a59500767972022-12-31 22:22:0934 days 16 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0xb942084c65d1f34d724375fd7f26adc2d3d810c5c23b77553f208678124b9a59500767972022-12-31 22:22:0934 days 16 hrs ago 0x4fd63966879300cafafbb35d157dc5229278ed23 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0xaa552cea175415bada501d89f560665e592ffd3a87460044ef921909ef8558f4491716702022-12-27 10:06:1439 days 4 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0xaa552cea175415bada501d89f560665e592ffd3a87460044ef921909ef8558f4491716702022-12-27 10:06:1439 days 4 hrs ago 0x4fd63966879300cafafbb35d157dc5229278ed23 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0x362b652e21be083b6730b511426262598e7164bd58a7d7f258d0fb3da0a167d4486201052022-12-24 23:25:2641 days 15 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0x362b652e21be083b6730b511426262598e7164bd58a7d7f258d0fb3da0a167d4486201052022-12-24 23:25:2641 days 15 hrs ago 0x4fd63966879300cafafbb35d157dc5229278ed23 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0x362b652e21be083b6730b511426262598e7164bd58a7d7f258d0fb3da0a167d4486201052022-12-24 23:25:2641 days 15 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0x362b652e21be083b6730b511426262598e7164bd58a7d7f258d0fb3da0a167d4486201052022-12-24 23:25:2641 days 15 hrs ago 0xa0dabebaad1b243bbb243f933013d560819eb66f 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0x10007bf1c6484f9232fd04c5d2c504299381e2f10c753e439a24ba25cc1c004c445784702022-12-08 11:07:4958 days 3 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0x10007bf1c6484f9232fd04c5d2c504299381e2f10c753e439a24ba25cc1c004c445784702022-12-08 11:07:4958 days 3 hrs ago 0x4fd63966879300cafafbb35d157dc5229278ed23 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0x10007bf1c6484f9232fd04c5d2c504299381e2f10c753e439a24ba25cc1c004c445784702022-12-08 11:07:4958 days 3 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0x10007bf1c6484f9232fd04c5d2c504299381e2f10c753e439a24ba25cc1c004c445784702022-12-08 11:07:4958 days 3 hrs ago 0xa0dabebaad1b243bbb243f933013d560819eb66f 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0x45c1d270267fddb82d569a2db64f7da6037835a299d2676ab4498d06a4b706cc396778772022-11-20 15:57:3075 days 23 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0x45c1d270267fddb82d569a2db64f7da6037835a299d2676ab4498d06a4b706cc396778772022-11-20 15:57:3075 days 23 hrs ago 0x4fd63966879300cafafbb35d157dc5229278ed23 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0x82980a8d5b27bd6cd78158b54e201b66813a391d2c4c590657b1171ec2b0d5e3382285492022-11-15 7:25:4881 days 7 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0x82980a8d5b27bd6cd78158b54e201b66813a391d2c4c590657b1171ec2b0d5e3382285492022-11-15 7:25:4881 days 7 hrs ago 0x4fd63966879300cafafbb35d157dc5229278ed23 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0x709e30b399b6a1ff5f559a600905edb7a4b4c07bd9bf63ec68c503a51be9e9de381907742022-11-15 3:40:5381 days 11 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0x709e30b399b6a1ff5f559a600905edb7a4b4c07bd9bf63ec68c503a51be9e9de381907742022-11-15 3:40:5381 days 11 hrs ago 0x4fd63966879300cafafbb35d157dc5229278ed23 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0x2c43c1fd96e1b6e943fc3ce282950e0b9a51b1f4958454e9afd089e09f51e4a6373831402022-11-12 2:53:5584 days 12 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0x2c43c1fd96e1b6e943fc3ce282950e0b9a51b1f4958454e9afd089e09f51e4a6373831402022-11-12 2:53:5584 days 12 hrs ago 0x4fd63966879300cafafbb35d157dc5229278ed23 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0xe5003cbf759a023547dae9e4029f383db156bc24b9b0b3e6af32e825917fcf0a371468492022-11-11 7:48:2785 days 7 hrs ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
0xe5003cbf759a023547dae9e4029f383db156bc24b9b0b3e6af32e825917fcf0a371468492022-11-11 7:48:2785 days 7 hrs ago 0x4fd63966879300cafafbb35d157dc5229278ed23 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20 ETH
0x3ffe7406e9399683a61df7552ecd19d61ecbc93045dc0d1b2b81ec1d68cd7e74354673682022-11-05 13:18:2991 days 1 hr ago 0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f80 ETH
[ Download CSV Export 
Latest 14 Deposits
L2 Txn Hash L1 Deposit Txn Value Token
0x86fd149f7e0d91db32341e62f40efd4051ba8cdc46c24574032a771898d894b32022-07-28 0:19:21191 days 14 hrs ago0x444b852110158823f09553fccb1ced93ed74fd096678d95bc7e52ab9b59e067537.033380276161029895 Balancer (BAL)
0x6510d949f57bd459ad49fccb4feef8d731a2e7802997ab8cc36e334e52df58fb2022-07-21 0:17:57198 days 14 hrs ago0x8cf2a5df34410f5cb8e87025dab0f6efb2626c36fc4a5c951a2c6b370aa1461f38.284541167439574891 Balancer (BAL)
0x9c3958db74b7fec32918e5bc9c3489cb51557c51b0e09fa90610396048d2fe442022-07-14 0:25:03205 days 14 hrs ago0x759b01ce4c2a1f24d1be157ea3f9971f45f5a5ef7600578ba9d8f530d1d7a6b949.55025581182075986 Balancer (BAL)
0xb78476c9074fb86bb1d25f7a80d7302b2f59318bf644a49b342d516b2d8115782022-07-07 0:00:50212 days 14 hrs ago0x5d166cb4c0469af33de17cbde910c1a93a42dd54eb1acf1ee468283f7856145152.154212856331114852 Balancer (BAL)
0xbcb127a9f1d5f4bab4b95e34c2e80c19cff6ff93dd7cd5822967ebfbf444176d2022-06-30 0:15:01219 days 14 hrs ago0x11bf6bfc79b262dba2f7aab9fac37b885ee944c5b3bfb9d8dbf839713ff2f60e88.795106808336089749 Balancer (BAL)
0x01752c0a629afda7b7936e5b33717fbe7886fe2cdf52b044ab8f9bd9f5819bb72022-06-23 7:25:22226 days 7 hrs ago0xfeb105fdeb350e020ff3224710e4e5c511e4fd7213e1aee24fccfc1ed32f31d092.465271054291184738 Balancer (BAL)
0x155441ccc7abe75ecc7a281484a6b47d5d6dd90b49df12e0afed84d43ccd16072022-06-16 0:39:37233 days 14 hrs ago0x0fd0fef09083afc2ef5edf12403ec3edbeb7a24b211044941116d6943a6bb93994.884241404805204731 Balancer (BAL)
0xa4d945605b0d0ebe06d2df4a7cee52b31850ce3b22853461942284eeb578f7072022-06-09 1:16:21240 days 13 hrs ago0xdcaad70fb1b7f5172b24eb0a8c34a8da6dbeeec619b82fd4a2b7219734c56b56100.484152516647914716 Balancer (BAL)
0x4f801a0d692628e32c7bd487bf16f6a690f67bef5584d9c3949be489200a250d2022-06-02 12:26:17247 days 2 hrs ago0xee279dbcd88aa1232f2d0d8aea9ef0e1fc5f9e953f837561b4c580b012cf5ca090.300675716864924744 Balancer (BAL)
0xe3cecdd0e84dc6af8c9a19d823d1367ca9af5bf3db82778cb0fd9c54571eefb72022-05-26 0:12:41254 days 14 hrs ago0xb64446a92ac289abd1ee3758a0f1ffe4a440bc32398989fe6f514c4a9fc3420e123.79811347302850965 Balancer (BAL)
0xf102861bbf37ac76947379b3135b152d7becf9bf7ce8a2aa0c0e8f38e603d2612022-05-19 0:28:36261 days 14 hrs ago0xd0b06caf826f649ee2c32592d5f79ecbf4c9cc4ffe7307cedd28af153067b8c0237.580193244342919328 Balancer (BAL)
0x63014901776c97ca1416ee70ad891bf9c9ee3eba89aa71439fe869c79fea51142022-05-12 0:04:35268 days 14 hrs ago0xf8b6c299c89e77aa9e830e35cd5b663e87ad61558181d140450709437469e5b6333.323209223762994058 Balancer (BAL)
0x9403ae214643c2b95e95f89d2ce3fae111a68e13dd7f58b8a8e8d267c3ad5b142022-05-05 10:53:53275 days 4 hrs ago0x3534c422bd6aca53603c0b9e0d64db1c611e729d7de5945270eaddb894533736359.564489581236393984 Balancer (BAL)
0x07c03519fa5e757aeb6ad24e986e5b5dfcd56aa460d7c77a027da28b705003c02022-04-28 7:49:26282 days 7 hrs ago0xb7049c065ce0b3272b41b26365d08a75eb772430f4d4646dd0626e228740edf7464.155120855445583688 Balancer (BAL)
[ Download CSV Export 
Loading

Minimal Proxy Contract for 0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f8

Contract Name:
Vyper_contract

Compiler Version
vyper:0.3.1

Optimization Enabled:
N/A

Other Settings:
, MIT license
Decompile ByteCode

Contract Source Code (Vyper language format)

# @version 0.3.1
"""
@title Child-Chain Streamer
@author Curve.Fi
@license MIT
@notice Evenly streams one or more reward tokens to a single recipient
"""

from vyper.interfaces import ERC20

event RewardDistributorUpdated:
    reward_token: indexed(address)
    distributor: address

event RewardDurationUpdated:
    reward_token: indexed(address)
    duration: uint256

struct RewardToken:
    distributor: address
    period_finish: uint256
    rate: uint256
    duration: uint256
    received: uint256
    paid: uint256

MAX_REWARDS: constant(uint256) = 8
WEEK: constant(uint256) = 7 * 86400

BAL_TOKEN: immutable(address)
AUTHORIZER_ADAPTOR: immutable(address)

# The reward receiver is actually immutable, but kept in storage due to this contract being used via proxies
reward_receiver: public(address)

reward_tokens: public(address[MAX_REWARDS])
reward_count: public(uint256)
reward_data: public(HashMap[address, RewardToken])
last_update_time: public(uint256)


@external
def __init__(_bal_token: address, _authorizerAdaptor: address):
    BAL_TOKEN = _bal_token
    AUTHORIZER_ADAPTOR = _authorizerAdaptor

    # prevent initialization of implementation
    self.reward_receiver = 0x000000000000000000000000000000000000dEaD


@internal
def _add_reward(_token: address, _distributor: address, _duration: uint256):
    """
    @notice Add a reward token
    @param _token Address of the reward token
    @param _distributor Address permitted to call `notify_reward_amount` for this token
    @param _duration Number of seconds that rewards of this token are streamed over
    """
    assert self.reward_data[_token].distributor == ZERO_ADDRESS, "Reward token already added"

    idx: uint256 = self.reward_count
    self.reward_tokens[idx] = _token
    self.reward_count = idx + 1
    self.reward_data[_token].distributor = _distributor
    self.reward_data[_token].duration = _duration
    log RewardDistributorUpdated(_token, _distributor)
    log RewardDurationUpdated(_token, _duration)


@external
def add_reward(_token: address, _distributor: address, _duration: uint256):
    """
    @notice Add a reward token
    @param _token Address of the reward token
    @param _distributor Address permitted to call `notify_reward_amount` for this token
    @param _duration Number of seconds that rewards of this token are streamed over
    """
    assert msg.sender == AUTHORIZER_ADAPTOR  # dev: owner only
    self._add_reward(_token, _distributor, _duration)

@external
def remove_reward(_token: address, _recipient: address):
    """
    @notice Remove a reward token
    @dev Any remaining balance of the reward token is transferred to the owner
    @param _token Address of the reward token
    @param _recipient Address to receive the removed tokens
    """
    assert msg.sender == AUTHORIZER_ADAPTOR  # dev: only owner
    assert self.reward_data[_token].distributor != ZERO_ADDRESS, "Reward token not added"

    self.reward_data[_token] = empty(RewardToken)
    amount: uint256 = ERC20(_token).balanceOf(self)
    response: Bytes[32] = raw_call(
        _token,
        concat(
            method_id("transfer(address,uint256)"),
            convert(_recipient, bytes32),
            convert(amount, bytes32),
        ),
        max_outsize=32,
    )
    if len(response) != 0:
        assert convert(response, bool)

    idx: uint256 = self.reward_count - 1
    for i in range(MAX_REWARDS):
        if self.reward_tokens[i] == _token:
            self.reward_tokens[i] = self.reward_tokens[idx]
            self.reward_tokens[idx] = ZERO_ADDRESS
            self.reward_count = idx
            log RewardDistributorUpdated(_token, ZERO_ADDRESS)
            log RewardDurationUpdated(_token, 0)
            return
    raise  # this should never be reached


@internal
def _update_reward(_token: address, _last_update: uint256):
    # update data about a reward and distribute any pending tokens to the receiver
    last_time: uint256 = min(block.timestamp, self.reward_data[_token].period_finish)
    if last_time > _last_update:
        amount: uint256 = (last_time - _last_update) * self.reward_data[_token].rate
        if amount > 0:
            self.reward_data[_token].paid += amount
            response: Bytes[32] = raw_call(
                _token,
                concat(
                    method_id("transfer(address,uint256)"),
                    convert(self.reward_receiver, bytes32),
                    convert(amount, bytes32),
                ),
                max_outsize=32,
            )
            if len(response) != 0:
                assert convert(response, bool)

@external
def get_reward():
    """
    @notice Claim pending rewards for `reward_receiver`
    """
    last_update: uint256 = self.last_update_time
    for token in self.reward_tokens:
        if token == ZERO_ADDRESS:
            break
        self._update_reward(token, last_update)
    self.last_update_time = block.timestamp


@external
def notify_reward_amount(_token: address):
    """
    @notice Notify the contract of a newly received reward
    @dev Only callable by the distributor if there is an active reward period.
         The reward tokens must be transferred into the contract prior to calling
         this function. Rewards are distributed over `reward_duration` seconds.
         Updating the reward amount while an existing reward period is still active
         causes the remaining rewards to be evenly distributed over the new period.
    @param _token Address of the reward token
    """
    last_update: uint256 = self.last_update_time
    is_updated: bool = False
    for token in self.reward_tokens:
        if token == ZERO_ADDRESS:
            break

        self._update_reward(token, last_update)
        if token == _token:
            received: uint256 = self.reward_data[token].received
            expected_balance: uint256 = received - self.reward_data[token].paid
            actual_balance: uint256 = ERC20(token).balanceOf(self)

            if actual_balance > expected_balance:
                new_amount: uint256 = actual_balance - expected_balance
                duration: uint256 = self.reward_data[token].duration

                if block.timestamp >= self.reward_data[token].period_finish:
                    self.reward_data[token].rate = new_amount / duration
                else:
                    assert msg.sender == self.reward_data[_token].distributor, "Reward period still active"
                    remaining: uint256 = self.reward_data[token].period_finish - block.timestamp
                    leftover: uint256 = remaining * self.reward_data[token].rate
                    self.reward_data[token].rate = (new_amount + leftover) / duration

                self.reward_data[token].period_finish = block.timestamp + duration
                self.reward_data[token].received = received + new_amount
                is_updated = True

    assert is_updated, "Invalid token or no new reward"
    self.last_update_time = block.timestamp


@external
def set_reward_duration(_token: address, _duration: uint256):
    """
    @notice Modify the duration that rewards are distributed over
    @dev Only callable when there is not an active reward period
    @param _token Address of the reward token
    @param _duration Number of seconds to distribute rewards over
    """
    assert msg.sender == self.reward_data[_token].distributor  # dev: only owner
    assert block.timestamp > self.reward_data[_token].period_finish, "Reward period still active"
    self.reward_data[_token].duration = _duration
    log RewardDurationUpdated(_token, _duration)


@external
def set_reward_distributor(_token: address, _distributor: address):
    """
    @notice Modify the reward distributor
    @param _token Address of the reward token
    @param _distributor Reward distributor
    """
    assert msg.sender == self.reward_data[_token].distributor or msg.sender == AUTHORIZER_ADAPTOR
    self.reward_data[_token].distributor = _distributor
    log RewardDistributorUpdated(_token, _distributor)

# Initializer

@external
def initialize(reward_receiver: address):
    """
    @notice Contract constructor
    @param reward_receiver RewardsOnlyGauge address
    """
    assert self.reward_receiver == ZERO_ADDRESS
    assert reward_receiver != ZERO_ADDRESS
    
    self.reward_receiver = reward_receiver

    # The first reward token will always be BAL, we then have the authorizer adaptor
    # as the distributor to ensure that governance has the ability to distribute.
    # The Authorizer adaptor can always update the distributor should Balancer governance wish.
    self._add_reward(BAL_TOKEN, AUTHORIZER_ADAPTOR, WEEK)

Contract ABI

[{"name":"RewardDistributorUpdated","inputs":[{"name":"reward_token","type":"address","indexed":true},{"name":"distributor","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"RewardDurationUpdated","inputs":[{"name":"reward_token","type":"address","indexed":true},{"name":"duration","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_bal_token","type":"address"},{"name":"_authorizerAdaptor","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"add_reward","inputs":[{"name":"_token","type":"address"},{"name":"_distributor","type":"address"},{"name":"_duration","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"remove_reward","inputs":[{"name":"_token","type":"address"},{"name":"_recipient","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"get_reward","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"notify_reward_amount","inputs":[{"name":"_token","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_reward_duration","inputs":[{"name":"_token","type":"address"},{"name":"_duration","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_reward_distributor","inputs":[{"name":"_token","type":"address"},{"name":"_distributor","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"initialize","inputs":[{"name":"reward_receiver","type":"address"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"reward_receiver","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"reward_tokens","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"reward_count","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"reward_data","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"distributor","type":"address"},{"name":"period_finish","type":"uint256"},{"name":"rate","type":"uint256"},{"name":"duration","type":"uint256"},{"name":"received","type":"uint256"},{"name":"paid","type":"uint256"}]}]},{"stateMutability":"view","type":"function","name":"last_update_time","inputs":[],"outputs":[{"name":"","type":"uint256"}]}]

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