Overview
Trust tiers determine your agent's API rate limits and reputation visibility. Higher tiers require more LABS tokens staked in the TrustVault contract. By staking LABS, you signal economic commitment to your agent's reputation, unlocking higher API throughput and expanded organizational memberships.
This guide walks through the complete staking process: wrapping LABS, approving the TrustVault, staking tokens, and verifying your new tier.
Tier Benefits
| Tier | LABS Required | API Rate | Org Memberships | Use Case |
|---|---|---|---|---|
| 0 (Unverified) | 0 | Blocked | 0 | Not usable |
| 1 (Bronze) | 1,000 | 1 rpm | Basic | Testing, personal agents |
| 2 (Silver) | 10,000 | 16 rpm | Standard | Production agents |
| 3 (Gold) | 100,000 | 166 rpm | Extended | High-traffic agents |
| 4 (Diamond) | 500,000 | 2,700 rpm | Unlimited | Enterprise agents |
Tier 1 (Bronze) is the minimum tier required to access the Verification API. Suitable for testing and low-traffic personal agents.
Tier 2 (Silver) supports production agents with moderate traffic (up to 23,000 requests per day).
Tier 3 (Gold) is designed for high-traffic production agents with frequent verification checks.
Tier 4 (Diamond) provides enterprise-grade throughput with nearly 4 million requests per day and unlimited organization memberships.
Step 1: Get LABS Tokens
LABS is the native gas token of KYA Chain. You can obtain LABS through:
- Faucets: For testnet LABS (if available).
- Exchanges: Purchase LABS on supported exchanges.
- Bridge: Bridge LABS from other chains (if bridge infrastructure is available).
Once you have LABS in your wallet, you can proceed to wrap them.
Step 2: Wrap LABS to WLABS
The TrustVault contract requires WLABS (Wrapped LABS), an ERC-20 version of the native LABS token. WLABS allows LABS to be used in smart contracts with standard ERC-20 interfaces.
WLABS Contract: 0xEd863CAd86f69D8821f678784c5a47d21626BBF7
Option A: Call deposit() with value
import { createWalletClient, http, parseEther, parseAbi } from 'viem';
import { kyaChain } from './chains'; // Custom chain config for KYA Chain
const walletClient = createWalletClient({
chain: kyaChain,
transport: http('https://rpc.kyachain.xyz'),
});
const hash = await walletClient.writeContract({
address: '0xEd863CAd86f69D8821f678784c5a47d21626BBF7',
abi: parseAbi(['function deposit() payable']),
functionName: 'deposit',
value: parseEther('1000'), // 1,000 LABS for Bronze tier
});
console.log('Transaction hash:', hash);Option B: Send LABS directly to WLABS contract
The WLABS contract has a receive() function that automatically wraps any LABS sent to it:
const hash = await walletClient.sendTransaction({
to: '0xEd863CAd86f69D8821f678784c5a47d21626BBF7',
value: parseEther('1000'), // 1,000 LABS for Bronze tier
});
console.log('Transaction hash:', hash);Both methods are equivalent. The WLABS balance is credited to your wallet immediately after the transaction confirms.
Step 3: Approve TrustVault to Spend WLABS
Before staking, you must approve the TrustVault contract to spend your WLABS tokens:
TrustVault Contract: 0xD4bAE271bCCb8bA7BF13B0B4743d62E61CCF9E0e
import { parseEther, parseAbi } from 'viem';
await walletClient.writeContract({
address: '0xEd863CAd86f69D8821f678784c5a47d21626BBF7', // WLABS
abi: parseAbi(['function approve(address spender, uint256 amount) returns (bool)']),
functionName: 'approve',
args: [
'0xD4bAE271bCCb8bA7BF13B0B4743d62E61CCF9E0e', // TrustVault
parseEther('1000'), // Amount to approve (1,000 LABS for Bronze)
],
});
console.log('Approval granted');This grants the TrustVault contract permission to transfer up to 1,000 WLABS from your wallet when you stake.
Step 4: Stake in TrustVault
Now stake your WLABS against your agent's ID:
import { parseEther, parseAbi } from 'viem';
await walletClient.writeContract({
address: '0xD4bAE271bCCb8bA7BF13B0B4743d62E61CCF9E0e', // TrustVault
abi: parseAbi(['function stake(uint256 agentId, uint256 amount)']),
functionName: 'stake',
args: [
42n, // Agent ID (your agent's NFT token ID)
parseEther('1000'), // Amount to stake (1,000 LABS for Bronze)
],
});
console.log('Staked 1,000 LABS for agent 42');The stake is recorded immediately. Your agent's trust tier updates as soon as the transaction confirms.
Step 5: Verify Your Tier
Check your agent's trust tier by calling getTrustTier() on the TrustVault contract:
import { createPublicClient, http, parseAbi } from 'viem';
import { kyaChain } from './chains';
const publicClient = createPublicClient({
chain: kyaChain,
transport: http('https://rpc.kyachain.xyz'),
});
const tier = await publicClient.readContract({
address: '0xD4bAE271bCCb8bA7BF13B0B4743d62E61CCF9E0e', // TrustVault
abi: parseAbi(['function getTrustTier(uint256 agentId) view returns (uint8)']),
functionName: 'getTrustTier',
args: [42n],
});
console.log('Trust Tier:', tier); // 1 for Bronze (1,000 LABS staked)Expected output:
- Tier 1 (Bronze) if you staked 1,000-9,999 LABS
- Tier 2 (Silver) if you staked 10,000-99,999 LABS
- Tier 3 (Gold) if you staked 100,000-499,999 LABS
- Tier 4 (Diamond) if you staked 500,000+ LABS
You can also verify your tier via the Verification API by calling /verify for your agent. The response includes the current trust tier.
Unstaking
If you want to reduce your stake or withdraw LABS, use the unstaking mechanism. Unstaking has a 5-minute cooldown period to prevent rapid tier changes.
Begin Unstaking
Call unstake() to move tokens from your active stake to cooldown:
await walletClient.writeContract({
address: '0xD4bAE271bCCb8bA7BF13B0B4743d62E61CCF9E0e', // TrustVault
abi: parseAbi(['function unstake(uint256 agentId, uint256 amount)']),
functionName: 'unstake',
args: [
42n, // Agent ID
parseEther('500'), // Amount to unstake (500 LABS)
],
});
console.log('Unstaking initiated. Cooldown ends in 5 minutes.');Unstaking reduces your trust tier immediately. API rate limits will decrease as soon as the unstake transaction confirms. The cooldown period only delays withdrawal, not tier reduction.
Withdraw After Cooldown
After the 5-minute cooldown expires, call withdraw() to receive your LABS:
await walletClient.writeContract({
address: '0xD4bAE271bCCb8bA7BF13B0B4743d62E61CCF9E0e', // TrustVault
abi: parseAbi(['function withdraw(uint256 agentId)']),
functionName: 'withdraw',
args: [42n],
});
console.log('LABS withdrawn to your wallet');The TrustVault automatically unwraps WLABS to native LABS during withdrawal. You don't need to manually call WLABS.withdraw(). The native LABS are sent directly to your wallet.
Checking Your Stake
To view your current stake details, call getStake():
const stake = await publicClient.readContract({
address: '0xD4bAE271bCCb8bA7BF13B0B4743d62E61CCF9E0e', // TrustVault
abi: parseAbi([
'function getStake(uint256 agentId) view returns (uint256 amount, uint256 cooldownAmount, uint256 cooldownEndTime)',
]),
functionName: 'getStake',
args: [42n],
});
console.log('Active stake:', stake[0]);
console.log('Cooldown amount:', stake[1]);
console.log('Cooldown ends:', new Date(Number(stake[2]) * 1000));Return values:
amount: Currently staked LABS (determines your tier).cooldownAmount: LABS in cooldown (not yet withdrawable).cooldownEndTime: Unix timestamp when cooldown expires (0 if no cooldown active).
Summary
To upgrade your trust tier:
- Get LABS tokens (faucet, exchange, or bridge).
- Wrap to WLABS (send LABS to WLABS contract or call
deposit()). - Approve TrustVault to spend WLABS.
- Stake WLABS against your agent ID.
- Verify your tier via
getTrustTier()or the Verification API.
To downgrade or withdraw:
- Unstake (begins 5-minute cooldown, tier drops immediately).
- Wait 5 minutes for cooldown to expire.
- Withdraw (auto-unwraps to native LABS).
Your trust tier directly affects your API rate limits. See the Rate Limiting page for exact limits per tier.