INative20

Git Source

Author: 0xvv @ Kiln

This contract allows users to stake any amount of ETH in the vPool(s). Users are given non transferable ERC-20 type shares to track their stake.

Functions

initialize

Initializes the contract with the given parameters.

function initialize(Native20Configuration calldata args) external;

Parameters

NameTypeDescription
argsNative20ConfigurationThe initialization arguments.

name

Returns the name of the token.

function name() external view returns (string memory);

symbol

Returns the symbol of the token, usually a shorter version of the name.

function symbol() external view returns (string memory);

decimals

Returns the number of decimals used to get its user representation.

function decimals() external view returns (uint8);

totalSupply

Returns the total amount of staking shares.

function totalSupply() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256Total amount of shares.

totalUnderlyingSupply

Returns the amount of ETH owned by the users in the pool(s).

function totalUnderlyingSupply() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256Total amount of shares.

balanceOf

Returns the amount of staking shares for an account.

function balanceOf(address account) external view returns (uint256);

Parameters

NameTypeDescription
accountaddressThe address of the account.

Returns

NameTypeDescription
<none>uint256amount of staking shares.

balanceOfUnderlying

Returns the ETH value of the account balance.

function balanceOfUnderlying(address account) external view returns (uint256);

Parameters

NameTypeDescription
accountaddressThe address of the account.

Returns

NameTypeDescription
<none>uint256amount of ETH.

stake

Function to stake ETH.

function stake() external payable;