Contract 0x772918d032cFd4Ff09Ea7Af623e56E2D8D96bB65 9

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xeed78826f6748ff972c0e740a72443cd5a16bff245e07b0c0550d754ebec03f5Set_admin244559662021-12-09 13:11:53424 days 20 hrs ago0xb16a11442878d6f1ef202ae63233a7c13e98fd7f IN  Hundred Finance: Reward Policy0 FTM0.003886234929
0xa5c92ee92e89e675e8f784c09c34b00f5f2ea61cba469e9e53b2489bfbbc6f1a0x60206105244551572021-12-09 12:59:54424 days 20 hrs ago0xb16a11442878d6f1ef202ae63233a7c13e98fd7f IN  Create: Vyper_contract0 FTM0.049873363875
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xa5c92ee92e89e675e8f784c09c34b00f5f2ea61cba469e9e53b2489bfbbc6f1a244551572021-12-09 12:59:54424 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 HND DAO Token proxy
@author Hundred Finanace
@license MIT
@notice configurable ERC20 with piecewise-linear mining supply.
@dev Based on the ERC-20 token standard as defined at
     https://eips.ethereum.org/EIPS/eip-20
"""

from vyper.interfaces import ERC20


event SetAdmin:
    admin: address

admin: public(address)

first_epoch_time: public(uint256)

epoch_length: public(uint256)

rewards: public(uint256[100000000000000000000000000000])


@external
def __init__(_epoch_length: uint256):
    """
    @notice Contract constructor
    """
    self.admin = msg.sender

    self.epoch_length = _epoch_length
    self.first_epoch_time = block.timestamp / _epoch_length * _epoch_length - _epoch_length


@internal
@view
def _epoch_at(_timestamp: uint256) -> uint256:
    """
    @notice gives epoch number for a given time (0 for first epoch)
    @return uint256 epoch number
    """
    if _timestamp < self.first_epoch_time:
        return 0

    return (_timestamp - self.first_epoch_time) / self.epoch_length


@internal
@view
def _current_epoch() -> uint256:
    """
    @notice gives current reward epoch number (0 for first epoch)
    @return uint256 epoch number
    """
    return self._epoch_at(block.timestamp)


@internal
@view
def _epoch_start_time() -> uint256:
    """
    @notice Get timestamp of the current mining epoch start
    @return Timestamp of the epoch
    """
    return self.first_epoch_time + self._current_epoch() * self.epoch_length


@external
@view
def epoch_at(_timestamp: uint256) -> uint256:
    """
    @notice gives epoch number for a given time (0 for first epoch)
    @return uint256 epoch number
    """
    return self._epoch_at(_timestamp)


@external
@view
def epoch_start_time(_epoch: uint256) -> uint256:
    """
    @notice gives epoch start time for a given epoch number
    @return uint256 epoch timestamp
    """
    return self.first_epoch_time + _epoch * self.epoch_length


@external
@view
def rate_at(_timestamp: uint256) -> uint256:
    """
    @notice give rewards emission rate for timestamp
    @return uint256 epoch rate
    """
    if _timestamp < self.first_epoch_time:
        return 0

    return self.rewards[self._epoch_at(_timestamp)] / self.epoch_length


@external
@view
def current_epoch() -> uint256:
    """
    @notice gives current reward epoch number (0 for first epoch)
    @return uint256 epoch number
    """
    return self._current_epoch()


@external
@view
def future_epoch_time() -> uint256:
    """
    @notice Get timestamp of the next mining epoch start
    @return Timestamp of the next epoch
    """
    return self._epoch_start_time() + self.epoch_length


@external
@view
def future_epoch_rate() -> uint256:
    """
    @notice Get reward rate of the next mining epoch
    @return reward rate
    """
    return self.rewards[self._current_epoch() + 1] / self.epoch_length


@external
def set_admin(_admin: address):
    """
    @notice Set the new admin
    @param _admin New admin address
    """
    assert msg.sender == self.admin  # dev: admin only
    self.admin = _admin
    log SetAdmin(_admin)


@external
def set_rewards_at(_epoch: uint256, _reward: uint256):
    """
    @notice set future epoch reward
    """
    assert msg.sender == self.admin  # dev: admin only
    assert _epoch > self._current_epoch()  # dev: can only modify future rates

    self.rewards[_epoch] = _reward


@external
def set_rewards_starting_at(_epoch: uint256, _rewards: uint256[10]):
    """
    @notice set future rewards starting at epoch _epoch
    """
    assert msg.sender == self.admin  # dev: admin only
    assert _epoch > self._current_epoch()  # dev: can only modify future rewards

    for index in range(10):
        self.rewards[_epoch + index] = _rewards[index]

Contract Security Audit

Contract ABI

[{"name":"SetAdmin","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_epoch_length","type":"uint256"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"epoch_at","inputs":[{"name":"_timestamp","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":7475},{"stateMutability":"view","type":"function","name":"epoch_start_time","inputs":[{"name":"_epoch","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":4918},{"stateMutability":"view","type":"function","name":"rate_at","inputs":[{"name":"_timestamp","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":14134},{"stateMutability":"view","type":"function","name":"current_epoch","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":14997},{"stateMutability":"view","type":"function","name":"future_epoch_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":36854},{"stateMutability":"view","type":"function","name":"future_epoch_rate","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":19623},{"stateMutability":"nonpayable","type":"function","name":"set_admin","inputs":[{"name":"_admin","type":"address"}],"outputs":[],"gas":39075},{"stateMutability":"nonpayable","type":"function","name":"set_rewards_at","inputs":[{"name":"_epoch","type":"uint256"},{"name":"_reward","type":"uint256"}],"outputs":[],"gas":52480},{"stateMutability":"nonpayable","type":"function","name":"set_rewards_starting_at","inputs":[{"name":"_epoch","type":"uint256"},{"name":"_rewards","type":"uint256[10]"}],"outputs":[],"gas":371612},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2658},{"stateMutability":"view","type":"function","name":"first_epoch_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2688},{"stateMutability":"view","type":"function","name":"epoch_length","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2718},{"stateMutability":"view","type":"function","name":"rewards","inputs":[{"name":"arg0","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":2857}]

60206105736101403933600055610140516002554261014051808061002357600080fd5b82049050905061014051808202821582848304141761004157600080fd5b80905090509050610140518082101561005957600080fd5b8082039050905060015561055b56600436101561000d576103fd565b600035601c52600051341561002157600080fd5b639a1586ef81141561005257600435610140526101405160065801610403565b6101a0526101a05160005260206000f35b6322026ada8114156100a157600154600435600254808202821582848304141761007b57600080fd5b8090509050905081818301101561009157600080fd5b8082019050905060005260206000f35b6339935cf08114156101225760015460043510156100c457600060005260206000f35b600435610140526101405160065801610403565b6101a0526101a0516c01431e0fae6d7217caa000000081106100f957600080fd5b600360c052602060c0200154600254808061011357600080fd5b82049050905060005260206000f35b639372b4e48114156101485760065801610461565b610140526101405160005260206000f35b63be5d1be98114156101875760065801610493565b610140526101405160025481818301101561017757600080fd5b8082019050905060005260206000f35b63c67f46e08114156101fe5760065801610461565b610140526101405160018181830110156101b557600080fd5b808201905090506c01431e0fae6d7217caa000000081106101d557600080fd5b600360c052602060c020015460025480806101ef57600080fd5b82049050905060005260206000f35b63e9333fab81141561025e5760043560a01c1561021a57600080fd5b600054331461022857600080fd5b600435600055600435610140527f5a272403b402d892977df56625f4164ccaf70ca3863991c43ecfe76a6905b0a16020610140a1005b63d284abbb8114156102c357600054331461027857600080fd5b60065801610461565b61014052610140516004351161029657600080fd5b6024356004356c01431e0fae6d7217caa000000081106102b557600080fd5b600360c052602060c0200155005b6341eec7ab8114156103765760005433146102dd57600080fd5b60065801610461565b6101405261014051600435116102fb57600080fd5b6101406000600a818352015b602461014051600a811061031a57600080fd5b60200201356004356101405181818301101561033557600080fd5b808201905090506c01431e0fae6d7217caa0000000811061035557600080fd5b600360c052602060c02001555b8151600101808352811415610307575b5050005b63f851a44081141561038e5760005460005260206000f35b6310ca275a8114156103a65760015460005260206000f35b634231bfe18114156103be5760025460005260206000f35b63f301af428114156103fb576004356c01431e0fae6d7217caa000000081106103e657600080fd5b600360c052602060c020015460005260206000f35b505b60006000fd5b610160526101405260015461014051101561042657600060005260005161016051565b610140516001548082101561043a57600080fd5b80820390509050600254808061044f57600080fd5b82049050905060005260005161016051565b610140526101405142610160526101605160065801610403565b6101c052610140526101c05160005260005161014051565b610140526001546101405160065801610461565b61016052610140526101605160025480820282158284830414176104ca57600080fd5b809050905090508181830110156104e057600080fd5b8082019050905060005260005161014051565b61006861055b0361006860003961006861055b036000f30000000000000000000000000000000000000000000000000000000000093a80

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

0000000000000000000000000000000000000000000000000000000000093a80

-----Decoded View---------------
Arg [0] : _epoch_length (uint256): 604800

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000093a80


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.