Docs
Docs
Home
Getting Started
Agent Tooling
CLI
Supported Chains
Acala
Aptos
Arbitrum
Arc
Asset Hub
Astar
Avalanche
Base
Berachain
Bifrost
Binance Smart Chain
Bittensor
Blast
Boba Network
Bridge Hub
Celo
Centrifuge
Chiliz
Cronos
Enjin
Ethereum
Etherlink
Flow EVM Gateway
Gnosis
Hydration
Hyperliquid
Immutable
Ink
IoTeX
Kusama
Linea
LISK
Manta Atlantic
Manta Pacific
Mantle
MegaETH
Monad
Movement
Neuroweb
opBNB
Optimism
Plasma
Polkadot
Polygon
Pulsechain
Robinhood
Ronin
Scroll
Sonic
Starknet
Taiko
Tempo
Sui
TRON
Unichain
Viction
World Chain
XDC Network
XX Network
Zetachain
zkSync Era
Zora
Supported ChainsTRONTRON HTTP API

wallet/freezebalancev2 - Stake TRX for Resources

Stake TRX to obtain bandwidth or energy resources on TRON network, earn rewards, and participate in network governance via Dwellir's reliable RPC endpoint.

TRON RPC endpoint: endpoint URLs, plans and pricing.

Resource Management V2

Dwellir's TRON infrastructure supports the latest Stake 2.0 mechanism for efficient resource management. Stake TRX to get bandwidth/energy while earning rewards and voting rights.

Start staking TRX

Freeze (stake) TRX balance to obtain bandwidth or energy resources using the Stake 2.0 mechanism. Staked TRX earns rewards and provides voting power for Super Representatives.

Use Cases

wallet/freezebalancev2 is essential for:

  • Resource Acquisition - Get bandwidth for transactions
  • Energy Generation - Power smart contract interactions
  • Reward Earning - Earn staking rewards (~4-7% APR)
  • Governance Participation - Gain voting power for SRs
  • DApp Operations - Ensure smooth contract execution
JSON-RPC request
{
  "owner_address": "TRX6Q82wMqWNbCCmJPLz9mR8AZwqvUU2pN",
  "frozen_balance": 10000000000,
  "resource": "ENERGY",
  "visible": true
}

Implementation Examples

Common Use Cases

1. Auto-Staking System

JavaScript
class AutoStakingSystem {
  constructor(apiKey) {
    this.staking = new TronStakingManager(apiKey);
    this.minBalance = 1000; // Minimum TRX to keep unstaked
  }
  
  async autoStake(address, keepBalance = 1000) {
    // Get current balance
    const account = await this.getAccount(address);
    const availableTRX = (account.balance / 1_000_000) - keepBalance;
    
    if (availableTRX <= 0) {
      return { message: 'Insufficient balance for staking' };
    }
    
    // Split 30% bandwidth, 70% energy (typical DApp usage)
    const bandwidthTRX = Math.floor(availableTRX * 0.3);
    const energyTRX = Math.floor(availableTRX * 0.7);
    
    return await this.staking.stakeForResources(
      address,
      bandwidthTRX,
      energyTRX
    );
  }
}

2. Resource Optimization

JavaScript
async function optimizeResources(address) {
  const resources = await getAccountResource(address);
  
  // Check utilization
  const bandwidthUtil = resources.freeNetUsed / resources.freeNetLimit;
  const energyUtil = resources.EnergyUsed / resources.EnergyLimit;
  
  const recommendations = [];
  
  if (bandwidthUtil > 0.8) {
    recommendations.push({
      action: 'STAKE',
      resource: 'BANDWIDTH',
      reason: 'High bandwidth utilization',
      suggestedTRX: 1000
    });
  }
  
  if (energyUtil > 0.8) {
    recommendations.push({
      action: 'STAKE',
      resource: 'ENERGY',
      reason: 'High energy utilization',
      suggestedTRX: 5000
    });
  }
  
  return recommendations;
}

3. Staking Pool Management

JavaScript
class StakingPool {
  async distributeStakes(participants, totalTRX) {
    const stakes = [];
    
    for (const participant of participants) {
      const share = (participant.contribution / 100) * totalTRX;
      
      stakes.push({
        address: participant.address,
        amount: share,
        resource: participant.preferredResource || 'ENERGY'
      });
    }
    
    return this.executeStakes(stakes);
  }
}

Resource Calculation

ResourceRateUsage
Bandwidth1.6225 per staked TRX per day (3 Nov 2026)Regular transactions
Energy9.7383 per staked TRX per day (3 Nov 2026)Smart contract calls
Voting Power1 vote per TRXSR voting

Staking Recommendations by Use Case

Use CaseBandwidth (TRX)Energy (TRX)Total
Basic Wallet1000100
DeFi User5005,0005,500
DApp Developer1,00020,00021,000
Exchange10,00050,00060,000

Best Practices

  1. Keep Reserve - Always keep 50-100 TRX unstaked for fees
  2. Balance Resources - Monitor usage and adjust stakes accordingly
  3. Batch Operations - Stake for both resources in one session
  4. Monitor Rewards - Track staking rewards and compound regularly
  5. Plan Unstaking - Remember 14-day waiting period for unstaking

Notes

  • Lock Period: Staked TRX has a minimum 14-day lock period
  • Rewards: Staking rewards are distributed every 6 hours
  • Voting Power: Staked TRX provides voting power for Super Representatives
  • Resource Recovery: Bandwidth recovers 24 hours, energy recovers based on consumption

Related Methods

  • wallet/unfreezebalancev2 - Unstake TRX
  • wallet/delegateresource - Delegate resources
  • wallet/getaccountresource - Check resources

Need help? Contact support or visit our TRON documentation.

wallet/estimateenergy

Estimate energy consumption for TRON smart contract calls before execution. Optimize transaction costs and resource planning with Dwellir RPC.

wallet/unfreezebalancev2

Unstake TRX to reclaim resources (bandwidth/energy) on TRON network via Dwellir's optimized RPC endpoint with Stake 2.0 support.

On this page

Use CasesImplementation ExamplesCommon Use Cases1. Auto-Staking System2. Resource Optimization3. Staking Pool ManagementResource CalculationStaking Recommendations by Use CaseBest PracticesNotesRelated Methods