IMultiPool1155

Git Source

Author: 0xvv @ Kiln

This contract contains internal functions to stake and track positions in multiple pools. It also exposes supply getters and pool addition.

Functions

totalUnderlyingSupply

Returns the amount of pool shares owned by the users.

function totalUnderlyingSupply(uint256 id) external view returns (uint256);

Parameters

NameTypeDescription
iduint256Id of the pool

Returns

NameTypeDescription
<none>uint256Total amount of shares.

totalSupply

Returns the total amount of vStakes shares.

function totalSupply(uint256 id) external view returns (uint256);

Parameters

NameTypeDescription
iduint256Id of the pool

Returns

NameTypeDescription
<none>uint256Total amount of shares.

requestExit

Sends the given number of shares to the exit queue, the user receives the NFT ticket

function requestExit(uint256 id, uint256 amount) external;

Parameters

NameTypeDescription
iduint256Id of the pool
amountuint256Amount of shares to add to the exit queue

batchRequestExit

Batched version of requestExit

function batchRequestExit(uint256[] calldata ids, uint256[] calldata amounts) external;

Parameters

NameTypeDescription
idsuint256[]Ids of the pools
amountsuint256[]Amount of shares to add to the exit queue

poolRate

Returns the poolShare to ETH conversion rate for the given ID

function poolRate(uint256 id) external returns (uint256);

Parameters

NameTypeDescription
iduint256Id of the pool

Returns

NameTypeDescription
<none>uint256ETH value of a pool share

setPoolActivation

Allows the integrator to prevent users from depositing to a vPool.

function setPoolActivation(uint256 poolId, bool status) external;

Parameters

NameTypeDescription
poolIduint256The id of the vPool.
statusboolWhether the users can deposit to the pool.

Events

TransferSingle

Emitted when a transfer occurs.

event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

Parameters

NameTypeDescription
operatoraddressThe address of the operator.
fromaddressThe address of the sender.
toaddressThe address of the recipient.
iduint256The id of the pool.
valueuint256The amount of staking shares.

TransferBatch

Emitted when a batch transfer occurs, sending shares of multiple pools to the same recipient.

event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);

Parameters

NameTypeDescription
operatoraddressThe address of the operator.
fromaddressThe address of the sender.
toaddressThe address of the recipient.
idsuint256[]The ids of the pools.
valuesuint256[]The amounts of staking shares.

CommissionSharesSold

Emitted when some integrator shares are sold

event CommissionSharesSold(uint256 pSharesSold, uint256 id, uint256 amountSold);

Parameters

NameTypeDescription
pSharesSolduint256ETH amount of vPool shares sold
iduint256Id of the pool
amountSolduint256ETH amount of shares sold

Errors

InsufficientBalance

Emitted when a transfer is attempted but the sender does not have enough balance.

error InsufficientBalance(uint256 id, uint256 amount, uint256 balance);

Parameters

NameTypeDescription
iduint256The id of the token.
amountuint256The token amount.
balanceuint256The balance of user.