ETH Price: $3,054.97 (+4.95%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
End203787742024-07-24 20:25:35107 days ago1721852735IN
0x048cb93e...e63CDb6F0
0 ETH0.000661584.75912576
End200584362024-06-10 2:26:11152 days ago1717986371IN
0x048cb93e...e63CDb6F0
0 ETH0.000606463.78590702
End200022922024-06-02 6:17:35160 days ago1717309055IN
0x048cb93e...e63CDb6F0
0 ETH0.000657964.10739992
End199813252024-05-30 7:58:59162 days ago1717055939IN
0x048cb93e...e63CDb6F0
0 ETH0.0025072915.65193391
End199001912024-05-18 23:44:35174 days ago1716075875IN
0x048cb93e...e63CDb6F0
0 ETH0.000425512.65627154
Start190390222024-01-19 6:09:11295 days ago1705644551IN
0x048cb93e...e63CDb6F0
0 ETH0.0028274320.34304524
Start189402392024-01-05 9:38:59308 days ago1704447539IN
0x048cb93e...e63CDb6F0
0 ETH0.0020425714.69604506
End188886082023-12-29 3:37:35316 days ago1703821055IN
0x048cb93e...e63CDb6F0
0 ETH0.0033458620.88670947
End188799842023-12-27 22:34:47317 days ago1703716487IN
0x048cb93e...e63CDb6F0
0 ETH0.004861830.35004849
End188799532023-12-27 22:28:23317 days ago1703716103IN
0x048cb93e...e63CDb6F0
0 ETH0.0049742231.05186676
End188464302023-12-23 5:27:35322 days ago1703309255IN
0x048cb93e...e63CDb6F0
0 ETH0.0032568820.33125401
Start186741632023-11-29 2:02:47346 days ago1701223367IN
0x048cb93e...e63CDb6F0
0 ETH0.0042478131.65570758
Start186348892023-11-23 14:00:35351 days ago1700748035IN
0x048cb93e...e63CDb6F0
0 ETH0.0051522538.39580761
Start186348572023-11-23 13:54:11351 days ago1700747651IN
0x048cb93e...e63CDb6F0
0 ETH0.0053947940.20323598
Start186250972023-11-22 5:07:23353 days ago1700629643IN
0x048cb93e...e63CDb6F0
0 ETH0.0040682829.27080026
End185834192023-11-16 9:01:35358 days ago1700125295IN
0x048cb93e...e63CDb6F0
0 ETH0.00464328.98418259
End185765682023-11-15 10:02:11359 days ago1700042531IN
0x048cb93e...e63CDb6F0
0 ETH0.0041469825.88772372
End185725062023-11-14 20:24:11360 days ago1699993451IN
0x048cb93e...e63CDb6F0
0 ETH0.0056766144.52980328
End185725022023-11-14 20:23:23360 days ago1699993403IN
0x048cb93e...e63CDb6F0
0 ETH0.0056771444.52980328
End185722242023-11-14 19:26:47360 days ago1699990007IN
0x048cb93e...e63CDb6F0
0 ETH0.00235751107.15963254
End185721972023-11-14 19:21:23360 days ago1699989683IN
0x048cb93e...e63CDb6F0
0 ETH0.00235751107.15963254
End185721682023-11-14 19:15:35360 days ago1699989335IN
0x048cb93e...e63CDb6F0
0 ETH0.0022551198.04853726
End185216782023-11-07 17:49:59367 days ago1699379399IN
0x048cb93e...e63CDb6F0
0 ETH0.0045415628.35096418
Start185138632023-11-06 15:34:23368 days ago1699284863IN
0x048cb93e...e63CDb6F0
0 ETH0.0052432544.78504832
Start185135032023-11-06 14:21:47368 days ago1699280507IN
0x048cb93e...e63CDb6F0
0 ETH0.0053586339.93735126
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SingleStaking

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2023-06-13
*/

// SPDX-License-Identifier: MIT

// Single Staking contract for DeFi Platform. Easy access for projects to have asset to asset staking earning interest based on APY %

pragma solidity ^0.8.2;

/**
 * @title Owner
 * @dev Set & change owner
 */
contract Owner {

    address private owner;
    
    // event for EVM logging
    event OwnerSet(address indexed oldOwner, address indexed newOwner);
    
    // modifier to check if caller is owner
    modifier isOwner() {
        // If the first argument of 'require' evaluates to 'false', execution terminates and all
        // changes to the state and to Ether balances are reverted.
        // This used to consume all gas in old EVM versions, but not anymore.
        // It is often a good idea to use 'require' to check if functions are called correctly.
        // As a second argument, you can also provide an explanation about what went wrong.
        require(msg.sender == owner, "Caller is not owner");
        _;
    }
    
    /**
     * @dev Set contract deployer as owner
     */
    constructor(address _owner) {
        owner = _owner;
        emit OwnerSet(address(0), owner);
    }

    /**
     * @dev Change owner
     * @param newOwner address of new owner
     */
    function changeOwner(address newOwner) public isOwner {
        emit OwnerSet(owner, newOwner);
        owner = newOwner;
    }

    /**
     * @dev Return owner address 
     * @return address of owner
     */
    function getOwner() public view returns (address) {
        return owner;
    }
}

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @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 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);
}

