Native20

Git Source

Inherits: MultiPool20, INative20, Implementation, Initializable

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

State Variables

$name

The name of the shares.

Slot: keccak256(bytes("native20.1.name")) - 1

types.String internal constant $name = types.String.wrap(0xeee152275d096301850a53ae85c6991c818bc6bac8a2174c268aa94ed7cf06f1);

$symbol

The symbol of the shares.

Slot: keccak256(bytes("native20.1.symbol")) - 1

types.String internal constant $symbol = types.String.wrap(0x4a8b3e24ebc795477af927068865c6fcc26e359a994edca2492e515a46aad711);

Functions

initialize

Initializes the contract with the given parameters.

function initialize(Native20Configuration calldata args) external init(0);

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 virtual override returns (uint8);

balanceOf

Returns the amount of staking shares for an account.

function balanceOf(address account) external view virtual 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 virtual returns (uint256);

Parameters

NameTypeDescription
accountaddressThe address of the account.

Returns

NameTypeDescription
<none>uint256amount of ETH.

totalSupply

Returns the total amount of staking shares.

function totalSupply() external view virtual 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 virtual returns (uint256);

Returns

NameTypeDescription
<none>uint256Total amount of shares.

stake

Function to stake ETH.

function stake() external payable;