ERC-20
DeFi
Overview
Max Total Supply
0 sVEC
Holders
2,008 ( -0.050%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 9 Decimals)
Balance
0.001097328 sVECValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
sVEC
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "../interface/IsVEC.sol"; import "../interface/IStaking.sol"; /// @title sVEC /// @notice Staked Vector contract sVEC is IsVEC, ERC20 { /// EVENTS /// event LogSupply(uint256 indexed epoch, uint256 totalSupply); event LogRebase(uint256 indexed epoch, uint256 rebase, uint256 index); event LogStakingContractUpdated(address stakingContract); /// MODIFIERS /// modifier onlyStakingContract() { require( msg.sender == stakingContract, "StakingContract: call is not staking contract" ); _; } /// DATA STRUCTURES /// struct Rebase { uint256 epoch; uint256 rebase; // 18 decimals uint256 totalStakedBefore; uint256 totalStakedAfter; uint256 amountRebased; uint256 index; uint256 blockNumberOccured; } /// STATE VARIABLES /// address internal initializer; address public stakingContract; // balance used to calc rebase uint256 internal _totalSupply; uint256 internal INDEX; // Index Gons - tracks rebase growth uint256 private constant MAX_UINT256 = type(uint256).max; uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 25_000_000 * 10 ** 9; // TOTAL_GONS is a multiple of INITIAL_FRAGMENTS_SUPPLY so that _gonsPerFragment is an integer. // Use the highest value that fits in a uint256 for max granularity. uint256 private constant TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY); // MAX_SUPPLY = maximum integer < (sqrt(4*TOTAL_GONS + 1) - 1) / 2 uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1 uint256 private _gonsPerFragment; Rebase[] public rebases; // past rebase data mapping(address => uint256) private _gonBalances; mapping(address => mapping(address => uint256)) private _allowedValue; /// CONSTRUCTOR /// constructor() ERC20("Staked Vector", "sVEC") { initializer = msg.sender; _totalSupply = INITIAL_FRAGMENTS_SUPPLY; _gonsPerFragment = TOTAL_GONS / _totalSupply; } function decimals() public view virtual override returns (uint8) { return 9; } /// INITIALIZATION /// /// @notice Sets initial index /// @param _index Initial index function setIndex(uint256 _index) external { require( msg.sender == initializer, "Initializer: caller is not initializer" ); require(INDEX == 0, "Cannot set INDEX again"); INDEX = gonsForBalance(_index); } /// @notice Initialize contract /// @param _stakingContract Address of staking contract function initialize(address _stakingContract) external { require( msg.sender == initializer, "Initializer: caller is not initializer" ); require(_stakingContract != address(0), "Zero address: Staking"); stakingContract = _stakingContract; _gonBalances[stakingContract] = TOTAL_GONS; emit Transfer(address(0x0), stakingContract, _totalSupply); emit LogStakingContractUpdated(stakingContract); initializer = address(0); } /// REBASE /// /// @notice Increases sVEC supply /// @param amount_ Amount to rebase for /// @param epoch_ Epoch number /// @return _newSupply New total supply function rebase( uint256 amount_, uint256 epoch_ ) public override onlyStakingContract returns (uint256 _newSupply) { uint256 rebaseAmount; uint256 circulatingSupply_ = circulatingSupply(); if (amount_ == 0) { emit LogSupply(epoch_, _totalSupply); emit LogRebase(epoch_, 0, index()); return _totalSupply; } else if (circulatingSupply_ > 0) { rebaseAmount = (amount_ * _totalSupply) / circulatingSupply_; } else { rebaseAmount = amount_; } _totalSupply = _totalSupply + rebaseAmount; if (_totalSupply > MAX_SUPPLY) { _totalSupply = MAX_SUPPLY; } _gonsPerFragment = TOTAL_GONS / _totalSupply; _storeRebase(circulatingSupply_, amount_, epoch_); return _totalSupply; } /// @notice Stores rebase /// @param previousCirculating_ Previous circ supply /// @param profit_ Amount of profic for epoch /// @param epoch_ Epoch number function _storeRebase( uint256 previousCirculating_, uint256 profit_, uint256 epoch_ ) internal { uint256 rebasePercent; if (previousCirculating_ > 0) rebasePercent = (profit_ * 1e18) / previousCirculating_; rebases.push( Rebase({ epoch: epoch_, rebase: rebasePercent, // 18 decimals totalStakedBefore: previousCirculating_, totalStakedAfter: circulatingSupply(), amountRebased: profit_, index: index(), blockNumberOccured: block.number }) ); emit LogSupply(epoch_, _totalSupply); emit LogRebase(epoch_, rebasePercent, index()); } /// MUTATIVE FUNCTIONS /// /// @notice Transfer sVEC from msg.sender /// @param to Address sending sVEC to /// @param value Amount of sVEC to send function transfer( address to, uint256 value ) public override(IERC20, ERC20) returns (bool) { uint256 gonValue = value * _gonsPerFragment; _gonBalances[msg.sender] = _gonBalances[msg.sender] - gonValue; _gonBalances[to] = _gonBalances[to] + gonValue; emit Transfer(msg.sender, to, value); return true; } /// @notice Transfer sVEC /// @param from Address sending sVEC from /// @param to Address sending sVEC to /// @param value Amount of sVEC to send function transferFrom( address from, address to, uint256 value ) public override(IERC20, ERC20) returns (bool) { _allowedValue[from][msg.sender] = _allowedValue[from][msg.sender] - value; emit Approval(from, msg.sender, _allowedValue[from][msg.sender]); uint256 gonValue = gonsForBalance(value); _gonBalances[from] = _gonBalances[from] - gonValue; _gonBalances[to] = _gonBalances[to] + gonValue; emit Transfer(from, to, value); return true; } function approve( address spender, uint256 value ) public override(IERC20, ERC20) returns (bool) { _approve(msg.sender, spender, value); return true; } function increaseAllowance( address spender, uint256 addedValue ) public override returns (bool) { _approve( msg.sender, spender, _allowedValue[msg.sender][spender] + addedValue ); return true; } function decreaseAllowance( address spender, uint256 subtractedValue ) public override returns (bool) { uint256 oldValue = _allowedValue[msg.sender][spender]; if (subtractedValue >= oldValue) { _approve(msg.sender, spender, 0); } else { _approve(msg.sender, spender, oldValue - subtractedValue); } return true; } /// INTERNAL FUNCTIONS /// function _approve( address owner, address spender, uint256 value ) internal virtual override { _allowedValue[owner][spender] = value; emit Approval(owner, spender, value); } /// VIEW FUNCTIONS /// /// @notice Returns balance of an address /// @param who Address of who to get balance from function balanceOf( address who ) public view override(IERC20, ERC20) returns (uint256) { return _gonBalances[who] / _gonsPerFragment; } /// @notice Returns calculation of gons for amount of sVEC /// @param amount Amount of sVEC to calculate gons for function gonsForBalance( uint256 amount ) public view override returns (uint256) { return amount * _gonsPerFragment; } /// @notice Returns calculation of balance for gons amount /// @param gons Amount of gons to calculate sVEC for function balanceForGons( uint256 gons ) public view override returns (uint256) { return gons / _gonsPerFragment; } /// @notice Returns sVEC circulating supply (Total Supply - Staking Contract Balance) function circulatingSupply() public view override returns (uint256) { return _totalSupply - balanceOf(stakingContract); } /// @notice Returns current sVEC index function index() public view override returns (uint256) { return balanceForGons(INDEX); } function allowance( address owner_, address spender ) public view override(IERC20, ERC20) returns (uint256) { return _allowedValue[owner_][spender]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.8.19; interface IStaking { function stake(address _to, uint256 _amount) external; function unstake(address _to, uint256 _amount) external; function rebase() external; function index() external view returns (uint256); }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.8.19; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IsVEC is IERC20 { function rebase(uint256 amount_, uint epoch_) external returns (uint256); function circulatingSupply() external view returns (uint256); function gonsForBalance(uint amount) external view returns (uint); function balanceForGons(uint gons) external view returns (uint); function index() external view returns (uint); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rebase","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"LogRebase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"stakingContract","type":"address"}],"name":"LogStakingContractUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"}],"name":"LogSupply","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gons","type":"uint256"}],"name":"balanceForGons","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"circulatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"gonsForBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"index","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingContract","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"uint256","name":"epoch_","type":"uint256"}],"name":"rebase","outputs":[{"internalType":"uint256","name":"_newSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rebases","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"rebase","type":"uint256"},{"internalType":"uint256","name":"totalStakedBefore","type":"uint256"},{"internalType":"uint256","name":"totalStakedAfter","type":"uint256"},{"internalType":"uint256","name":"amountRebased","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"blockNumberOccured","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"setIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040518060400160405280600d81526020016c29ba30b5b2b2102b32b1ba37b960991b815250604051806040016040528060048152602001637356454360e01b81525081600390816200006691906200016d565b5060046200007582826200016d565b5050600580546001600160a01b03191633179055506658d15e176280006007819055620000a5816000196200024f565b620000b39060001962000266565b620000bf91906200028e565b600955620002a5565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620000f357607f821691505b6020821081036200011457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200016857600081815260208120601f850160051c81016020861015620001435750805b601f850160051c820191505b8181101562000164578281556001016200014f565b5050505b505050565b81516001600160401b03811115620001895762000189620000c8565b620001a1816200019a8454620000de565b846200011a565b602080601f831160018114620001d95760008415620001c05750858301515b600019600386901b1c1916600185901b17855562000164565b600085815260208120601f198616915b828110156200020a57888601518255948401946001909101908401620001e9565b5085821015620002295787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601260045260246000fd5b60008262000261576200026162000239565b500690565b818103818111156200028857634e487b7160e01b600052601160045260246000fd5b92915050565b600082620002a057620002a062000239565b500490565b610ffd80620002b56000396000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c806370a08231116100cd578063a457c2d711610081578063c4d66de811610066578063c4d66de8146102e0578063dd62ed3e146102f3578063ee99205c1461032c57600080fd5b8063a457c2d7146102ba578063a9059cbb146102cd57600080fd5b80637965d56d116100b25780637965d56d146102975780639358928b146102aa57806395d89b41146102b257600080fd5b806370a082311461023c57806373c69eb71461024f57600080fd5b806323b872dd11610124578063313ce56711610109578063313ce56714610205578063395093511461021457806340a5737f1461022757600080fd5b806323b872dd146101ea5780632986c0e5146101fd57600080fd5b8063095ea7b311610155578063095ea7b3146101ac57806318160ddd146101cf5780631bd39674146101d757600080fd5b8063058ecdb41461017157806306fdde0314610197575b600080fd5b61018461017f366004610d9c565b610357565b6040519081526020015b60405180910390f35b61019f610531565b60405161018e9190610dbe565b6101bf6101ba366004610e28565b6105c3565b604051901515815260200161018e565b600254610184565b6101846101e5366004610e52565b6105d9565b6101bf6101f8366004610e6b565b6105e9565b61018461073b565b6040516009815260200161018e565b6101bf610222366004610e28565b61074d565b61023a610235366004610e52565b610789565b005b61018461024a366004610ea7565b610852565b61026261025d366004610e52565b610879565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e00161018e565b6101846102a5366004610e52565b6108cb565b6101846108db565b61019f610900565b6101bf6102c8366004610e28565b61090f565b6101bf6102db366004610e28565b610964565b61023a6102ee366004610ea7565b610a23565b610184610301366004610ec9565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205490565b60065461033f906001600160a01b031681565b6040516001600160a01b03909116815260200161018e565b6006546000906001600160a01b031633146103df5760405162461bcd60e51b815260206004820152602e60248201527f5374616b696e67436f6e74726163743a202063616c6c206973206e6f7420737460448201527f616b696e6720636f6e747261637400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000806103ea6108db565b90508460000361048057837f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf460075460405161042891815260200190565b60405180910390a2837f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb2600061045c61073b565b6040805192835260208301919091520160405180910390a26007549250505061052b565b80156104a65780600754866104959190610f12565b61049f9190610f3f565b91506104aa565b8491505b816007546104b89190610f53565b60078190556fffffffffffffffffffffffffffffffff10156104e9576fffffffffffffffffffffffffffffffff6007555b6007546104ff6658d15e17628000600019610f66565b61050b90600019610f7a565b6105159190610f3f565b600955610523818686610bec565b600754925050505b92915050565b60606003805461054090610f8d565b80601f016020809104026020016040519081016040528092919081815260200182805461056c90610f8d565b80156105b95780601f1061058e576101008083540402835291602001916105b9565b820191906000526020600020905b81548152906001019060200180831161059c57829003601f168201915b5050505050905090565b60006105d0338484610d3b565b50600192915050565b60006009548261052b9190610f12565b6001600160a01b0383166000908152600c60209081526040808320338452909152812054610618908390610f7a565b6001600160a01b0385166000818152600c6020908152604080832033808552908352928190208590555193845290927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3600061067d836105d9565b6001600160a01b0386166000908152600b60205260409020549091506106a4908290610f7a565b6001600160a01b038087166000908152600b602052604080822093909355908616815220546106d4908290610f53565b6001600160a01b038086166000818152600b602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906107289087815260200190565b60405180910390a3506001949350505050565b60006107486008546108cb565b905090565b336000818152600c602090815260408083206001600160a01b038716845290915281205490916105d0918590610784908690610f53565b610d3b565b6005546001600160a01b031633146107f35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a65723a202063616c6c6572206973206e6f7420696e697460448201526634b0b634bd32b960c91b60648201526084016103d6565b600854156108435760405162461bcd60e51b815260206004820152601660248201527f43616e6e6f742073657420494e44455820616761696e0000000000000000000060448201526064016103d6565b61084c816105d9565b60085550565b6009546001600160a01b0382166000908152600b6020526040812054909161052b91610f3f565b600a818154811061088957600080fd5b90600052602060002090600702016000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154905087565b60006009548261052b9190610f3f565b6006546000906108f3906001600160a01b0316610852565b6007546107489190610f7a565b60606004805461054090610f8d565b336000908152600c602090815260408083206001600160a01b038616845290915281205480831061094b5761094633856000610d3b565b61095a565b61095a33856107848685610f7a565b5060019392505050565b600080600954836109759190610f12565b336000908152600b6020526040902054909150610993908290610f7a565b336000908152600b6020526040808220929092556001600160a01b038616815220546109c0908290610f53565b6001600160a01b0385166000818152600b60205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a119087815260200190565b60405180910390a35060019392505050565b6005546001600160a01b03163314610a8d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a65723a202063616c6c6572206973206e6f7420696e697460448201526634b0b634bd32b960c91b60648201526084016103d6565b6001600160a01b038116610ae35760405162461bcd60e51b815260206004820152601560248201527f5a65726f20616464726573733a205374616b696e67000000000000000000000060448201526064016103d6565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055610b1e6658d15e17628000600019610f66565b610b2a90600019610f7a565b600680546001600160a01b039081166000908152600b602052604080822094909455915460075493519116927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91610b8491815260200190565b60405180910390a36006546040516001600160a01b0390911681527f817c653428858ed536dc085c5d8273734c517b55de44b55f5c5877a75e3373a19060200160405180910390a1506005805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008315610c145783610c0784670de0b6b3a7640000610f12565b610c119190610f3f565b90505b600a6040518060e00160405280848152602001838152602001868152602001610c3b6108db565b8152602001858152602001610c4e61073b565b8152436020918201528254600181810185556000948552938290208351600792830290910190815591830151938201939093556040808301516002830155606083015160038301556080830151600483015560a0830151600583015560c0909201516006909101559054905183917f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf491610cea91815260200190565b60405180910390a2817f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb282610d1d61073b565b6040805192835260208301919091520160405180910390a250505050565b6001600160a01b038381166000818152600c602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008060408385031215610daf57600080fd5b50508035926020909101359150565b600060208083528351808285015260005b81811015610deb57858101830151858201604001528201610dcf565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610e2357600080fd5b919050565b60008060408385031215610e3b57600080fd5b610e4483610e0c565b946020939093013593505050565b600060208284031215610e6457600080fd5b5035919050565b600080600060608486031215610e8057600080fd5b610e8984610e0c565b9250610e9760208501610e0c565b9150604084013590509250925092565b600060208284031215610eb957600080fd5b610ec282610e0c565b9392505050565b60008060408385031215610edc57600080fd5b610ee583610e0c565b9150610ef360208401610e0c565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761052b5761052b610efc565b634e487b7160e01b600052601260045260246000fd5b600082610f4e57610f4e610f29565b500490565b8082018082111561052b5761052b610efc565b600082610f7557610f75610f29565b500690565b8181038181111561052b5761052b610efc565b600181811c90821680610fa157607f821691505b602082108103610fc157634e487b7160e01b600052602260045260246000fd5b5091905056fea264697066735822122014c01f5e7ebbd982fb9649a364f490eb7b61e91c0566ae095341e86be9f6d30064736f6c63430008130033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061016c5760003560e01c806370a08231116100cd578063a457c2d711610081578063c4d66de811610066578063c4d66de8146102e0578063dd62ed3e146102f3578063ee99205c1461032c57600080fd5b8063a457c2d7146102ba578063a9059cbb146102cd57600080fd5b80637965d56d116100b25780637965d56d146102975780639358928b146102aa57806395d89b41146102b257600080fd5b806370a082311461023c57806373c69eb71461024f57600080fd5b806323b872dd11610124578063313ce56711610109578063313ce56714610205578063395093511461021457806340a5737f1461022757600080fd5b806323b872dd146101ea5780632986c0e5146101fd57600080fd5b8063095ea7b311610155578063095ea7b3146101ac57806318160ddd146101cf5780631bd39674146101d757600080fd5b8063058ecdb41461017157806306fdde0314610197575b600080fd5b61018461017f366004610d9c565b610357565b6040519081526020015b60405180910390f35b61019f610531565b60405161018e9190610dbe565b6101bf6101ba366004610e28565b6105c3565b604051901515815260200161018e565b600254610184565b6101846101e5366004610e52565b6105d9565b6101bf6101f8366004610e6b565b6105e9565b61018461073b565b6040516009815260200161018e565b6101bf610222366004610e28565b61074d565b61023a610235366004610e52565b610789565b005b61018461024a366004610ea7565b610852565b61026261025d366004610e52565b610879565b604080519788526020880196909652948601939093526060850191909152608084015260a083015260c082015260e00161018e565b6101846102a5366004610e52565b6108cb565b6101846108db565b61019f610900565b6101bf6102c8366004610e28565b61090f565b6101bf6102db366004610e28565b610964565b61023a6102ee366004610ea7565b610a23565b610184610301366004610ec9565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205490565b60065461033f906001600160a01b031681565b6040516001600160a01b03909116815260200161018e565b6006546000906001600160a01b031633146103df5760405162461bcd60e51b815260206004820152602e60248201527f5374616b696e67436f6e74726163743a202063616c6c206973206e6f7420737460448201527f616b696e6720636f6e747261637400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000806103ea6108db565b90508460000361048057837f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf460075460405161042891815260200190565b60405180910390a2837f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb2600061045c61073b565b6040805192835260208301919091520160405180910390a26007549250505061052b565b80156104a65780600754866104959190610f12565b61049f9190610f3f565b91506104aa565b8491505b816007546104b89190610f53565b60078190556fffffffffffffffffffffffffffffffff10156104e9576fffffffffffffffffffffffffffffffff6007555b6007546104ff6658d15e17628000600019610f66565b61050b90600019610f7a565b6105159190610f3f565b600955610523818686610bec565b600754925050505b92915050565b60606003805461054090610f8d565b80601f016020809104026020016040519081016040528092919081815260200182805461056c90610f8d565b80156105b95780601f1061058e576101008083540402835291602001916105b9565b820191906000526020600020905b81548152906001019060200180831161059c57829003601f168201915b5050505050905090565b60006105d0338484610d3b565b50600192915050565b60006009548261052b9190610f12565b6001600160a01b0383166000908152600c60209081526040808320338452909152812054610618908390610f7a565b6001600160a01b0385166000818152600c6020908152604080832033808552908352928190208590555193845290927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3600061067d836105d9565b6001600160a01b0386166000908152600b60205260409020549091506106a4908290610f7a565b6001600160a01b038087166000908152600b602052604080822093909355908616815220546106d4908290610f53565b6001600160a01b038086166000818152600b602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906107289087815260200190565b60405180910390a3506001949350505050565b60006107486008546108cb565b905090565b336000818152600c602090815260408083206001600160a01b038716845290915281205490916105d0918590610784908690610f53565b610d3b565b6005546001600160a01b031633146107f35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a65723a202063616c6c6572206973206e6f7420696e697460448201526634b0b634bd32b960c91b60648201526084016103d6565b600854156108435760405162461bcd60e51b815260206004820152601660248201527f43616e6e6f742073657420494e44455820616761696e0000000000000000000060448201526064016103d6565b61084c816105d9565b60085550565b6009546001600160a01b0382166000908152600b6020526040812054909161052b91610f3f565b600a818154811061088957600080fd5b90600052602060002090600702016000915090508060000154908060010154908060020154908060030154908060040154908060050154908060060154905087565b60006009548261052b9190610f3f565b6006546000906108f3906001600160a01b0316610852565b6007546107489190610f7a565b60606004805461054090610f8d565b336000908152600c602090815260408083206001600160a01b038616845290915281205480831061094b5761094633856000610d3b565b61095a565b61095a33856107848685610f7a565b5060019392505050565b600080600954836109759190610f12565b336000908152600b6020526040902054909150610993908290610f7a565b336000908152600b6020526040808220929092556001600160a01b038616815220546109c0908290610f53565b6001600160a01b0385166000818152600b60205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a119087815260200190565b60405180910390a35060019392505050565b6005546001600160a01b03163314610a8d5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a65723a202063616c6c6572206973206e6f7420696e697460448201526634b0b634bd32b960c91b60648201526084016103d6565b6001600160a01b038116610ae35760405162461bcd60e51b815260206004820152601560248201527f5a65726f20616464726573733a205374616b696e67000000000000000000000060448201526064016103d6565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055610b1e6658d15e17628000600019610f66565b610b2a90600019610f7a565b600680546001600160a01b039081166000908152600b602052604080822094909455915460075493519116927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91610b8491815260200190565b60405180910390a36006546040516001600160a01b0390911681527f817c653428858ed536dc085c5d8273734c517b55de44b55f5c5877a75e3373a19060200160405180910390a1506005805473ffffffffffffffffffffffffffffffffffffffff19169055565b60008315610c145783610c0784670de0b6b3a7640000610f12565b610c119190610f3f565b90505b600a6040518060e00160405280848152602001838152602001868152602001610c3b6108db565b8152602001858152602001610c4e61073b565b8152436020918201528254600181810185556000948552938290208351600792830290910190815591830151938201939093556040808301516002830155606083015160038301556080830151600483015560a0830151600583015560c0909201516006909101559054905183917f0417b340e646d4be71f9b2da63b5c3c69bc9cfa069f0e0db4756271886130bf491610cea91815260200190565b60405180910390a2817f6012dbce857565c4a40974aa5de8373a761fc429077ef0c8c8611d1e20d63fb282610d1d61073b565b6040805192835260208301919091520160405180910390a250505050565b6001600160a01b038381166000818152600c602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008060408385031215610daf57600080fd5b50508035926020909101359150565b600060208083528351808285015260005b81811015610deb57858101830151858201604001528201610dcf565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610e2357600080fd5b919050565b60008060408385031215610e3b57600080fd5b610e4483610e0c565b946020939093013593505050565b600060208284031215610e6457600080fd5b5035919050565b600080600060608486031215610e8057600080fd5b610e8984610e0c565b9250610e9760208501610e0c565b9150604084013590509250925092565b600060208284031215610eb957600080fd5b610ec282610e0c565b9392505050565b60008060408385031215610edc57600080fd5b610ee583610e0c565b9150610ef360208401610e0c565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761052b5761052b610efc565b634e487b7160e01b600052601260045260246000fd5b600082610f4e57610f4e610f29565b500490565b8082018082111561052b5761052b610efc565b600082610f7557610f75610f29565b500690565b8181038181111561052b5761052b610efc565b600181811c90821680610fa157607f821691505b602082108103610fc157634e487b7160e01b600052602260045260246000fd5b5091905056fea264697066735822122014c01f5e7ebbd982fb9649a364f490eb7b61e91c0566ae095341e86be9f6d30064736f6c63430008130033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.