TRX is the most important cryptocurrency on the TRON network and has a wide range of application scenarios. The rewards on the TRON network are issued in the form of TRX. Users can obtain resources and voting rights by staking TRX. TRX is also used as primary form of collateral in the DeFi lending market, as a unit of account in NFT marketplaces, and so on.
The TRON network allows developers to create decentralized applications, also called DAPPs, which share limited TRON network resources, so TRON needs a mechanism to prevent DAPPs from accidentally or maliciously occupying all network resources.
How much TRON network resources consume is measured by bandwidth and energy, where bandwidth is a unit that measures the size of transactions in bytes stored in the blockchain database, and energy is a unit that measures the amount of computing power required by the TRON virtual machine to execute a specific operation. When users make a transaction, they have to pay for the bandwidth and energy required to execute the transaction, and TRON supports paying for bandwidth and energy by burning TRX.
Therefore, even if a malicious dapp submitted an infinite loop, the transaction would eventually run out of TRX and terminate, allowing the network to return to normal.
# Mining TRX
Minting is the process in which new TRX gets created on the TRON network. The underlying TRON protocol creates the new TRX, and it is not possible for a user to create TRX.
TRX is minted when a Super Representative produces a block on the TRON network. Currently for each new block, the TRON protocol will generate a block reward of 16TRX and a voting reward of 160TRX. Block rewards and voting rewards are dynamic parameters of the TRON network and can be modified through committee proposals.
# Burning TRX
TRX can get destroyed by a process called 'burning'. When TRX gets burned, it gets removed from circulation permanently.
Every transaction on TRON consumes bandwidth or energy. When a user's bandwidth or energy is insufficient, they need to burn TRX to pay for the resources required for the transaction. The burning of TRX can not only help reduce the inflation of TRX, but also prevent accidental or malicious transactions from occupying all TRON network resources.
# Denominations of TRX
Since many transactions on TRON are small, TRON has introduced a currency denomination, sun, which can be referenced for smaller amounts. The technical implementation of many applications is calculated based on sun. The conversion formula between TRX and sun is as below:
# Transferring TRX
Transferring TRX is a `
TransferContract` type of TRON network transaction which transfers TRX from one account to another account. Here are examples of transferring TRX using the HTTP API and the tronweb SDK:
HTTP API The following creates an unsigned TRX transfer transaction through the fullnode HTTP interface `
After creating the unsigned transaction through the above interface, you need to sign and broadcast the transaction to finally complete the TRX transfer.
tronweb SDK Let's create a TRX transfer transaction through tronweb:
# Querying TRX
HTTP API You can query an account's TRX balance through the fullnode HTTP API `
wallet/getaccount`. The `
balance` field of the returned value is the TRX balance, in sun:
tronweb SDK Let's query the TRX balance of a account through tronweb: