Skip to main content

Fees

Fees in TrexWallet are charges applied to transactions to cover operational costs, incentivize network validators, or generate platform revenue. The fee system is fully configurable through the tariff grid.

Fee Components

Every transaction fee consists of up to three components:

ComponentSourceExample
Percent feeConfigured in tariff0.5% of 1000 USDT = 5.00 USDT
Fixed feeConfigured in tariffFlat 1.00 USDT per transaction
Network feeDynamic from blockchainEthereum gas: ~0.001 ETH

Total fee = amount × percent_fee + fixed_fee + network_fee

Network Fees

Network fees are dynamic — they reflect the current cost of broadcasting a transaction on the blockchain. TrexWallet's blockchain scanners continuously monitor network conditions and update fee estimates.

  • Ethereum/ERC-20: Gas price × gas limit (varies with network congestion)
  • Tron/TRC-20: Energy/bandwidth fees (generally lower than Ethereum)
  • Bitcoin: Fee per byte (depends on mempool size)
  • TON: Fixed low fees

Network fees are only charged when the UseNetFee flag is set in the matching tariff.

Commission Wallets

Collected fees are directed to designated system wallets:

WalletPurpose
Commission Wallet (-104)General commission collection
Commission Exchange (-102)Exchange operation fees
Commission Swap (-101)Swap operation fees
Commission Withdrawal (-103)Withdrawal fees

Fee Calculation Flow

sequenceDiagram
participant User
participant TrexWallet
participant Tariff Engine
participant Blockchain

User->>TrexWallet: Initiate transaction
TrexWallet->>Tariff Engine: Find matching tariff (multi-dimensional)
Tariff Engine-->>TrexWallet: Tariff found (percent, fixed, flags)
alt UseNetFee flag set
TrexWallet->>Blockchain: Get current network fee
Blockchain-->>TrexWallet: Network fee estimate
end
TrexWallet-->>User: Show total fee preview
User->>TrexWallet: Confirm
TrexWallet->>TrexWallet: Deduct fee + execute

Fee Preview API

Check the exact fee before executing a transaction:

GET /trex/v1/estimate_fee
?tx_type=Outcome
&currency=USDT
&amount=500
&network_from=2

Response (strings to preserve precision):

{
"result": {
"fee": "3.50",
"percentFee": "0.005",
"fixedFee": "1.00",
"minAmount": "10.00",
"maxAmount": "100000.00",
"tag": "Standard Withdrawal"
},
"error": null
}

The endpoint uses the same tariff matcher as production. For exchange/swap requests add to_currency. For payment-order estimates pass app_id and network_to (the terminal id) so the per-merchant / per-terminal tariff wins.

When Fees Are Applied

OperationFee TimingFee Type
Internal transferAt executionUsually free (percent=0, fixed=0)
WithdrawalAt confirmationPercent + fixed + network
Exchange orderAt matchingPercent per side
SwapAt executionPercent on pair
Payment orderAt completionPercent + fixed (merchant tariff)
Investment yieldAt distributionPercent (management fee)

Special Scenarios

Exchange Operations

Exchange uses two tariffs — one for each side of the trade. A BTC/USDT exchange applies the BTC tariff to the seller and the USDT tariff to the buyer.

Payment Spread

For payment gateway operations, an additional payment_spread can be configured per currency. This FX markup is applied on top of the exchange rate for cross-currency operations and always favors the platform:

  • Incoming payment orders: rate = mid × (1 + payment_spread) on the payment currency — the buyer pays a bit more.
  • Outgoing transfer orders (payouts): rate = mid × (1 − payment_spread) on the terminal currency — the recipient receives a bit less (or, when the payout amount is fixed, the merchant is debited a bit more).

The same per-currency coefficient is reused for both directions; payment_spread = 0 means the mid-rate with no markup.

Zero Fees

Tariffs with zero percent and zero fixed fee are valid. Internal transfers are typically configured this way. Zero-fee transactions are logged for audit purposes.