Skip to content

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].

ts
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)
ArgumentTypeDoc
reward_asset_idu32AssetId
staked_asset_idu32AssetId
interest_rateu32u32
max_tokensu128Balance
lock_start_blocku32BlockNumberFor<T>
lock_end_blocku32BlockNumberFor<T>

Call index: 0

LiquidityPools.set_pool_succession ​

See [Pallet::set_pool_succession].

ts
api.tx.liquidityPools.set_pool_succession(predecessor_pool_id: u32, successor_pool_id: u32)
ArgumentTypeDoc
predecessor_pool_idu32T::PoolId
successor_pool_idu32T::PoolId

Call index: 1

LiquidityPools.set_pool_rollover ​

See [Pallet::set_pool_rollover].

ts
api.tx.liquidityPools.set_pool_rollover(id: u32, should_rollover: bool)
ArgumentTypeDoc
idu32T::PoolId
should_rolloverboolbool

Call index: 2

LiquidityPools.close_pool ​

See [Pallet::close_pool].

ts
api.tx.liquidityPools.close_pool(id: u32)
ArgumentTypeDoc
idu32T::PoolId

Call index: 3

LiquidityPools.enter_pool ​

See [Pallet::enter_pool].

ts
api.tx.liquidityPools.enter_pool(pool_id: u32, amount: u128)
ArgumentTypeDoc
pool_idu32T::PoolId
amountu128Balance

Call index: 4

LiquidityPools.exit_pool ​

See [Pallet::exit_pool].

ts
api.tx.liquidityPools.exit_pool(id: u32)
ArgumentTypeDoc
idu32T::PoolId

Call index: 5

LiquidityPools.claim_reward ​

See [Pallet::claim_reward].

ts
api.tx.liquidityPools.claim_reward(id: u32)
ArgumentTypeDoc
idu32T::PoolId

Call index: 6

LiquidityPools.rollover_unsigned ​

See [Pallet::rollover_unsigned].

ts
api.tx.liquidityPools.rollover_unsigned(id: u32, current_block: u32)
ArgumentTypeDoc
idu32T::PoolId
current_blocku32BlockNumberFor<T>

Call index: 7

Events ​

LiquidityPools.PoolOpen ​

Reward pool created, user could join pool

FieldTypeDoc
pool_idu32
reward_asset_idu32
staked_asset_idu32
interest_rateu32
max_tokensu128
lock_start_blocku32
lock_end_blocku32

LiquidityPools.PoolStarted ​

Pool starts to lock.

FieldTypeDoc
pool_idu32

LiquidityPools.PoolRenewing ​

Pool starts to rollover users that want to continue to next pool.

FieldTypeDoc
pool_idu32

LiquidityPools.PoolMatured ​

Pool rollover is done and ready for users to claim rewards.

FieldTypeDoc
pool_idu32

LiquidityPools.PoolClosed ​

Pool closed, no more users can join.

FieldTypeDoc
pool_idu32
reward_asset_amountu128
staked_asset_amountu128
receiver[u8;20]

LiquidityPools.SetSuccession ​

Set pool successor, when predecessor pool is done, users will be rolled over to successor pool.

FieldTypeDoc
predecessor_pool_idu32
successor_pool_idu32

LiquidityPools.UserInfoUpdated ​

User info updated, currently only rollover preference is updated.

FieldTypeDoc
pool_idu32
account_id[u8;20]
should_rolloverbool

LiquidityPools.UserJoined ​

User joined pool.

FieldTypeDoc
account_id[u8;20]
pool_idu32
amountu128

LiquidityPools.UserExited ​

User exited pool.

FieldTypeDoc
account_id[u8;20]
pool_idu32
amountu128

LiquidityPools.UserRolledOver ​

User rolled over to its successor pool.

FieldTypeDoc
account_id[u8;20]
pool_idu32
rolled_to_pool_idu32
amountu128

LiquidityPools.RewardsClaimed ​

Rewards claimed.

FieldTypeDoc
account_id[u8;20]
pool_idu32
amountu128

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 ​

ts
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 ​

ts
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 ​

ts
await api.query.liquidityPools.poolRelationships(key1)
  • Key: u32 (hasher: Twox64Concat)
  • Returns: {"successorId":"Option<u32>"}

Modifier: Optional

LiquidityPools.NextPoolId ​

ts
await api.query.liquidityPools.nextPoolId()

Returns: u32

Modifier: Default

LiquidityPools.NextRolloverUnsignedAt ​

ts
await api.query.liquidityPools.nextRolloverUnsignedAt()

Returns: u32

Modifier: Default

LiquidityPools.RolloverPivot ​

ts
await api.query.liquidityPools.rolloverPivot(key1)
  • Key: u32 (hasher: Twox64Concat)
  • Returns: Bytes

Modifier: Default

LiquidityPools.ProcessedPoolPivot ​

ts
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

Source: live chain metadata from wss://root.rootnet.live/archive/ws · captured 2026-05-02

Curated independently by Codeology. Source-attributed reference for The Root Network. Not affiliated with Futureverse / TRN Labs.