Contract 0xb1c4426C86082D91a6c097fC588E5D5d8dD1f5a8 8

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xb23d08a9ef4f31273c661b1543e14570581e9ffedd76ef6400e39c545b06f27aVote_for_gauge_w...369818342022-04-26 6:07:15287 days 3 hrs ago0xea63ac94a7ffab1a8a82e3b76da5dfeade80c4d5 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.048611862677
0x8864fbe6d17725ecb7969da346bcaf50acc1d1f692f15838180c09f80b2d1efeVote_for_gauge_w...369818082022-04-26 6:06:49287 days 3 hrs ago0xea63ac94a7ffab1a8a82e3b76da5dfeade80c4d5 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.02258342779
0x74187c11ef02326843841fad4da2816db10349720190bb381ad26970442a5385Vote_for_gauge_w...369303312022-04-25 12:59:26287 days 20 hrs ago0x213d7a0d7aaaee1634f2a7e5525aa4b786985ea4 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.031172332687
0x82d49c46c8277a0e0685ee78128816ef7218c49c751811134eb3e519c4f0a87aVote_for_gauge_w...368627682022-04-24 14:23:19288 days 19 hrs ago0x63f6e20f416fcc4ebf384d663862523a59dbe608 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.022420746657
0x27cca1eb8abeb3f265152df6faa8d0a9ae4dd5cd314d6c8b1306fc629b352a28Vote_for_gauge_w...367905892022-04-23 15:55:30289 days 17 hrs ago0xdfa5ce59c8363522b559e109d17fc880b59ccf88 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.043797766706
0xbe564f440094eb0a8779e1796053880f0881a192abe3a784a77026215bf3f132Vote_for_gauge_w...367532602022-04-23 4:35:18290 days 4 hrs ago0xc966392dc62da2c60c484b46cb97c36330565bf1 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.013207215395
0xf7cd2d7bcec19f69bd31b98c6e447d4897c16fd78fad7d479c8a52c7fcc95a26Vote_for_gauge_w...367135262022-04-22 16:40:08290 days 16 hrs ago0x1f452ea54d4d934afadc300c61ca0a3b1bbde958 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.033215027989
0xbc8b2ca5a9bc48e4442fccc96379894cdc47f591fb13bd7598f2ecbc3b9ece51Vote_for_gauge_w...365225462022-04-20 9:24:40293 days 6 mins ago0x0a56be2fa7be546a910399e4723925d12a87f2cd IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.04238525333
0xed5947f225b74565cf217638d47eef4727a0de60ef34d88bbb1ba032ede07f00Vote_for_gauge_w...364582682022-04-19 14:13:27293 days 19 hrs ago0x4ba7406e177f5238e1c6713ddb2a98e6d86e361d IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.234869439999
0x2b597ea7e2c96f0f2f9dcb55217802a5f0378e173581bf81ab3e1fa189375633Vote_for_gauge_w...364333652022-04-19 6:44:22294 days 2 hrs ago0x963e464c78d5d2a16a2563a96fe85c637f9d1c41 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.031091612423
0x87e109cb51954b0ed7ea4529f12c01b23e70a07e3c2202d3def0eae4b08f6c33Vote_for_gauge_w...362743252022-04-17 7:48:14296 days 1 hr ago0xd516c9877578f3d21c4221fbd3cb8d2a17312ebe IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.012907071949
0x8f984a5649083a5415d3002fcf8219393a728da70db40bbca1597a4a6e99dff4Vote_for_gauge_w...361184742022-04-15 12:26:26297 days 21 hrs ago0xf118e70ce1e73fc9a25ca9116cd43e00618411b2 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.057612521928
0xda00e364369f2266cca7a6b9cb4fab98c95017f62e04ed152d473f14ebf7b9c8Vote_for_gauge_w...359146712022-04-12 23:58:58300 days 9 hrs ago0x9092baeff0abdd6ac6e92fc4e7fedb7ca71d7011 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.054846263447
0xe3d6fd75b3c40bf1b1697d1d07968b509f432f0ae19038d2691bc6b03e0813e8Vote_for_gauge_w...358808732022-04-12 13:42:25300 days 19 hrs ago0x5275817b74021e97c980e95ede6bbac0d0d6f3a2 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.029102492805
0xe91918ed066ffbb2efd380706ff2cbb763155f03c2f4dc1172f4f1f6ca5c0a67Vote_for_gauge_w...358808242022-04-12 13:41:38300 days 19 hrs ago0x5275817b74021e97c980e95ede6bbac0d0d6f3a2 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.072299115439
0xd73dd957b2901f71a29d6a0e9ebc731702d922233c267f283c6b638f90731013Vote_for_gauge_w...358465642022-04-12 3:46:22301 days 5 hrs ago0x683f457588ab0ec7bb85bb7e3aa072598caf1e5d IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.028397146868
0xf0499ef811bd557ab65c28bb14df87103c97d3b904c118ae228d248bc85421a6Vote_for_gauge_w...358465392022-04-12 3:45:57301 days 5 hrs ago0x683f457588ab0ec7bb85bb7e3aa072598caf1e5d IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.014737117564
0xc2d1969b9fdf276bf855859055119e4ca06c747f4bd5d8432325ba9003da6747Vote_for_gauge_w...358092712022-04-11 16:57:49301 days 16 hrs ago0xe26edca05417a65819295c49fc67272ab247d791 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.075701526967
0x9fd4da3064920c65703f58e1043292137af52034c91f47acad153fb3acd28d40Vote_for_gauge_w...358089482022-04-11 16:52:15301 days 16 hrs ago0xe26edca05417a65819295c49fc67272ab247d791 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.040944088042
0xc5185389079389bf50f0eb712ffd02684ab47fa45f629ea3efe7fb5667d7f3ccVote_for_gauge_w...356590302022-04-09 20:45:23303 days 12 hrs ago0x14e2fcb696cd915924a85c312c9811be7f12e943 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.036398262098
0xabbcd1f8e4a93691e40532808b4436b4d6f392d2ccd99a5fa6c99397655ba713Vote_for_gauge_w...356590012022-04-09 20:44:57303 days 12 hrs ago0x14e2fcb696cd915924a85c312c9811be7f12e943 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.029782191098
0x1e70b3541272551444394bb76e2c2001cf4983e79a516796df09dfd110d93cdfVote_for_gauge_w...356588872022-04-09 20:43:16303 days 12 hrs ago0x14e2fcb696cd915924a85c312c9811be7f12e943 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.024162513289
0x9ce382484e19030e3c70bd56fe3cac27166cdad5465f8d783d40439a232f87a4Vote_for_gauge_w...356507342022-04-09 18:18:06303 days 15 hrs ago0xc3b0e0e262eb5a0ba76c09a930187f888ab218d3 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.031320059361
0x97b6daeb7230b85e6d8f1e955e1d43fc4639f50ae4b768b98a2731913f9cd70dVote_for_gauge_w...356506932022-04-09 18:17:28303 days 15 hrs ago0xc3b0e0e262eb5a0ba76c09a930187f888ab218d3 IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.011505770146
0xce20baca40534b54e6128c9ab58212b1d05106f16b7a8c2a1c76aaeb8e93a12dVote_for_gauge_w...355182862022-04-08 4:52:41305 days 4 hrs ago0xaeda705a45b2afccb1d361465f790cdaecc3aafd IN  0xb1c4426c86082d91a6c097fc588e5d5d8dd1f5a80 FTM0.028362817
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xe20e776e918f31e188037f75550b30469aa46182c9d40324d9e060ad2b0f6864244551612021-12-09 12:59:57424 days 20 hrs ago 0xb16a11442878d6f1ef202ae63233a7c13e98fd7f  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

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 Gauge Controller
@author Curve Finance
@license MIT
@notice Controls liquidity gauges and the issuance of coins through the gauges
"""

# 7 * 86400 seconds - all future times are rounded by week
WEEK: constant(uint256) = 604800

# Cannot change weight votes more often than once in 10 days
WEIGHT_VOTE_DELAY: constant(uint256) = 10 * 86400


struct Point:
    bias: uint256
    slope: uint256

struct VotedSlope:
    slope: uint256
    power: uint256
    end: uint256


interface VotingEscrow:
    def get_last_user_slope(addr: address) -> int128: view
    def locked__end(addr: address) -> uint256: view


event CommitOwnership:
    admin: address

event ApplyOwnership:
    admin: address

event AddType:
    name: String[64]
    type_id: int128

event NewTypeWeight:
    type_id: int128
    time: uint256
    weight: uint256
    total_weight: uint256

event NewGaugeWeight:
    gauge_address: address
    time: uint256
    weight: uint256
    total_weight: uint256

event VoteForGauge:
    time: uint256
    user: address
    gauge_addr: address
    weight: uint256

event NewGauge:
    addr: address
    gauge_type: int128
    weight: uint256


MULTIPLIER: constant(uint256) = 10 ** 18

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

token: public(address)  # CRV token
voting_escrow: public(address)  # Voting escrow

# Gauge parameters
# All numbers are "fixed point" on the basis of 1e18
n_gauge_types: public(int128)
n_gauges: public(int128)
gauge_type_names: public(HashMap[int128, String[64]])

# Needed for enumeration
gauges: public(address[1000000000])

# we increment values by 1 prior to storing them here so we can rely on a value
# of zero as meaning the gauge has not been set
gauge_types_: HashMap[address, int128]

vote_user_slopes: public(HashMap[address, HashMap[address, VotedSlope]])  # user -> gauge_addr -> VotedSlope
vote_user_power: public(HashMap[address, uint256])  # Total vote power used by user
last_user_vote: public(HashMap[address, HashMap[address, uint256]])  # Last user vote's timestamp for each gauge address

# Past and scheduled points for gauge weight, sum of weights per type, total weight
# Point is for bias+slope
# changes_* are for changes in slope
# time_* are for the last change timestamp
# timestamps are rounded to whole weeks

points_weight: public(HashMap[address, HashMap[uint256, Point]])  # gauge_addr -> time -> Point
changes_weight: HashMap[address, HashMap[uint256, uint256]]  # gauge_addr -> time -> slope
time_weight: public(HashMap[address, uint256])  # gauge_addr -> last scheduled time (next week)

points_sum: public(HashMap[int128, HashMap[uint256, Point]])  # type_id -> time -> Point
changes_sum: HashMap[int128, HashMap[uint256, uint256]]  # type_id -> time -> slope
time_sum: public(uint256[1000000000])  # type_id -> last scheduled time (next week)

points_total: public(HashMap[uint256, uint256])  # time -> total weight
time_total: public(uint256)  # last scheduled time

points_type_weight: public(HashMap[int128, HashMap[uint256, uint256]])  # type_id -> time -> type weight
time_type_weight: public(uint256[1000000000])  # type_id -> last scheduled time (next week)


@external
def __init__(_token: address, _voting_escrow: address):
    """
    @notice Contract constructor
    @param _token `ERC20CRV` contract address
    @param _voting_escrow `VotingEscrow` contract address
    """
    assert _token != ZERO_ADDRESS
    assert _voting_escrow != ZERO_ADDRESS

    self.admin = msg.sender
    self.token = _token
    self.voting_escrow = _voting_escrow
    self.time_total = block.timestamp / WEEK * WEEK


@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 apply_transfer_ownership():
    """
    @notice Apply pending ownership transfer
    """
    assert msg.sender == self.admin  # dev: admin only
    _admin: address = self.future_admin
    assert _admin != ZERO_ADDRESS  # dev: admin not set
    self.admin = _admin
    log ApplyOwnership(_admin)


@external
@view
def gauge_types(_addr: address) -> int128:
    """
    @notice Get gauge type for address
    @param _addr Gauge address
    @return Gauge type id
    """
    gauge_type: int128 = self.gauge_types_[_addr]
    assert gauge_type != 0

    return gauge_type - 1


@internal
def _get_type_weight(gauge_type: int128) -> uint256:
    """
    @notice Fill historic type weights week-over-week for missed checkins
            and return the type weight for the future week
    @param gauge_type Gauge type id
    @return Type weight
    """
    t: uint256 = self.time_type_weight[gauge_type]
    if t > 0:
        w: uint256 = self.points_type_weight[gauge_type][t]
        for i in range(500):
            if t > block.timestamp:
                break
            t += WEEK
            self.points_type_weight[gauge_type][t] = w
            if t > block.timestamp:
                self.time_type_weight[gauge_type] = t
        return w
    else:
        return 0


@internal
def _get_sum(gauge_type: int128) -> uint256:
    """
    @notice Fill sum of gauge weights for the same type week-over-week for
            missed checkins and return the sum for the future week
    @param gauge_type Gauge type id
    @return Sum of weights
    """
    t: uint256 = self.time_sum[gauge_type]
    if t > 0:
        pt: Point = self.points_sum[gauge_type][t]
        for i in range(500):
            if t > block.timestamp:
                break
            t += WEEK
            d_bias: uint256 = pt.slope * WEEK
            if pt.bias > d_bias:
                pt.bias -= d_bias
                d_slope: uint256 = self.changes_sum[gauge_type][t]
                pt.slope -= d_slope
            else:
                pt.bias = 0
                pt.slope = 0
            self.points_sum[gauge_type][t] = pt
            if t > block.timestamp:
                self.time_sum[gauge_type] = t
        return pt.bias
    else:
        return 0


@internal
def _get_total() -> uint256:
    """
    @notice Fill historic total weights week-over-week for missed checkins
            and return the total for the future week
    @return Total weight
    """
    t: uint256 = self.time_total
    _n_gauge_types: int128 = self.n_gauge_types
    if t > block.timestamp:
        # If we have already checkpointed - still need to change the value
        t -= WEEK
    pt: uint256 = self.points_total[t]

    for gauge_type in range(100):
        if gauge_type == _n_gauge_types:
            break
        self._get_sum(gauge_type)
        self._get_type_weight(gauge_type)

    for i in range(500):
        if t > block.timestamp:
            break
        t += WEEK
        pt = 0
        # Scales as n_types * n_unchecked_weeks (hopefully 1 at most)
        for gauge_type in range(100):
            if gauge_type == _n_gauge_types:
                break
            type_sum: uint256 = self.points_sum[gauge_type][t].bias
            type_weight: uint256 = self.points_type_weight[gauge_type][t]
            pt += type_sum * type_weight
        self.points_total[t] = pt

        if t > block.timestamp:
            self.time_total = t
    return pt


@internal
def _get_weight(gauge_addr: address) -> uint256:
    """
    @notice Fill historic gauge weights week-over-week for missed checkins
            and return the total for the future week
    @param gauge_addr Address of the gauge
    @return Gauge weight
    """
    t: uint256 = self.time_weight[gauge_addr]
    if t > 0:
        pt: Point = self.points_weight[gauge_addr][t]
        for i in range(500):
            if t > block.timestamp:
                break
            t += WEEK
            d_bias: uint256 = pt.slope * WEEK
            if pt.bias > d_bias:
                pt.bias -= d_bias
                d_slope: uint256 = self.changes_weight[gauge_addr][t]
                pt.slope -= d_slope
            else:
                pt.bias = 0
                pt.slope = 0
            self.points_weight[gauge_addr][t] = pt
            if t > block.timestamp:
                self.time_weight[gauge_addr] = t
        return pt.bias
    else:
        return 0


@external
def add_gauge(addr: address, gauge_type: int128, weight: uint256 = 0):
    """
    @notice Add gauge `addr` of type `gauge_type` with weight `weight`
    @param addr Gauge address
    @param gauge_type Gauge type
    @param weight Gauge weight
    """
    assert msg.sender == self.admin
    assert (gauge_type >= 0) and (gauge_type < self.n_gauge_types)
    assert self.gauge_types_[addr] == 0  # dev: cannot add the same gauge twice

    n: int128 = self.n_gauges
    self.n_gauges = n + 1
    self.gauges[n] = addr

    self.gauge_types_[addr] = gauge_type + 1
    next_time: uint256 = (block.timestamp + WEEK) / WEEK * WEEK

    if weight > 0:
        _type_weight: uint256 = self._get_type_weight(gauge_type)
        _old_sum: uint256 = self._get_sum(gauge_type)
        _old_total: uint256 = self._get_total()

        self.points_sum[gauge_type][next_time].bias = weight + _old_sum
        self.time_sum[gauge_type] = next_time
        self.points_total[next_time] = _old_total + _type_weight * weight
        self.time_total = next_time

        self.points_weight[addr][next_time].bias = weight

    if self.time_sum[gauge_type] == 0:
        self.time_sum[gauge_type] = next_time
    self.time_weight[addr] = next_time

    log NewGauge(addr, gauge_type, weight)


@external
def checkpoint():
    """
    @notice Checkpoint to fill data common for all gauges
    """
    self._get_total()


@external
def checkpoint_gauge(addr: address):
    """
    @notice Checkpoint to fill data for both a specific gauge and common for all gauges
    @param addr Gauge address
    """
    self._get_weight(addr)
    self._get_total()


@internal
@view
def _gauge_relative_weight(addr: address, time: uint256) -> uint256:
    """
    @notice Get Gauge relative weight (not more than 1.0) normalized to 1e18
            (e.g. 1.0 == 1e18). Inflation which will be received by it is
            inflation_rate * relative_weight / 1e18
    @param addr Gauge address
    @param time Relative weight at the specified timestamp in the past or present
    @return Value of relative weight normalized to 1e18
    """
    t: uint256 = time / WEEK * WEEK
    _total_weight: uint256 = self.points_total[t]

    if _total_weight > 0:
        gauge_type: int128 = self.gauge_types_[addr] - 1
        _type_weight: uint256 = self.points_type_weight[gauge_type][t]
        _gauge_weight: uint256 = self.points_weight[addr][t].bias
        return MULTIPLIER * _type_weight * _gauge_weight / _total_weight

    else:
        return 0


@external
@view
def gauge_relative_weight(addr: address, time: uint256 = block.timestamp) -> uint256:
    """
    @notice Get Gauge relative weight (not more than 1.0) normalized to 1e18
            (e.g. 1.0 == 1e18). Inflation which will be received by it is
            inflation_rate * relative_weight / 1e18
    @param addr Gauge address
    @param time Relative weight at the specified timestamp in the past or present
    @return Value of relative weight normalized to 1e18
    """
    return self._gauge_relative_weight(addr, time)


@external
def gauge_relative_weight_write(addr: address, time: uint256 = block.timestamp) -> uint256:
    """
    @notice Get gauge weight normalized to 1e18 and also fill all the unfilled
            values for type and gauge records
    @dev Any address can call, however nothing is recorded if the values are filled already
    @param addr Gauge address
    @param time Relative weight at the specified timestamp in the past or present
    @return Value of relative weight normalized to 1e18
    """
    self._get_weight(addr)
    self._get_total()  # Also calculates get_sum
    return self._gauge_relative_weight(addr, time)




@internal
def _change_type_weight(type_id: int128, weight: uint256):
    """
    @notice Change type weight
    @param type_id Type id
    @param weight New type weight
    """
    old_weight: uint256 = self._get_type_weight(type_id)
    old_sum: uint256 = self._get_sum(type_id)
    _total_weight: uint256 = self._get_total()
    next_time: uint256 = (block.timestamp + WEEK) / WEEK * WEEK

    _total_weight = _total_weight + old_sum * weight - old_sum * old_weight
    self.points_total[next_time] = _total_weight
    self.points_type_weight[type_id][next_time] = weight
    self.time_total = next_time
    self.time_type_weight[type_id] = next_time

    log NewTypeWeight(type_id, next_time, weight, _total_weight)


@external
def add_type(_name: String[64], weight: uint256 = 0):
    """
    @notice Add gauge type with name `_name` and weight `weight`
    @param _name Name of gauge type
    @param weight Weight of gauge type
    """
    assert msg.sender == self.admin
    type_id: int128 = self.n_gauge_types
    self.gauge_type_names[type_id] = _name
    self.n_gauge_types = type_id + 1
    if weight != 0:
        self._change_type_weight(type_id, weight)
        log AddType(_name, type_id)


@external
def change_type_weight(type_id: int128, weight: uint256):
    """
    @notice Change gauge type `type_id` weight to `weight`
    @param type_id Gauge type id
    @param weight New Gauge weight
    """
    assert msg.sender == self.admin
    self._change_type_weight(type_id, weight)


@internal
def _change_gauge_weight(addr: address, weight: uint256):
    # Change gauge weight
    # Only needed when testing in reality
    gauge_type: int128 = self.gauge_types_[addr] - 1
    old_gauge_weight: uint256 = self._get_weight(addr)
    type_weight: uint256 = self._get_type_weight(gauge_type)
    old_sum: uint256 = self._get_sum(gauge_type)
    _total_weight: uint256 = self._get_total()
    next_time: uint256 = (block.timestamp + WEEK) / WEEK * WEEK

    self.points_weight[addr][next_time].bias = weight
    self.time_weight[addr] = next_time

    new_sum: uint256 = old_sum + weight - old_gauge_weight
    self.points_sum[gauge_type][next_time].bias = new_sum
    self.time_sum[gauge_type] = next_time

    _total_weight = _total_weight + new_sum * type_weight - old_sum * type_weight
    self.points_total[next_time] = _total_weight
    self.time_total = next_time

    log NewGaugeWeight(addr, block.timestamp, weight, _total_weight)


@external
def change_gauge_weight(addr: address, weight: uint256):
    """
    @notice Change weight of gauge `addr` to `weight`
    @param addr `GaugeController` contract address
    @param weight New Gauge weight
    """
    assert msg.sender == self.admin
    self._change_gauge_weight(addr, weight)


@external
def vote_for_gauge_weights(_gauge_addr: address, _user_weight: uint256):
    """
    @notice Allocate voting power for changing pool weights
    @param _gauge_addr Gauge which `msg.sender` votes for
    @param _user_weight Weight for a gauge in bps (units of 0.01%). Minimal is 0.01%. Ignored if 0
    """
    escrow: address = self.voting_escrow
    slope: uint256 = convert(VotingEscrow(escrow).get_last_user_slope(msg.sender), uint256)
    lock_end: uint256 = VotingEscrow(escrow).locked__end(msg.sender)
    _n_gauges: int128 = self.n_gauges
    next_time: uint256 = (block.timestamp + WEEK) / WEEK * WEEK
    assert lock_end > next_time, "Your token lock expires too soon"
    assert (_user_weight >= 0) and (_user_weight <= 10000), "You used all your voting power"
    assert block.timestamp >= self.last_user_vote[msg.sender][_gauge_addr] + WEIGHT_VOTE_DELAY, "Cannot vote so often"

    gauge_type: int128 = self.gauge_types_[_gauge_addr] - 1
    assert gauge_type >= 0, "Gauge not added"
    # Prepare slopes and biases in memory
    old_slope: VotedSlope = self.vote_user_slopes[msg.sender][_gauge_addr]
    old_dt: uint256 = 0
    if old_slope.end > next_time:
        old_dt = old_slope.end - next_time
    old_bias: uint256 = old_slope.slope * old_dt
    new_slope: VotedSlope = VotedSlope({
        slope: slope * _user_weight / 10000,
        end: lock_end,
        power: _user_weight
    })
    new_dt: uint256 = lock_end - next_time  # dev: raises when expired
    new_bias: uint256 = new_slope.slope * new_dt

    # Check and update powers (weights) used
    power_used: uint256 = self.vote_user_power[msg.sender]
    power_used = power_used + new_slope.power - old_slope.power
    self.vote_user_power[msg.sender] = power_used
    assert (power_used >= 0) and (power_used <= 10000), 'Used too much power'

    ## Remove old and schedule new slope changes
    # Remove slope changes for old slopes
    # Schedule recording of initial slope for next_time
    old_weight_bias: uint256 = self._get_weight(_gauge_addr)
    old_weight_slope: uint256 = self.points_weight[_gauge_addr][next_time].slope
    old_sum_bias: uint256 = self._get_sum(gauge_type)
    old_sum_slope: uint256 = self.points_sum[gauge_type][next_time].slope

    self.points_weight[_gauge_addr][next_time].bias = max(old_weight_bias + new_bias, old_bias) - old_bias
    self.points_sum[gauge_type][next_time].bias = max(old_sum_bias + new_bias, old_bias) - old_bias
    if old_slope.end > next_time:
        self.points_weight[_gauge_addr][next_time].slope = max(old_weight_slope + new_slope.slope, old_slope.slope) - old_slope.slope
        self.points_sum[gauge_type][next_time].slope = max(old_sum_slope + new_slope.slope, old_slope.slope) - old_slope.slope
    else:
        self.points_weight[_gauge_addr][next_time].slope += new_slope.slope
        self.points_sum[gauge_type][next_time].slope += new_slope.slope
    if old_slope.end > block.timestamp:
        # Cancel old slope changes if they still didn't happen
        self.changes_weight[_gauge_addr][old_slope.end] -= old_slope.slope
        self.changes_sum[gauge_type][old_slope.end] -= old_slope.slope
    # Add slope changes for new slopes
    self.changes_weight[_gauge_addr][new_slope.end] += new_slope.slope
    self.changes_sum[gauge_type][new_slope.end] += new_slope.slope

    self._get_total()

    self.vote_user_slopes[msg.sender][_gauge_addr] = new_slope

    # Record last action time
    self.last_user_vote[msg.sender][_gauge_addr] = block.timestamp

    log VoteForGauge(block.timestamp, msg.sender, _gauge_addr, _user_weight)


@external
@view
def get_gauge_weight(addr: address) -> uint256:
    """
    @notice Get current gauge weight
    @param addr Gauge address
    @return Gauge weight
    """
    return self.points_weight[addr][self.time_weight[addr]].bias


@external
@view
def get_type_weight(type_id: int128) -> uint256:
    """
    @notice Get current type weight
    @param type_id Type id
    @return Type weight
    """
    return self.points_type_weight[type_id][self.time_type_weight[type_id]]


@external
@view
def get_total_weight() -> uint256:
    """
    @notice Get current total (type-weighted) weight
    @return Total weight
    """
    return self.points_total[self.time_total]


@external
@view
def get_weights_sum_per_type(type_id: int128) -> uint256:
    """
    @notice Get sum of gauge weights per type
    @param type_id Type id
    @return Sum of gauge weights
    """
    return self.points_sum[type_id][self.time_sum[type_id]].bias

Contract Security Audit

Contract ABI

[{"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":"AddType","inputs":[{"name":"name","type":"string","indexed":false},{"name":"type_id","type":"int128","indexed":false}],"anonymous":false,"type":"event"},{"name":"NewTypeWeight","inputs":[{"name":"type_id","type":"int128","indexed":false},{"name":"time","type":"uint256","indexed":false},{"name":"weight","type":"uint256","indexed":false},{"name":"total_weight","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"NewGaugeWeight","inputs":[{"name":"gauge_address","type":"address","indexed":false},{"name":"time","type":"uint256","indexed":false},{"name":"weight","type":"uint256","indexed":false},{"name":"total_weight","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"VoteForGauge","inputs":[{"name":"time","type":"uint256","indexed":false},{"name":"user","type":"address","indexed":false},{"name":"gauge_addr","type":"address","indexed":false},{"name":"weight","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"NewGauge","inputs":[{"name":"addr","type":"address","indexed":false},{"name":"gauge_type","type":"int128","indexed":false},{"name":"weight","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_token","type":"address"},{"name":"_voting_escrow","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":38895},{"stateMutability":"nonpayable","type":"function","name":"apply_transfer_ownership","inputs":[],"outputs":[],"gas":41034},{"stateMutability":"view","type":"function","name":"gauge_types","inputs":[{"name":"_addr","type":"address"}],"outputs":[{"name":"","type":"int128"}],"gas":3014},{"stateMutability":"nonpayable","type":"function","name":"add_gauge","inputs":[{"name":"addr","type":"address"},{"name":"gauge_type","type":"int128"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"add_gauge","inputs":[{"name":"addr","type":"address"},{"name":"gauge_type","type":"int128"},{"name":"weight","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"checkpoint","inputs":[],"outputs":[],"gas":18295064817},{"stateMutability":"nonpayable","type":"function","name":"checkpoint_gauge","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":18349612985},{"stateMutability":"view","type":"function","name":"gauge_relative_weight","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"gauge_relative_weight","inputs":[{"name":"addr","type":"address"},{"name":"time","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"gauge_relative_weight_write","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"gauge_relative_weight_write","inputs":[{"name":"addr","type":"address"},{"name":"time","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"nonpayable","type":"function","name":"add_type","inputs":[{"name":"_name","type":"string"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"add_type","inputs":[{"name":"_name","type":"string"},{"name":"weight","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"change_type_weight","inputs":[{"name":"type_id","type":"int128"},{"name":"weight","type":"uint256"}],"outputs":[],"gas":36770184806},{"stateMutability":"nonpayable","type":"function","name":"change_gauge_weight","inputs":[{"name":"addr","type":"address"},{"name":"weight","type":"uint256"}],"outputs":[],"gas":36879354313},{"stateMutability":"nonpayable","type":"function","name":"vote_for_gauge_weights","inputs":[{"name":"_gauge_addr","type":"address"},{"name":"_user_weight","type":"uint256"}],"outputs":[],"gas":18404662719},{"stateMutability":"view","type":"function","name":"get_gauge_weight","inputs":[{"name":"addr","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":5362},{"stateMutability":"view","type":"function","name":"get_type_weight","inputs":[{"name":"type_id","type":"int128"}],"outputs":[{"name":"","type":"uint256"}],"gas":5395},{"stateMutability":"view","type":"function","name":"get_total_weight","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":5020},{"stateMutability":"view","type":"function","name":"get_weights_sum_per_type","inputs":[{"name":"type_id","type":"int128"}],"outputs":[{"name":"","type":"uint256"}],"gas":5527},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2868},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2898},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2928},{"stateMutability":"view","type":"function","name":"voting_escrow","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2958},{"stateMutability":"view","type":"function","name":"n_gauge_types","inputs":[],"outputs":[{"name":"","type":"int128"}],"gas":2988},{"stateMutability":"view","type":"function","name":"n_gauges","inputs":[],"outputs":[{"name":"","type":"int128"}],"gas":3018},{"stateMutability":"view","type":"function","name":"gauge_type_names","inputs":[{"name":"arg0","type":"int128"}],"outputs":[{"name":"","type":"string"}],"gas":13646},{"stateMutability":"view","type":"function","name":"gauges","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"address"}],"gas":3187},{"stateMutability":"view","type":"function","name":"vote_user_slopes","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"slope","type":"uint256"},{"name":"power","type":"uint256"},{"name":"end","type":"uint256"}],"gas":8354},{"stateMutability":"view","type":"function","name":"vote_user_power","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3353},{"stateMutability":"view","type":"function","name":"last_user_vote","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3598},{"stateMutability":"view","type":"function","name":"points_weight","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"uint256"}],"outputs":[{"name":"bias","type":"uint256"},{"name":"slope","type":"uint256"}],"gas":6062},{"stateMutability":"view","type":"function","name":"time_weight","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3443},{"stateMutability":"view","type":"function","name":"points_sum","inputs":[{"name":"arg0","type":"int128"},{"name":"arg1","type":"uint256"}],"outputs":[{"name":"bias","type":"uint256"},{"name":"slope","type":"uint256"}],"gas":6203},{"stateMutability":"view","type":"function","name":"time_sum","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3397},{"stateMutability":"view","type":"function","name":"points_total","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3433},{"stateMutability":"view","type":"function","name":"time_total","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":3348},{"stateMutability":"view","type":"function","name":"points_type_weight","inputs":[{"name":"arg0","type":"int128"},{"name":"arg1","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3789},{"stateMutability":"view","type":"function","name":"time_type_weight","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":3517}]

6040612a29610140396020612a2960c03960c05160a01c1561002057600080fd5b60206020612a290160c03960c05160a01c1561003b57600080fd5b6000610140511861004b57600080fd5b6000610160511861005b57600080fd5b3360005561014051600255610160516003554262093a808082049050905062093a80808202821582848304141761009157600080fd5b80905090509050601355612a1156600436101561000d57611ab1565b600035601c52600051341561002157600080fd5b636b441a408114156100815760043560a01c1561003d57600080fd5b600054331461004b57600080fd5b600435600155600435610140527f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e96020610140a1005b636a1c05ae8114156100ea57600054331461009b57600080fd5b60015461014052600061014051186100b257600080fd5b6101405160005561014051610160527febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056020610160a1005b633f9095b781141561015d5760043560a01c1561010657600080fd5b600860043560e05260c052604060c02054610140526000610140511861012b57600080fd5b6101405160018082038080600081121561014157195b607f1c1561014e57600080fd5b90509050905060005260206000f35b633a04f90081141561017457600061014052610195565b6318dfe921811415610190576020604461014037600050610195565b610546565b60043560a01c156101a557600080fd5b602435808060008112156101b557195b607f1c156101c257600080fd5b90505060005433146101d357600080fd5b60006024351215156101eb57600454602435126101ee565b60005b6101f757600080fd5b600860043560e05260c052604060c020541561021257600080fd5b600554610160526101605160018082018080600081121561022f57195b607f1c1561023c57600080fd5b90509050905060055560043561016051633b9aca00811061025c57600080fd5b600760c052602060c020015560243560018082018080600081121561027d57195b607f1c1561028a57600080fd5b905090509050600860043560e05260c052604060c020554262093a808181830110156102b557600080fd5b8082019050905062093a808082049050905062093a8080820282158284830414176102df57600080fd5b809050905090506101805260006101405111156104af576101405161016051610180516101a0516024356101c0526101c05160065801611ab7565b610220526101a052610180526101605261014052610220516101a0526101405161016051610180516101a0516101c0516024356101e0526101e05160065801611bde565b610240526101c0526101a052610180526101605261014052610240516101c0526101405161016051610180516101a0516101c0516101e05160065801611de5565b610200526101e0526101c0526101a052610180526101605261014052610200516101e052610140516101c0518181830110156103da57600080fd5b80820190509050600f60243560e05260c052604060c0206101805160e05260c052604060c02060c052602060c0205561018051602435633b9aca00811061042057600080fd5b601160c052602060c02001556101e0516101a05161014051808202821582848304141761044c57600080fd5b8090509050905081818301101561046257600080fd5b8082019050905060126101805160e05260c052604060c020556101805160135561014051600c60043560e05260c052604060c0206101805160e05260c052604060c02060c052602060c020555b602435633b9aca0081106104c257600080fd5b601160c052602060c020015415156104f85761018051602435633b9aca0081106104eb57600080fd5b601160c052602060c02001555b61018051600e60043560e05260c052604060c02055604060046101a037610140516101e0527ffd55b3191f9c9dd92f4f134dd700e7d76f6a0c836a08687023d6d38f03ebd87760606101a0a1005b63c2c4c5c18114156105655760065801611de5565b6101405261014050005b63615e52378114156105b05760043560a01c1561058157600080fd5b60043561014052610140516006580161204a565b6101a0526101a05060065801611de5565b6101405261014050005b636207d8668114156105c65742610140526105e7565b63d3078c948114156105e25760206024610140376000506105e7565b610630565b60043560a01c156105f757600080fd5b61014051600435610160526101405161018052610180516101605160065801612235565b6101e052610140526101e05160005260206000f35b6395cfcec3811415610646574261014052610667565b636472eee1811415610662576020602461014037600050610667565b6106ed565b60043560a01c1561067757600080fd5b6101405160043561016052610160516006580161204a565b6101c052610140526101c0506101405160065801611de5565b61016052610140526101605061014051600435610160526101405161018052610180516101605160065801612235565b6101e052610140526101e05160005260206000f35b6326e56d5e8114156107045760006101c052610725565b6392d0d23281141561072057602060246101c037600050610725565b610904565b606060043560040161014037604060043560040135111561074557600080fd5b600054331461075357600080fd5b6004546101e0526101408060066101e05160e05260c052604060c02060c052602060c020602082510161012060006003818352015b8261012051602002111561079b576107bd565b61012051602002850151610120518501555b8151600101808352811415610788575b5050505050506101e0516001808201808060008112156107d957195b607f1c156107e657600080fd5b90509050905060045560006101c0511815610902576101405161016051610180516101a0516101c0516101e0516101e051610200526101c0516102205261022051610200516006580161239e565b6101e0526101c0526101a0526101805261016052610140526000506101e05161026052604061020052610200516102405261014080516020018061020051610240018284600060045af161088757600080fd5b505061020051610240015180602061020051610240010101818260206001820306601f8201039050033682375050602061020051610240015160206001820306601f8201039050610200510101610200527f6fbe76157c712f16b5a3c44ed48baa04e3450bc3fab0c020e848aca72bbccc8461020051610240a15b005b63db1ca260811415610962576004358080600081121561092057195b607f1c1561092d57600080fd5b905050600054331461093e57600080fd5b600435610140526024356101605261016051610140516006580161239e565b600050005b63d4d2646e8114156109b05760043560a01c1561097e57600080fd5b600054331461098c57600080fd5b60043561014052602435610160526101605161014051600658016125ec565b600050005b63d71363288114156114555760043560a01c156109cc57600080fd5b6003546101405260206102006024637c74a17461018052336101a05261019c610140515afa6109fa57600080fd5b601f3d11610a0757600080fd5b600050610200516000811215610a1c57600080fd5b610160526020610220602463adc635896101a052336101c0526101bc610140515afa610a4757600080fd5b601f3d11610a5457600080fd5b60005061022051610180526005546101a0524262093a80818183011015610a7a57600080fd5b8082019050905062093a808082049050905062093a808082028215828483041417610aa457600080fd5b809050905090506101c0526101c05161018051111515610b03576308c379a06101e0526020610200526020610220527f596f757220746f6b656e206c6f636b206578706972657320746f6f20736f6f6e610240526102205060646101fcfd5b6000602435101515610b1c576127106024351115610b1f565b60005b1515610b6a576308c379a06101e052602061020052601e610220527f596f75207573656420616c6c20796f757220766f74696e6720706f7765720000610240526102205060646101fcfd5b600b3360e05260c052604060c02060043560e05260c052604060c02054620d2f00818183011015610b9a57600080fd5b808201905090504210151515610bef576308c379a06101e0526020610200526014610220527f43616e6e6f7420766f746520736f206f6674656e000000000000000000000000610240526102205060646101fcfd5b600860043560e05260c052604060c02054600180820380806000811215610c1257195b607f1c15610c1f57600080fd5b9050905090506101e05260006101e05112151515610c7c576308c379a061020052602061022052600f610240527f4761756765206e6f7420616464656400000000000000000000000000000000006102605261024050606461021cfd5b61020060093360e05260c052604060c02060043560e05260c052604060c0208060c052602060c02054825260018160c052602060c0200154826020015260028160c052602060c0200154826040015250506000610260526101c051610240511115610d0257610240516101c05180821015610cf657600080fd5b80820390509050610260525b61020051610260518082028215828483041417610d1e57600080fd5b80905090509050610280526102a0610160516024358082028215828483041417610d4757600080fd5b80905090509050612710808204905090508152602435816020015261018051816040015250610180516101c05180821015610d8157600080fd5b80820390509050610300526102a051610300518082028215828483041417610da857600080fd5b8090509050905061032052600a3360e05260c052604060c0205461034052610340516102c051818183011015610ddd57600080fd5b808201905090506102205180821015610df557600080fd5b808203905090506103405261034051600a3360e05260c052604060c02055600061034051101515610e2e57612710610340511115610e31565b60005b1515610e7c576308c379a06103605260206103805260136103a0527f5573656420746f6f206d75636820706f776572000000000000000000000000006103c0526103a050606461037cfd5b610140610380525b61038051516020610380510161038052610380610380511015610ea657610e84565b6004356103a0526103a0516006580161204a565b61040052610360610380525b6103805152602061038051036103805261014061038051101515610ee957610ec6565b61040051610360526001600c60043560e05260c052604060c0206101c05160e05260c052604060c02060c052602060c0200154610380526101406103c0525b6103c0515160206103c051016103c0526103c06103c0511015610f4a57610f28565b6101e0516103e0526103e05160065801611bde565b610440526103a06103c0525b6103c0515260206103c051036103c0526101406103c051101515610f8e57610f6b565b610440516103a0526001600f6101e05160e05260c052604060c0206101c05160e05260c052604060c02060c052602060c02001546103c0526103605161032051818183011015610fdd57600080fd5b808201905090506102805180821015610ff65780610ff8565b815b90509050610280518082101561100d57600080fd5b80820390509050600c60043560e05260c052604060c0206101c05160e05260c052604060c02060c052602060c020556103a0516103205181818301101561105357600080fd5b80820190509050610280518082101561106c578061106e565b815b90509050610280518082101561108357600080fd5b80820390509050600f6101e05160e05260c052604060c0206101c05160e05260c052604060c02060c052602060c020556101c0516102405111156111b957610380516102a0518181830110156110d857600080fd5b8082019050905061020051808210156110f157806110f3565b815b90509050610200518082101561110857600080fd5b808203905090506001600c60043560e05260c052604060c0206101c05160e05260c052604060c02060c052602060c02001556103c0516102a05181818301101561115157600080fd5b80820190509050610200518082101561116a578061116c565b815b90509050610200518082101561118157600080fd5b808203905090506001600f6101e05160e05260c052604060c0206101c05160e05260c052604060c02060c052602060c020015561124d565b6001600c60043560e05260c052604060c0206101c05160e05260c052604060c02060c052602060c0200180546102a0518181830110156111f857600080fd5b808201905090508155506001600f6101e05160e05260c052604060c0206101c05160e05260c052604060c02060c052602060c0200180546102a05181818301101561124257600080fd5b808201905090508155505b426102405111156112d257600d60043560e05260c052604060c0206102405160e05260c052604060c0208054610200518082101561128a57600080fd5b8082039050905081555060106101e05160e05260c052604060c0206102405160e05260c052604060c020805461020051808210156112c757600080fd5b808203905090508155505b600d60043560e05260c052604060c0206102e05160e05260c052604060c02080546102a05181818301101561130657600080fd5b8082019050905081555060106101e05160e05260c052604060c0206102e05160e05260c052604060c02080546102a05181818301101561134557600080fd5b808201905090508155506101406103e0525b6103e0515160206103e051016103e0526103e06103e051101561137957611357565b60065801611de5565b610400526103c06103e0525b6103e0515260206103e051036103e0526101406103e0511015156113b15761138e565b6104005060093360e05260c052604060c02060043560e05260c052604060c02060c052602060c0206102a0805182558060200151600183015580604001516002830155505042600b3360e05260c052604060c02060043560e05260c052604060c02055426103e052336104005260043561042052602435610440527f45ca9a4c8d0119eb329e580d28fe689e484e1be230da8037ade9547d2d25cc9160806103e0a1005b634e791a3a8114156114af5760043560a01c1561147157600080fd5b600c60043560e05260c052604060c020600e60043560e05260c052604060c0205460e05260c052604060c02060c052602060c0205460005260206000f35b6372fdccfa81141561151f57600435808060008112156114cb57195b607f1c156114d857600080fd5b905050601460043560e05260c052604060c020600435633b9aca0081106114fe57600080fd5b601560c052602060c020015460e05260c052604060c0205460005260206000f35b636977ff9281141561154557601260135460e05260c052604060c0205460005260206000f35b636f214a6a8114156115bd576004358080600081121561156157195b607f1c1561156e57600080fd5b905050600f60043560e05260c052604060c020600435633b9aca00811061159457600080fd5b601160c052602060c020015460e05260c052604060c02060c052602060c0205460005260206000f35b63f851a4408114156115d55760005460005260206000f35b6317f7182a8114156115ed5760015460005260206000f35b63fc0c546a8114156116055760025460005260206000f35b63dfe0503181141561161d5760035460005260206000f35b639fba03a18114156116355760045460005260206000f35b63e93841d081141561164d5760055460005260206000f35b63d958a8fc811415611720576004358080600081121561166957195b607f1c1561167657600080fd5b905050600660043560e05260c052604060c0208060c052602060c020610180602082540161012060006003818352015b826101205160200211156116b9576116db565b61012051850154610120516020028501525b81516001018083528114156116a6575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b63b053918781141561175457600435633b9aca00811061173f57600080fd5b600760c052602060c020015460005260206000f35b630f467f988114156117f55760043560a01c1561177057600080fd5b60243560a01c1561178057600080fd5b600960043560e05260c052604060c02060243560e05260c052604060c0206101408080808460c052602060c0205481525050602081019050808060018560c052602060c020015481525050602081019050808060028560c052602060c02001548152505060609050905060c05260c051610140f35b63411e74b581141561182b5760043560a01c1561181157600080fd5b600a60043560e05260c052604060c0205460005260206000f35b637e418fa081141561187f5760043560a01c1561184757600080fd5b60243560a01c1561185757600080fd5b600b60043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b63edba52738114156118f75760043560a01c1561189b57600080fd5b600c60043560e05260c052604060c02060243560e05260c052604060c0206101408080808460c052602060c0205481525050602081019050808060018560c052602060c02001548152505060409050905060c05260c051610140f35b63a4d7a25081141561192d5760043560a01c1561191357600080fd5b600e60043560e05260c052604060c0205460005260206000f35b63a9b48c018114156119b5576004358080600081121561194957195b607f1c1561195657600080fd5b905050600f60043560e05260c052604060c02060243560e05260c052604060c0206101408080808460c052602060c0205481525050602081019050808060018560c052602060c02001548152505060409050905060c05260c051610140f35b635a5491588114156119e957600435633b9aca0081106119d457600080fd5b601160c052602060c020015460005260206000f35b631142916b811415611a0f57601260043560e05260c052604060c0205460005260206000f35b63513872bd811415611a275760135460005260206000f35b63afd2bb49811415611a7b5760043580806000811215611a4357195b607f1c15611a5057600080fd5b905050601460043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6351ce6b59811415611aaf57600435633b9aca008110611a9a57600080fd5b601560c052602060c020015460005260206000f35b505b60006000fd5b610160526101405261014051633b9aca008110611ad357600080fd5b601560c052602060c0200154610180526000610180511115611bce5760146101405160e05260c052604060c0206101805160e05260c052604060c020546101a0526101c060006101f4818352015b42610180511115611b3157611bb8565b610180805162093a80818183011015611b4957600080fd5b808201905090508152506101a05160146101405160e05260c052604060c0206101805160e05260c052604060c0205542610180511115611ba8576101805161014051633b9aca008110611b9b57600080fd5b601560c052602060c02001555b8151600101808352811415611b21575b50506101a0516000526000516101605156611bdc565b600060005260005161016051565b005b610160526101405261014051633b9aca008110611bfa57600080fd5b601160c052602060c0200154610180526000610180511115611dd5576101a0600f6101405160e05260c052604060c0206101805160e05260c052604060c0208060c052602060c02054825260018160c052602060c0200154826020015250506101e060006101f4818352015b42610180511115611c7657611dbf565b610180805162093a80818183011015611c8e57600080fd5b808201905090508152506101c05162093a808082028215828483041417611cb457600080fd5b8090509050905061020052610200516101a0511115611d37576101a080516102005180821015611ce357600080fd5b8082039050905081525060106101405160e05260c052604060c0206101805160e05260c052604060c02054610220526101c080516102205180821015611d2857600080fd5b80820390509050815250611d44565b60006101a05260006101c0525b600f6101405160e05260c052604060c0206101805160e05260c052604060c02060c052602060c0206101a08051825580602001516001830155505042610180511115611daf576101805161014051633b9aca008110611da257600080fd5b601160c052602060c02001555b8151600101808352811415611c66575b50506101a0516000526000516101605156611de3565b600060005260005161016051565b005b61014052601354610160526004546101805242610160511115611e2357610160805162093a8080821015611e1857600080fd5b808203905090508152505b60126101605160e05260c052604060c020546101a0526101c060006064818352015b610180516101c0511415611e5857611ef3565b6101405161016051610180516101a0516101c0516101c0516101e0526101e05160065801611bde565b610240526101c0526101a052610180526101605261014052610240506101405161016051610180516101a0516101c0516101c0516101e0526101e05160065801611ab7565b610240526101c0526101a052610180526101605261014052610240505b8151600101808352811415611e45575b50506101c060006101f4818352015b42610160511115611f1257612038565b610160805162093a80818183011015611f2a57600080fd5b8082019050905081525060006101a0526101e060006064818352015b610180516101e0511415611f5957611ffd565b600f6101e05160e05260c052604060c0206101605160e05260c052604060c02060c052602060c020546102005260146101e05160e05260c052604060c0206101605160e05260c052604060c02054610220526101a0805161020051610220518082028215828483041417611fcc57600080fd5b80905090509050818183011015611fe257600080fd5b808201905090508152505b8151600101808352811415611f46575b50506101a05160126101605160e05260c052604060c020554261016051111561202857610160516013555b8151600101808352811415611f02575b50506101a05160005260005161014051565b6101605261014052600e6101405160e05260c052604060c02054610180526000610180511115612225576101a0600c6101405160e05260c052604060c0206101805160e05260c052604060c0208060c052602060c02054825260018160c052602060c0200154826020015250506101e060006101f4818352015b426101805111156120d45761220f565b610180805162093a808181830110156120ec57600080fd5b808201905090508152506101c05162093a80808202821582848304141761211257600080fd5b8090509050905061020052610200516101a0511115612195576101a08051610200518082101561214157600080fd5b80820390509050815250600d6101405160e05260c052604060c0206101805160e05260c052604060c02054610220526101c08051610220518082101561218657600080fd5b808203905090508152506121a2565b60006101a05260006101c0525b600c6101405160e05260c052604060c0206101805160e05260c052604060c02060c052602060c0206101a080518255806020015160018301555050426101805111156121ff5761018051600e6101405160e05260c052604060c020555b81516001018083528114156120c4575b50506101a0516000526000516101605156612233565b600060005260005161016051565b005b6101805261014052610160526101605162093a808082049050905062093a80808202821582848304141761226857600080fd5b809050905090506101a05260126101a05160e05260c052604060c020546101c05260006101c051111561238e5760086101405160e05260c052604060c020546001808203808060008112156122b957195b607f1c156122c657600080fd5b9050905090506101e05260146101e05160e05260c052604060c0206101a05160e05260c052604060c0205461020052600c6101405160e05260c052604060c0206101a05160e05260c052604060c02060c052602060c0205461022052670de0b6b3a764000061020051808202821582848304141761234357600080fd5b8090509050905061022051808202821582848304141761236257600080fd5b809050905090506101c051808061237857600080fd5b820490509050600052600051610180515661239c565b600060005260005161018051565b005b6101805261014052610160526101405161016051610180516101a051610140516101c0526101c05160065801611ab7565b610220526101a052610180526101605261014052610220516101a0526101405161016051610180516101a0516101c051610140516101e0526101e05160065801611bde565b610240526101c0526101a052610180526101605261014052610240516101c0526101405161016051610180516101a0516101c0516101e05160065801611de5565b610200526101e0526101c0526101a052610180526101605261014052610200516101e0524262093a8081818301101561248d57600080fd5b8082019050905062093a808082049050905062093a8080820282158284830414176124b757600080fd5b80905090509050610200526101e0516101c0516101605180820282158284830414176124e257600080fd5b809050905090508181830110156124f857600080fd5b808201905090506101c0516101a051808202821582848304141761251b57600080fd5b809050905090508082101561252f57600080fd5b808203905090506101e0526101e05160126102005160e05260c052604060c020556101605160146101405160e05260c052604060c0206102005160e05260c052604060c02055610200516013556102005161014051633b9aca00811061259457600080fd5b601560c052602060c02001556101405161022052610200516102405261016051610260526101e051610280527e170bcdc909b6ac6e12d020fe8942256312cdcd555fb6d712899eba56d2f9016080610220a161018051565b61018052610140526101605260086101405160e05260c052604060c0205460018082038080600081121561261c57195b607f1c1561262957600080fd5b9050905090506101a0526101405161016051610180516101a0516101c051610140516101e0526101e0516006580161204a565b610240526101c0526101a052610180526101605261014052610240516101c0526101405161016051610180516101a0516101c0516101e0516101a051610200526102005160065801611ab7565b610260526101e0526101c0526101a052610180526101605261014052610260516101e0526101405161016051610180516101a0516101c0516101e051610200516101a051610220526102205160065801611bde565b61028052610200526101e0526101c0526101a05261018052610160526101405261028051610200526101405161016051610180516101a0516101c0516101e051610200516102205160065801611de5565b6102405261022052610200526101e0526101c0526101a05261018052610160526101405261024051610220524262093a8081818301101561278f57600080fd5b8082019050905062093a808082049050905062093a8080820282158284830414176127b957600080fd5b809050905090506102405261016051600c6101405160e05260c052604060c0206102405160e05260c052604060c02060c052602060c0205561024051600e6101405160e05260c052604060c02055610200516101605181818301101561281e57600080fd5b808201905090506101c0518082101561283657600080fd5b808203905090506102605261026051600f6101a05160e05260c052604060c0206102405160e05260c052604060c02060c052602060c02055610240516101a051633b9aca00811061288657600080fd5b601160c052602060c020015561022051610260516101e05180820282158284830414176128b257600080fd5b809050905090508181830110156128c857600080fd5b80820190509050610200516101e05180820282158284830414176128eb57600080fd5b80905090509050808210156128ff57600080fd5b80820390509050610220526102205160126102405160e05260c052604060c02055610240516013556101405161028052426102a052610160516102c052610220516102e0527f54c0cf3647e6cdb2fc0a7876e60ba77563fceedf2e06c01c597f8dccb9e6bd726080610280a161018051565b6100a0612a11036100a06000396100a0612a11036000f300000000000000000000000010010078a54396f62c96df8532dc2b4847d47ed3000000000000000000000000376020c5b0ba3fd603d7722381faa06da8078d8a

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000010010078a54396f62c96df8532dc2b4847d47ed3000000000000000000000000376020c5b0ba3fd603d7722381faa06da8078d8a

-----Decoded View---------------
Arg [0] : _token (address): 0x10010078a54396f62c96df8532dc2b4847d47ed3
Arg [1] : _voting_escrow (address): 0x376020c5b0ba3fd603d7722381faa06da8078d8a

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000010010078a54396f62c96df8532dc2b4847d47ed3
Arg [1] : 000000000000000000000000376020c5b0ba3fd603d7722381faa06da8078d8a


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
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.