LiquidityPools pallet
Derived from live runtime metadata on TRN root (pallet index 54, captured 2026-05-02). For prose-style documentation see LiquidityPools on the curated reference side.
- Pallet index
54- Calls
- 8
- Events
- 11
- Errors
- 22
- Storage items
- 7
- Constants
- 5
Calls (extrinsics)
LiquidityPools.create_pool
See [
Pallet::create_pool].
api.tx.liquidityPools.create_pool(reward_asset_id: u32, staked_asset_id: u32, interest_rate: u32, max_tokens: u128, lock_start_block: u32, lock_end_block: u32)| Argument | Type | Doc |
|---|---|---|
reward_asset_id | u32 | AssetId |
staked_asset_id | u32 | AssetId |
interest_rate | u32 | u32 |
max_tokens | u128 | Balance |
lock_start_block | u32 | BlockNumberFor<T> |
lock_end_block | u32 | BlockNumberFor<T> |
Call index: 0
LiquidityPools.set_pool_succession
See [
Pallet::set_pool_succession].
api.tx.liquidityPools.set_pool_succession(predecessor_pool_id: u32, successor_pool_id: u32)| Argument | Type | Doc |
|---|---|---|
predecessor_pool_id | u32 | T::PoolId |
successor_pool_id | u32 | T::PoolId |
Call index: 1
LiquidityPools.set_pool_rollover
See [
Pallet::set_pool_rollover].
api.tx.liquidityPools.set_pool_rollover(id: u32, should_rollover: bool)| Argument | Type | Doc |
|---|---|---|
id | u32 | T::PoolId |
should_rollover | bool | bool |
Call index: 2
LiquidityPools.close_pool
See [
Pallet::close_pool].
api.tx.liquidityPools.close_pool(id: u32)| Argument | Type | Doc |
|---|---|---|
id | u32 | T::PoolId |
Call index: 3
LiquidityPools.enter_pool
See [
Pallet::enter_pool].
api.tx.liquidityPools.enter_pool(pool_id: u32, amount: u128)| Argument | Type | Doc |
|---|---|---|
pool_id | u32 | T::PoolId |
amount | u128 | Balance |
Call index: 4
LiquidityPools.exit_pool
See [
Pallet::exit_pool].
api.tx.liquidityPools.exit_pool(id: u32)| Argument | Type | Doc |
|---|---|---|
id | u32 | T::PoolId |
Call index: 5
LiquidityPools.claim_reward
See [
Pallet::claim_reward].
api.tx.liquidityPools.claim_reward(id: u32)| Argument | Type | Doc |
|---|---|---|
id | u32 | T::PoolId |
Call index: 6
LiquidityPools.rollover_unsigned
See [
Pallet::rollover_unsigned].
api.tx.liquidityPools.rollover_unsigned(id: u32, current_block: u32)| Argument | Type | Doc |
|---|---|---|
id | u32 | T::PoolId |
current_block | u32 | BlockNumberFor<T> |
Call index: 7
Events
LiquidityPools.PoolOpen
Reward pool created, user could join pool
| Field | Type | Doc |
|---|---|---|
pool_id | u32 | |
reward_asset_id | u32 | |
staked_asset_id | u32 | |
interest_rate | u32 | |
max_tokens | u128 | |
lock_start_block | u32 | |
lock_end_block | u32 |
LiquidityPools.PoolStarted
Pool starts to lock.
| Field | Type | Doc |
|---|---|---|
pool_id | u32 |
LiquidityPools.PoolRenewing
Pool starts to rollover users that want to continue to next pool.
| Field | Type | Doc |
|---|---|---|
pool_id | u32 |
LiquidityPools.PoolMatured
Pool rollover is done and ready for users to claim rewards.
| Field | Type | Doc |
|---|---|---|
pool_id | u32 |
LiquidityPools.PoolClosed
Pool closed, no more users can join.
| Field | Type | Doc |
|---|---|---|
pool_id | u32 | |
reward_asset_amount | u128 | |
staked_asset_amount | u128 | |
receiver | [u8;20] |
LiquidityPools.SetSuccession
Set pool successor, when predecessor pool is done, users will be rolled over to successor pool.
| Field | Type | Doc |
|---|---|---|
predecessor_pool_id | u32 | |
successor_pool_id | u32 |
LiquidityPools.UserInfoUpdated
User info updated, currently only rollover preference is updated.
| Field | Type | Doc |
|---|---|---|
pool_id | u32 | |
account_id | [u8;20] | |
should_rollover | bool |
LiquidityPools.UserJoined
User joined pool.
| Field | Type | Doc |
|---|---|---|
account_id | [u8;20] | |
pool_id | u32 | |
amount | u128 |
LiquidityPools.UserExited
User exited pool.
| Field | Type | Doc |
|---|---|---|
account_id | [u8;20] | |
pool_id | u32 | |
amount | u128 |
LiquidityPools.UserRolledOver
User rolled over to its successor pool.
| Field | Type | Doc |
|---|---|---|
account_id | [u8;20] | |
pool_id | u32 | |
rolled_to_pool_id | u32 | |
amount | u128 |
LiquidityPools.RewardsClaimed
Rewards claimed.
| Field | Type | Doc |
|---|---|---|
account_id | [u8;20] | |
pool_id | u32 | |
amount | u128 |
Errors
LiquidityPools.NotPoolCreator
Not pool creator
LiquidityPools.InvalidBlockRange
Invalid block range
LiquidityPools.PoolAlreadyExists
Pool already exists
LiquidityPools.PoolDoesNotExist
Pool does not exist
LiquidityPools.SuccessorPoolDoesNotExist
Successor pool does not exist
LiquidityPools.PredecessorPoolDoesNotExist
Predecessor pool does not exist
LiquidityPools.SuccessorPoolSizeShouldBeGreaterThanPredecessor
Successor pool size should be greater than predecessor
LiquidityPools.SuccessorPoolSizeShouldBeLockedAfterPredecessor
Successor pool size should be locked after predecessor
LiquidityPools.RolloverPoolsShouldBeTheSameAsset
Rollover pools should be the same asset
LiquidityPools.NoTokensStaked
Cannot exit pool, no tokens staked
LiquidityPools.PoolNotOpen
Reward pool is not open
LiquidityPools.PoolAlreadyClosed
The pool is already closed
LiquidityPools.CannotExitPool
The pool must not be active to exit
LiquidityPools.NotReadyForClaimingReward
Reward pool is not ready for reward
LiquidityPools.NoAvailablePoolId
Exceeds max pool id
LiquidityPools.StakingLimitExceeded
Staking limit exceeded
LiquidityPools.OffchainErrNotValidator
Offchain error not a validator
LiquidityPools.OffchainErrTooEarly
Offchain error too early
LiquidityPools.OffchainErrSubmitTransaction
Offchain error on submitting transaction
LiquidityPools.OffchainErrWrongTransactionSource
Offchain error wrong transaction source
LiquidityPools.PivotStringTooLong
Pivot string too long
LiquidityPools.RewardCalculationOverflow
Error calculating reward
Storage
LiquidityPools.Pools
await api.query.liquidityPools.pools(key1)- Key:
u32(hasher: Twox64Concat) - Returns:
{"id":"u32","creator":"SeedPrimitivesSignatureAccountId20","rewardAssetId":"u32","stakedAssetId":"u32","interestRate":"u32","maxTokens":"u128","lastUpdated":"u32","lockStartBlock":"u32","lockEndBlock":"u32","lockedAmount":"u128","poolStatus":"PalletLiquidityPoolsPoolStatus"}
Modifier: Optional
LiquidityPools.PoolUsers
await api.query.liquidityPools.poolUsers(key1, key2)- Key:
(u32,SeedPrimitivesSignatureAccountId20)(hashers: Twox64Concat, Twox64Concat) - Returns:
{"amount":"u128","rewardDebt":"u128","shouldRollover":"bool","rolledOver":"bool"}
Modifier: Optional
LiquidityPools.PoolRelationships
await api.query.liquidityPools.poolRelationships(key1)- Key:
u32(hasher: Twox64Concat) - Returns:
{"successorId":"Option<u32>"}
Modifier: Optional
LiquidityPools.NextPoolId
await api.query.liquidityPools.nextPoolId()Returns: u32
Modifier: Default
LiquidityPools.NextRolloverUnsignedAt
await api.query.liquidityPools.nextRolloverUnsignedAt()Returns: u32
Modifier: Default
LiquidityPools.RolloverPivot
await api.query.liquidityPools.rolloverPivot(key1)- Key:
u32(hasher: Twox64Concat) - Returns:
Bytes
Modifier: Default
LiquidityPools.ProcessedPoolPivot
await api.query.liquidityPools.processedPoolPivot()Returns: u32
Modifier: Optional
Constants
LiquidityPools.PalletId
This pallet's Id, used for deriving a sovereign account ID
Type: [u8;8]
SCALE-encoded value: 0x6c7164706f6f6c73
LiquidityPools.UnsignedInterval
Unsigned transaction interval
Type: u32
SCALE-encoded value: 0x07000000
LiquidityPools.RolloverBatchSize
Max number of users to rollover per block
Type: u32
SCALE-encoded value: 0x63000000
LiquidityPools.InterestRateBasePoint
Interest rate for 100% base point. Use the base point to calculate actual interest rate. e.g. when 10000 is base points, and interest rate is 1000 when creating pool, then the actual interest rate is 10% (1000 / 10000).
Type: u32
SCALE-encoded value: 0x40420f00
LiquidityPools.MaxPoolsPerOnIdle
Max amount of pools that can be processed in a single on_idle run.
Type: u32
SCALE-encoded value: 0x32000000
wss://root.rootnet.live/archive/ws · captured 2026-05-02