/**
 * @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;
    }
}

/**
 * @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.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * 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}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * 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 value {ERC20} uses, unless this function is
     * 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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, 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}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), 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}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - 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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][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) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * 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:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, 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;
        _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;
        }
        _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 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 {}
}

/**
 * 
 * Stakes is an interest gain contract for ERC-20 tokens
 * 
 * assets is the ERC20 token
 * interest_rate: percentage rate
 * maturity is the time in seconds after which is safe to end the stake
 * penalization for ending a stake before maturity time
 * lower_amount is the minimum amount for creating a stake
 * 
 */
contract SingleStaking is Owner, ReentrancyGuard {

    // token    
    ERC20 public asset;

    // stakes history
    struct Record {
        uint256 from;
        uint256 amount;
        uint256 gain;
        uint256 penalization;
        uint256 to;
        bool ended;
    }

    // contract parameters
    uint16 public interest_rate;
    uint256 public maturity;
    uint8 public penalization;
    uint256 public lower_amount;

    mapping(address => Record[]) public ledger;

    event StakeStart(address indexed user, uint256 value, uint256 index);
    event StakeEnd(address indexed user, uint256 value, uint256 penalty, uint256 interest, uint256 index);
    
    constructor(ERC20 _erc20, address _owner, uint16 _rate, uint256 _maturity, uint8 _penalization, uint256 _lower) Owner(_owner) {
        require(_penalization<=100, "Penalty has to be an integer between 0 and 100");
        asset = _erc20;
        interest_rate = _rate;
        maturity = _maturity;
        penalization = _penalization;
        lower_amount = _lower;
    }
    
    function start(uint256 _value) external nonReentrant {
        require(_value >= lower_amount, "Invalid value");
        require(asset.transferFrom(msg.sender, address(this), _value));
        ledger[msg.sender].push(Record(block.timestamp, _value, 0, 0, 0, false));
        emit StakeStart(msg.sender, _value, ledger[msg.sender].length-1);
    }

    function end(uint256 i) external nonReentrant {

        require(i < ledger[msg.sender].length, "Invalid index");
        require(ledger[msg.sender][i].ended==false, "Invalid stake");
        
        // penalization
        if(block.timestamp - ledger[msg.sender][i].from < maturity) {
            uint256 _penalization = ledger[msg.sender][i].amount * penalization / 100;
            require(asset.transfer(msg.sender, ledger[msg.sender][i].amount - _penalization));
            require(asset.transfer(getOwner(), _penalization));
            ledger[msg.sender][i].penalization = _penalization;
            ledger[msg.sender][i].to = block.timestamp;
            ledger[msg.sender][i].ended = true;
            emit StakeEnd(msg.sender, ledger[msg.sender][i].amount, _penalization, 0, i);
        // interest gained
        } else {
            uint256 _interest = get_gains(msg.sender, i);
            // check that the owner can pay interest before trying to pay
            if (asset.allowance(getOwner(), address(this)) >= _interest && asset.balanceOf(getOwner()) >= _interest) {
                require(asset.transferFrom(getOwner(), msg.sender, _interest));
            } else {
                _interest = 0;
            }
            require(asset.transfer(msg.sender, ledger[msg.sender][i].amount));
            ledger[msg.sender][i].gain = _interest;
            ledger[msg.sender][i].to = block.timestamp;
            ledger[msg.sender][i].ended = true;
            emit StakeEnd(msg.sender, ledger[msg.sender][i].amount, 0, _interest, i);
        }
    }

    function set(uint256 _lower, uint256 _maturity, uint16 _rate, uint8 _penalization) external isOwner {
        require(_penalization<=100, "Invalid value");
        lower_amount = _lower;
        maturity = _maturity;
        interest_rate = _rate;
        penalization = _penalization;
    }
    
    // calculate interest to the current date time
    function get_gains(address _address, uint256 _rec_number) public view returns (uint256) {
        uint256 _record_seconds = block.timestamp - ledger[_address][_rec_number].from;
        uint256 _year_seconds = 365*24*60*60;
        return _record_seconds * ledger[_address][_rec_number].amount * interest_rate / 100 / _year_seconds;
    }

    function ledger_length(address _address) external view returns (uint256) {
        return ledger[_address].length;
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ERC20","name":"_erc20","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint16","name":"_rate","type":"uint16"},{"internalType":"uint256","name":"_maturity","type":"uint256"},{"internalType":"uint8","name":"_penalization","type":"uint8"},{"internalType":"uint256","name":"_lower","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"penalty","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interest","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"StakeEnd","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"StakeStart","type":"event"},{"inputs":[],"name":"asset","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"}],"name":"end","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_rec_number","type":"uint256"}],"name":"get_gains","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"interest_rate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ledger","outputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"gain","type":"uint256"},{"internalType":"uint256","name":"penalization","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"},{"internalType":"bool","name":"ended","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"ledger_length","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lower_amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maturity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"penalization","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lower","type":"uint256"},{"internalType":"uint256","name":"_maturity","type":"uint256"},{"internalType":"uint16","name":"_rate","type":"uint16"},{"internalType":"uint8","name":"_penalization","type":"uint8"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516112ec3803806112ec83398101604081905261002f91610157565b600080546001600160a01b0319166001600160a01b03871690811782556040518792907f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735908290a35060018055606460ff831611156100eb5760405162461bcd60e51b815260206004820152602e60248201527f50656e616c74792068617320746f20626520616e20696e74656765722062657460448201526d07765656e203020616e64203130360941b606482015260840160405180910390fd5b6002805461ffff909516600160a01b026001600160b01b03199095166001600160a01b0390971696909617939093179094556003556004805460ff90941660ff1990941693909317909255506005556101d7565b6001600160a01b038116811461015457600080fd5b50565b60008060008060008060c0878903121561017057600080fd5b865161017b8161013f565b602088015190965061018c8161013f565b604088015190955061ffff811681146101a457600080fd5b60608801516080890151919550935060ff811681146101c257600080fd5b8092505060a087015190509295509295509295565b611106806101e66000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c806374f1ca3a1161008c578063a6f9dae111610066578063a6f9dae1146101d1578063aa4c0dd9146101e4578063b7f8f9ea1461020d578063cbb3d8081461022057600080fd5b806374f1ca3a1461016b578063893d20e8146101ad57806395805dad146101be57600080fd5b80630ad24528146100d45780630c98c9c1146100e957806314145b4814610105578063204f83f91461011857806338d52e0f1461012157806357ca87401461014c575b600080fd5b6100e76100e2366004610f45565b610248565b005b6100f260055481565b6040519081526020015b60405180910390f35b6100e7610113366004610f5e565b610a9a565b6100f260035481565b600254610134906001600160a01b031681565b6040516001600160a01b0390911681526020016100fc565b6004546101599060ff1681565b60405160ff90911681526020016100fc565b61017e610179366004610fd1565b610b70565b6040805196875260208701959095529385019290925260608401526080830152151560a082015260c0016100fc565b6000546001600160a01b0316610134565b6100e76101cc366004610f45565b610bc7565b6100e76101df366004610ffb565b610dc2565b6100f26101f2366004610ffb565b6001600160a01b031660009081526006602052604090205490565b6100f261021b366004610fd1565b610e6d565b60025461023590600160a01b900461ffff1681565b60405161ffff90911681526020016100fc565b60026001540361029f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026001553360009081526006602052604090205481106102f25760405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c840d2dcc8caf609b1b6044820152606401610296565b3360009081526006602052604090208054829081106103135761031361101d565b600091825260209091206005600690920201015460ff16156103675760405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964207374616b6560981b6044820152606401610296565b60035433600090815260066020526040902080548390811061038b5761038b61101d565b906000526020600020906006020160000154426103a89190611049565b10156106aa576004543360009081526006602052604081208054919260649260ff9091169190859081106103de576103de61101d565b9060005260206000209060060201600101546103fa919061105c565b6104049190611073565b60025433600081815260066020526040902080549394506001600160a01b039092169263a9059cbb9285918790811061043f5761043f61101d565b90600052602060002090600602016001015461045b9190611049565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156104a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ca9190611095565b6104d357600080fd5b6002546001600160a01b031663a9059cbb6104f66000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105679190611095565b61057057600080fd5b3360009081526006602052604090208054829190849081106105945761059461101d565b6000918252602080832060069283020160030193909355338252909152604090208054429190849081106105ca576105ca61101d565b600091825260208083206006928302016004019390935533825290915260409020805460019190849081106106015761060161101d565b60009182526020808320600692830201600501805460ff1916941515949094179093553380835292526040902080547f1deb31f039e2645a4e97af07659090228d39e7f992bfaf37af3838ad9665e23a9190859081106106635761066361101d565b6000918252602082206001600690920201015460405161069c928691889093845260208401929092526040830152606082015260800190565b60405180910390a250610a93565b60006106b63383610e6d565b60025490915081906001600160a01b031663dd62ed3e6106de6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa158015610728573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074c91906110b7565b101580156107e5575060025481906001600160a01b03166370a0823161077a6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156107be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e291906110b7565b10155b15610892576002546001600160a01b03166323b872dd61080d6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152336024820152604481018490526064016020604051808303816000875af1158015610860573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108849190611095565b61088d57600080fd5b610896565b5060005b60025433600081815260066020526040902080546001600160a01b039093169263a9059cbb929190869081106108ce576108ce61101d565b60009182526020909120600160069092020101546040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561092d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109519190611095565b61095a57600080fd5b33600090815260066020526040902080548291908490811061097e5761097e61101d565b6000918252602080832060069283020160020193909355338252909152604090208054429190849081106109b4576109b461101d565b600091825260208083206006928302016004019390935533825290915260409020805460019190849081106109eb576109eb61101d565b60009182526020808320600692830201600501805460ff1916941515949094179093553380835292526040902080547f1deb31f039e2645a4e97af07659090228d39e7f992bfaf37af3838ad9665e23a919085908110610a4d57610a4d61101d565b90600052602060002090600602016001015460008486604051610a89949392919093845260208401929092526040830152606082015260800190565b60405180910390a2505b5060018055565b6000546001600160a01b03163314610aea5760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b6044820152606401610296565b60648160ff161115610b2e5760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b6044820152606401610296565b6005939093556003919091556002805461ffff60a01b1916600160a01b61ffff909316929092029190911790556004805460ff191660ff909216919091179055565b60066020528160005260406000208181548110610b8c57600080fd5b600091825260209091206006909102018054600182015460028301546003840154600485015460059095015493965091945092909160ff1686565b600260015403610c195760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610296565b6002600155600554811015610c605760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b6044820152606401610296565b6002546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610cb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdb9190611095565b610ce457600080fd5b336000818152600660208181526040808420815160c081018352428152808401888152928101868152606082018781526080830188815260a08401898152855460018082018855878c52898c209651918b029096019081559651878601559251600287015590516003860155516004850155516005909301805460ff1916931515939093179092559385905291905290547f01030a23696d25d6138e45b2944d465c807d48422a2700ae29527f92b6cb439c918491610da39190611049565b6040805192835260208301919091520160405180910390a25060018055565b6000546001600160a01b03163314610e125760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b6044820152606401610296565b600080546040516001600160a01b03808516939216917f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73591a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382166000908152600660205260408120805482919084908110610e9a57610e9a61101d565b90600052602060002090600602016000015442610eb79190611049565b6002546001600160a01b038616600090815260066020526040902080549293506301e13380928392606492600160a01b90910461ffff169188908110610eff57610eff61101d565b90600052602060002090600602016001015485610f1c919061105c565b610f26919061105c565b610f309190611073565b610f3a9190611073565b925050505b92915050565b600060208284031215610f5757600080fd5b5035919050565b60008060008060808587031215610f7457600080fd5b8435935060208501359250604085013561ffff81168114610f9457600080fd5b9150606085013560ff81168114610faa57600080fd5b939692955090935050565b80356001600160a01b0381168114610fcc57600080fd5b919050565b60008060408385031215610fe457600080fd5b610fed83610fb5565b946020939093013593505050565b60006020828403121561100d57600080fd5b61101682610fb5565b9392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610f3f57610f3f611033565b8082028115828204841417610f3f57610f3f611033565b60008261109057634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156110a757600080fd5b8151801515811461101657600080fd5b6000602082840312156110c957600080fd5b505191905056fea264697066735822122082120cba4744d4cb51539f5c4023e689129f7feaa586c19c8de26cb7d870bd5a64736f6c634300081200330000000000000000000000004be2b2c45b432ba362f198c08094017b61e3bdc60000000000000000000000000de2035e9619a137ba4ca77c89afc2c70954f2e900000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000278d00000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806374f1ca3a1161008c578063a6f9dae111610066578063a6f9dae1146101d1578063aa4c0dd9146101e4578063b7f8f9ea1461020d578063cbb3d8081461022057600080fd5b806374f1ca3a1461016b578063893d20e8146101ad57806395805dad146101be57600080fd5b80630ad24528146100d45780630c98c9c1146100e957806314145b4814610105578063204f83f91461011857806338d52e0f1461012157806357ca87401461014c575b600080fd5b6100e76100e2366004610f45565b610248565b005b6100f260055481565b6040519081526020015b60405180910390f35b6100e7610113366004610f5e565b610a9a565b6100f260035481565b600254610134906001600160a01b031681565b6040516001600160a01b0390911681526020016100fc565b6004546101599060ff1681565b60405160ff90911681526020016100fc565b61017e610179366004610fd1565b610b70565b6040805196875260208701959095529385019290925260608401526080830152151560a082015260c0016100fc565b6000546001600160a01b0316610134565b6100e76101cc366004610f45565b610bc7565b6100e76101df366004610ffb565b610dc2565b6100f26101f2366004610ffb565b6001600160a01b031660009081526006602052604090205490565b6100f261021b366004610fd1565b610e6d565b60025461023590600160a01b900461ffff1681565b60405161ffff90911681526020016100fc565b60026001540361029f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026001553360009081526006602052604090205481106102f25760405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c840d2dcc8caf609b1b6044820152606401610296565b3360009081526006602052604090208054829081106103135761031361101d565b600091825260209091206005600690920201015460ff16156103675760405162461bcd60e51b815260206004820152600d60248201526c496e76616c6964207374616b6560981b6044820152606401610296565b60035433600090815260066020526040902080548390811061038b5761038b61101d565b906000526020600020906006020160000154426103a89190611049565b10156106aa576004543360009081526006602052604081208054919260649260ff9091169190859081106103de576103de61101d565b9060005260206000209060060201600101546103fa919061105c565b6104049190611073565b60025433600081815260066020526040902080549394506001600160a01b039092169263a9059cbb9285918790811061043f5761043f61101d565b90600052602060002090600602016001015461045b9190611049565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156104a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ca9190611095565b6104d357600080fd5b6002546001600160a01b031663a9059cbb6104f66000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015610543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105679190611095565b61057057600080fd5b3360009081526006602052604090208054829190849081106105945761059461101d565b6000918252602080832060069283020160030193909355338252909152604090208054429190849081106105ca576105ca61101d565b600091825260208083206006928302016004019390935533825290915260409020805460019190849081106106015761060161101d565b60009182526020808320600692830201600501805460ff1916941515949094179093553380835292526040902080547f1deb31f039e2645a4e97af07659090228d39e7f992bfaf37af3838ad9665e23a9190859081106106635761066361101d565b6000918252602082206001600690920201015460405161069c928691889093845260208401929092526040830152606082015260800190565b60405180910390a250610a93565b60006106b63383610e6d565b60025490915081906001600160a01b031663dd62ed3e6106de6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa158015610728573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074c91906110b7565b101580156107e5575060025481906001600160a01b03166370a0823161077a6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156107be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e291906110b7565b10155b15610892576002546001600160a01b03166323b872dd61080d6000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152336024820152604481018490526064016020604051808303816000875af1158015610860573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108849190611095565b61088d57600080fd5b610896565b5060005b60025433600081815260066020526040902080546001600160a01b039093169263a9059cbb929190869081106108ce576108ce61101d565b60009182526020909120600160069092020101546040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561092d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109519190611095565b61095a57600080fd5b33600090815260066020526040902080548291908490811061097e5761097e61101d565b6000918252602080832060069283020160020193909355338252909152604090208054429190849081106109b4576109b461101d565b600091825260208083206006928302016004019390935533825290915260409020805460019190849081106109eb576109eb61101d565b60009182526020808320600692830201600501805460ff1916941515949094179093553380835292526040902080547f1deb31f039e2645a4e97af07659090228d39e7f992bfaf37af3838ad9665e23a919085908110610a4d57610a4d61101d565b90600052602060002090600602016001015460008486604051610a89949392919093845260208401929092526040830152606082015260800190565b60405180910390a2505b5060018055565b6000546001600160a01b03163314610aea5760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b6044820152606401610296565b60648160ff161115610b2e5760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b6044820152606401610296565b6005939093556003919091556002805461ffff60a01b1916600160a01b61ffff909316929092029190911790556004805460ff191660ff909216919091179055565b60066020528160005260406000208181548110610b8c57600080fd5b600091825260209091206006909102018054600182015460028301546003840154600485015460059095015493965091945092909160ff1686565b600260015403610c195760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610296565b6002600155600554811015610c605760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b6044820152606401610296565b6002546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610cb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdb9190611095565b610ce457600080fd5b336000818152600660208181526040808420815160c081018352428152808401888152928101868152606082018781526080830188815260a08401898152855460018082018855878c52898c209651918b029096019081559651878601559251600287015590516003860155516004850155516005909301805460ff1916931515939093179092559385905291905290547f01030a23696d25d6138e45b2944d465c807d48422a2700ae29527f92b6cb439c918491610da39190611049565b6040805192835260208301919091520160405180910390a25060018055565b6000546001600160a01b03163314610e125760405162461bcd60e51b815260206004820152601360248201527221b0b63632b91034b9903737ba1037bbb732b960691b6044820152606401610296565b600080546040516001600160a01b03808516939216917f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73591a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382166000908152600660205260408120805482919084908110610e9a57610e9a61101d565b90600052602060002090600602016000015442610eb79190611049565b6002546001600160a01b038616600090815260066020526040902080549293506301e13380928392606492600160a01b90910461ffff169188908110610eff57610eff61101d565b90600052602060002090600602016001015485610f1c919061105c565b610f26919061105c565b610f309190611073565b610f3a9190611073565b925050505b92915050565b600060208284031215610f5757600080fd5b5035919050565b60008060008060808587031215610f7457600080fd5b8435935060208501359250604085013561ffff81168114610f9457600080fd5b9150606085013560ff81168114610faa57600080fd5b939692955090935050565b80356001600160a01b0381168114610fcc57600080fd5b919050565b60008060408385031215610fe457600080fd5b610fed83610fb5565b946020939093013593505050565b60006020828403121561100d57600080fd5b61101682610fb5565b9392505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610f3f57610f3f611033565b8082028115828204841417610f3f57610f3f611033565b60008261109057634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156110a757600080fd5b8151801515811461101657600080fd5b6000602082840312156110c957600080fd5b505191905056fea264697066735822122082120cba4744d4cb51539f5c4023e689129f7feaa586c19c8de26cb7d870bd5a64736f6c63430008120033

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

0000000000000000000000004be2b2c45b432ba362f198c08094017b61e3bdc60000000000000000000000000de2035e9619a137ba4ca77c89afc2c70954f2e900000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000278d00000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a

-----Decoded View---------------
Arg [0] : _erc20 (address): 0x4bE2b2C45b432BA362f198c08094017b61E3BDc6
Arg [1] : _owner (address): 0x0dE2035E9619A137BA4cA77c89AFC2C70954F2e9
Arg [2] : _rate (uint16): 2
Arg [3] : _maturity (uint256): 2592000
Arg [4] : _penalization (uint8): 10
Arg [5] : _lower (uint256): 10

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000004be2b2c45b432ba362f198c08094017b61e3bdc6
Arg [1] : 0000000000000000000000000de2035e9619a137ba4ca77c89afc2c70954f2e9
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [3] : 0000000000000000000000000000000000000000000000000000000000278d00
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000a


Deployed Bytecode Sourcemap

20512:3895:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21964:1597;;;;;;:::i;:::-;;:::i;:::-;;20936:27;;;;;;;;;345:25:1;;;333:2;318:18;20936:27:0;;;;;;;;23569:297;;;;;;:::i;:::-;;:::i;20874:23::-;;;;;;20588:18;;;;;-1:-1:-1;;;;;20588:18:0;;;;;;-1:-1:-1;;;;;1137:32:1;;;1119:51;;1107:2;1092:18;20588::0;960:216:1;20904:25:0;;;;;;;;;;;;1353:4:1;1341:17;;;1323:36;;1311:2;1296:18;20904:25:0;1181:184:1;20972:42:0;;;;;;:::i;:::-;;:::i;:::-;;;;2088:25:1;;;2144:2;2129:18;;2122:34;;;;2172:18;;;2165:34;;;;2230:2;2215:18;;2208:34;2273:3;2258:19;;2251:35;2330:14;2323:22;2317:3;2302:19;;2295:51;2075:3;2060:19;20972:42:0;1807:545:1;1502:81:0;1543:7;1570:5;-1:-1:-1;;;;;1570:5:0;1502:81;;21605:351;;;;;;:::i;:::-;;:::i;1278:130::-;;;;;;:::i;:::-;;:::i;24280:122::-;;;;;;:::i;:::-;-1:-1:-1;;;;;24371:16:0;24344:7;24371:16;;;:6;:16;;;;;:23;;24280:122;23930:342;;;;;;:::i;:::-;;:::i;20840:27::-;;;;;-1:-1:-1;;;20840:27:0;;;;;;;;;2930:6:1;2918:19;;;2900:38;;2888:2;2873:18;20840:27:0;2756:188:1;21964:1597:0;3241:1;3839:7;;:19;3831:63;;;;-1:-1:-1;;;3831:63:0;;3151:2:1;3831:63:0;;;3133:21:1;3190:2;3170:18;;;3163:30;3229:33;3209:18;;;3202:61;3280:18;;3831:63:0;;;;;;;;;3241:1;3972:7;:18;22042:10:::1;22035:18;::::0;;;:6:::1;:18;::::0;;;;:25;22031:29;::::1;22023:55;;;::::0;-1:-1:-1;;;22023:55:0;;3511:2:1;22023:55:0::1;::::0;::::1;3493:21:1::0;3550:2;3530:18;;;3523:30;-1:-1:-1;;;3569:18:1;;;3562:43;3622:18;;22023:55:0::1;3309:337:1::0;22023:55:0::1;22104:10;22097:18;::::0;;;:6:::1;:18;::::0;;;;:21;;22116:1;;22097:21;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;:27:::1;:21;::::0;;::::1;;:27;::::0;::::1;;:34;22089:60;;;::::0;-1:-1:-1;;;22089:60:0;;3985:2:1;22089:60:0::1;::::0;::::1;3967:21:1::0;4024:2;4004:18;;;3997:30;-1:-1:-1;;;4043:18:1;;;4036:43;4096:18;;22089:60:0::1;3783:337:1::0;22089:60:0::1;22245:8;::::0;22223:10:::1;22216:18;::::0;;;:6:::1;:18;::::0;;;;:21;;22235:1;;22216:21;::::1;;;;;:::i;:::-;;;;;;;;;;;:26;;;22198:15;:44;;;;:::i;:::-;:55;22195:1359;;;22325:12;::::0;22301:10:::1;22270:21;22294:18:::0;;;:6:::1;:18;::::0;;;;:21;;22270;;22340:3:::1;::::0;22325:12:::1;::::0;;::::1;::::0;22294:18;22313:1;;22294:21;::::1;;;;;:::i;:::-;;;;;;;;;;;:28;;;:43;;;;:::i;:::-;:49;;;;:::i;:::-;22366:5;::::0;22381:10:::1;22366:5;22393:18:::0;;;:6:::1;:18;::::0;;;;:21;;22270:73;;-1:-1:-1;;;;;;22366:5:0;;::::1;::::0;:14:::1;::::0;22270:73;;22412:1;;22393:21;::::1;;;;;:::i;:::-;;;;;;;;;;;:28;;;:44;;;;:::i;:::-;22366:72;::::0;-1:-1:-1;;;;;;22366:72:0::1;::::0;;;;;;-1:-1:-1;;;;;4977:32:1;;;22366:72:0::1;::::0;::::1;4959:51:1::0;5026:18;;;5019:34;4932:18;;22366:72:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22358:81;;;::::0;::::1;;22462:5;::::0;-1:-1:-1;;;;;22462:5:0::1;:14;22477:10;1543:7:::0;1570:5;-1:-1:-1;;;;;1570:5:0;;1502:81;22477:10:::1;22462:41;::::0;-1:-1:-1;;;;;;22462:41:0::1;::::0;;;;;;-1:-1:-1;;;;;4977:32:1;;;22462:41:0::1;::::0;::::1;4959:51:1::0;5026:18;;;5019:34;;;4932:18;;22462:41:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22454:50;;;::::0;::::1;;22526:10;22519:18;::::0;;;:6:::1;:18;::::0;;;;:21;;22556:13;;22519:18;22538:1;;22519:21;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;:34;;:50:::0;;;;22591:10:::1;22584:18:::0;;;;;;;;:21;;22611:15:::1;::::0;22584:18;22603:1;;22584:21;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;:24;;:42:::0;;;;22648:10:::1;22641:18:::0;;;;;;;;:21;;22671:4:::1;::::0;22641:18;22660:1;;22641:21;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;:27;;:34:::0;;-1:-1:-1;;22641:34:0::1;::::0;::::1;;::::0;;;::::1;::::0;;;22704:10:::1;22716:18:::0;;;;;;;;:21;;22695:71:::1;::::0;22716:18;22735:1;;22716:21;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;:28:::1;:21;::::0;;::::1;;:28;::::0;22695:71:::1;::::0;::::1;::::0;22746:13;;22764:1;;5585:25:1;;;5641:2;5626:18;;5619:34;;;;5684:2;5669:18;;5662:34;5727:2;5712:18;;5705:34;5572:3;5557:19;;5346:399;22695:71:0::1;;;;;;;;22255:551;22195:1359;;;22827:17;22847:24;22857:10;22869:1;22847:9;:24::i;:::-;22965:5;::::0;22827:44;;-1:-1:-1;22827:44:0;;-1:-1:-1;;;;;22965:5:0::1;:15;22981:10;1543:7:::0;1570:5;-1:-1:-1;;;;;1570:5:0;;1502:81;22981:10:::1;22965:42;::::0;-1:-1:-1;;;;;;22965:42:0::1;::::0;;;;;;-1:-1:-1;;;;;5980:15:1;;;22965:42:0::1;::::0;::::1;5962:34:1::0;23001:4:0::1;6012:18:1::0;;;6005:43;5897:18;;22965:42:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:55;;:99;;;;-1:-1:-1::0;23024:5:0::1;::::0;23055:9;;-1:-1:-1;;;;;23024:5:0::1;:15;23040:10;1543:7:::0;1570:5;-1:-1:-1;;;;;1570:5:0;;1502:81;23040:10:::1;23024:27;::::0;-1:-1:-1;;;;;;23024:27:0::1;::::0;;;;;;-1:-1:-1;;;;;1137:32:1;;;23024:27:0::1;::::0;::::1;1119:51:1::0;1092:18;;23024:27:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40;;22965:99;22961:256;;;23093:5;::::0;-1:-1:-1;;;;;23093:5:0::1;:18;23112:10;1543:7:::0;1570:5;-1:-1:-1;;;;;1570:5:0;;1502:81;23112:10:::1;23093:53;::::0;-1:-1:-1;;;;;;23093:53:0::1;::::0;;;;;;-1:-1:-1;;;;;6506:15:1;;;23093:53:0::1;::::0;::::1;6488:34:1::0;23124:10:0::1;6538:18:1::0;;;6531:43;6590:18;;;6583:34;;;6423:18;;23093:53:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;23085:62;;;::::0;::::1;;22961:256;;;-1:-1:-1::0;23200:1:0::1;22961:256;23239:5;::::0;23254:10:::1;23239:5;23266:18:::0;;;:6:::1;:18;::::0;;;;:21;;-1:-1:-1;;;;;23239:5:0;;::::1;::::0;:14:::1;::::0;23254:10;23266:18;23285:1;;23266:21;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;:28:::1;:21;::::0;;::::1;;:28;::::0;23239:56:::1;::::0;-1:-1:-1;;;;;;23239:56:0::1;::::0;;;;;;-1:-1:-1;;;;;4977:32:1;;;23239:56:0::1;::::0;::::1;4959:51:1::0;5026:18;;;5019:34;4932:18;;23239:56:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;23231:65;;;::::0;::::1;;23318:10;23311:18;::::0;;;:6:::1;:18;::::0;;;;:21;;23340:9;;23311:18;23330:1;;23311:21;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;:26;;:38:::0;;;;23371:10:::1;23364:18:::0;;;;;;;;:21;;23391:15:::1;::::0;23364:18;23383:1;;23364:21;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;:24;;:42:::0;;;;23428:10:::1;23421:18:::0;;;;;;;;:21;;23451:4:::1;::::0;23421:18;23440:1;;23421:21;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;:27;;:34:::0;;-1:-1:-1;;23421:34:0::1;::::0;::::1;;::::0;;;::::1;::::0;;;23484:10:::1;23496:18:::0;;;;;;;;:21;;23475:67:::1;::::0;23496:18;23515:1;;23496:21;::::1;;;;;:::i;:::-;;;;;;;;;;;:28;;;23526:1;23529:9;23540:1;23475:67;;;;;;;;5585:25:1::0;;;5641:2;5626:18;;5619:34;;;;5684:2;5669:18;;5662:34;5727:2;5712:18;;5705:34;5572:3;5557:19;;5346:399;23475:67:0::1;;;;;;;;22812:742;22195:1359;-1:-1:-1::0;3197:1:0;4151:22;;21964:1597::o;23569:297::-;954:5;;-1:-1:-1;;;;;954:5:0;940:10;:19;932:51;;;;-1:-1:-1;;;932:51:0;;7234:2:1;932:51:0;;;7216:21:1;7273:2;7253:18;;;7246:30;-1:-1:-1;;;7292:18:1;;;7285:49;7351:18;;932:51:0;7032:343:1;932:51:0;23703:3:::1;23688:13;:18;;;;23680:44;;;::::0;-1:-1:-1;;;23680:44:0;;7582:2:1;23680:44:0::1;::::0;::::1;7564:21:1::0;7621:2;7601:18;;;7594:30;-1:-1:-1;;;7640:18:1;;;7633:43;7693:18;;23680:44:0::1;7380:337:1::0;23680:44:0::1;23735:12;:21:::0;;;;23767:8:::1;:20:::0;;;;-1:-1:-1;23798:21:0;;-1:-1:-1;;;;23798:21:0::1;-1:-1:-1::0;;;23798:21:0::1;::::0;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;23830:12:::1;:28:::0;;-1:-1:-1;;23830:28:0::1;;::::0;;::::1;::::0;;;::::1;::::0;;23569:297::o;20972:42::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20972:42:0;;-1:-1:-1;20972:42:0;;;;;;:::o;21605:351::-;3241:1;3839:7;;:19;3831:63;;;;-1:-1:-1;;;3831:63:0;;3151:2:1;3831:63:0;;;3133:21:1;3190:2;3170:18;;;3163:30;3229:33;3209:18;;;3202:61;3280:18;;3831:63:0;2949:355:1;3831:63:0;3241:1;3972:7;:18;21687:12:::1;::::0;21677:22;::::1;;21669:48;;;::::0;-1:-1:-1;;;21669:48:0;;7582:2:1;21669:48:0::1;::::0;::::1;7564:21:1::0;7621:2;7601:18;;;7594:30;-1:-1:-1;;;7640:18:1;;;7633:43;7693:18;;21669:48:0::1;7380:337:1::0;21669:48:0::1;21736:5;::::0;:53:::1;::::0;-1:-1:-1;;;21736:53:0;;21755:10:::1;21736:53;::::0;::::1;6488:34:1::0;21775:4:0::1;6538:18:1::0;;;6531:43;6590:18;;;6583:34;;;-1:-1:-1;;;;;21736:5:0;;::::1;::::0;:18:::1;::::0;6423::1;;21736:53:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21728:62;;;::::0;::::1;;21808:10;21801:18;::::0;;;:6:::1;:18;::::0;;;;;;;21825:47;;::::1;::::0;::::1;::::0;;21832:15:::1;21825:47:::0;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;21801:72;;21825:47;21801:72;;::::1;::::0;;;;;;;;;;;;::::1;::::0;;::::1;::::0;;;;;;;::::1;::::0;;;::::1;::::0;::::1;::::0;;;::::1;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;21801:72:0::1;::::0;::::1;;::::0;;;::::1;::::0;;;21920:18;;;;;;;:25;;21889:59:::1;::::0;21825:47;;21920:27:::1;::::0;21825:47;21920:27:::1;:::i;:::-;21889:59;::::0;;7896:25:1;;;7952:2;7937:18;;7930:34;;;;7869:18;21889:59:0::1;;;;;;;-1:-1:-1::0;3197:1:0;4151:22;;21605:351::o;1278:130::-;954:5;;-1:-1:-1;;;;;954:5:0;940:10;:19;932:51;;;;-1:-1:-1;;;932:51:0;;7234:2:1;932:51:0;;;7216:21:1;7273:2;7253:18;;;7246:30;-1:-1:-1;;;7292:18:1;;;7285:49;7351:18;;932:51:0;7032:343:1;932:51:0;1357:5:::1;::::0;;1348:25:::1;::::0;-1:-1:-1;;;;;1348:25:0;;::::1;::::0;1357:5;::::1;::::0;1348:25:::1;::::0;::::1;1384:5;:16:::0;;-1:-1:-1;;;;;;1384:16:0::1;-1:-1:-1::0;;;;;1384:16:0;;;::::1;::::0;;;::::1;::::0;;1278:130::o;23930:342::-;-1:-1:-1;;;;;24073:16:0;;24009:7;24073:16;;;:6;:16;;;;;:29;;24009:7;;24073:16;24090:11;;24073:29;;;;;;:::i;:::-;;;;;;;;;;;:34;;;24055:15;:52;;;;:::i;:::-;24229:13;;-1:-1:-1;;;;;24190:16:0;;24118:21;24190:16;;;:6;:16;;;;;:29;;24029:78;;-1:-1:-1;24142:12:0;;;;24245:3;;-1:-1:-1;;;24229:13:0;;;;;;24207:11;;24190:29;;;;;;:::i;:::-;;;;;;;;;;;:36;;;24172:15;:54;;;;:::i;:::-;:70;;;;:::i;:::-;:76;;;;:::i;:::-;:92;;;;:::i;:::-;24165:99;;;;23930:342;;;;;:::o;14:180:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:1;;14:180;-1:-1:-1;14:180:1:o;381:574::-;464:6;472;480;488;541:3;529:9;520:7;516:23;512:33;509:53;;;558:1;555;548:12;509:53;594:9;581:23;571:33;;651:2;640:9;636:18;623:32;613:42;;705:2;694:9;690:18;677:32;749:6;742:5;738:18;731:5;728:29;718:57;;771:1;768;761:12;718:57;794:5;-1:-1:-1;851:2:1;836:18;;823:32;899:4;886:18;;874:31;;864:59;;919:1;916;909:12;864:59;381:574;;;;-1:-1:-1;381:574:1;;-1:-1:-1;;381:574:1:o;1370:173::-;1438:20;;-1:-1:-1;;;;;1487:31:1;;1477:42;;1467:70;;1533:1;1530;1523:12;1467:70;1370:173;;;:::o;1548:254::-;1616:6;1624;1677:2;1665:9;1656:7;1652:23;1648:32;1645:52;;;1693:1;1690;1683:12;1645:52;1716:29;1735:9;1716:29;:::i;:::-;1706:39;1792:2;1777:18;;;;1764:32;;-1:-1:-1;;;1548:254:1:o;2565:186::-;2624:6;2677:2;2665:9;2656:7;2652:23;2648:32;2645:52;;;2693:1;2690;2683:12;2645:52;2716:29;2735:9;2716:29;:::i;:::-;2706:39;2565:186;-1:-1:-1;;;2565:186:1:o;3651:127::-;3712:10;3707:3;3703:20;3700:1;3693:31;3743:4;3740:1;3733:15;3767:4;3764:1;3757:15;4125:127;4186:10;4181:3;4177:20;4174:1;4167:31;4217:4;4214:1;4207:15;4241:4;4238:1;4231:15;4257:128;4324:9;;;4345:11;;;4342:37;;;4359:18;;:::i;4390:168::-;4463:9;;;4494;;4511:15;;;4505:22;;4491:37;4481:71;;4532:18;;:::i;4563:217::-;4603:1;4629;4619:132;;4673:10;4668:3;4664:20;4661:1;4654:31;4708:4;4705:1;4698:15;4736:4;4733:1;4726:15;4619:132;-1:-1:-1;4765:9:1;;4563:217::o;5064:277::-;5131:6;5184:2;5172:9;5163:7;5159:23;5155:32;5152:52;;;5200:1;5197;5190:12;5152:52;5232:9;5226:16;5285:5;5278:13;5271:21;5264:5;5261:32;5251:60;;5307:1;5304;5297:12;6059:184;6129:6;6182:2;6170:9;6161:7;6157:23;6153:32;6150:52;;;6198:1;6195;6188:12;6150:52;-1:-1:-1;6221:16:1;;6059:184;-1:-1:-1;6059:184:1:o

Swarm Source

ipfs://82120cba4744d4cb51539f5c4023e689129f7feaa586c19c8de26cb7d870bd5a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.