What you can do
| stake-trx | Stake TRX for sTRX | call sTRX.deposit() with TRX as call value; sTRX is credited to the caller |
| request-unstake | Start unstaking sTRX to TRX | sTRX.withdraw(sTRXAmount) or sTRX.withdrawExact(trxAmountInSun); the TRX unlocks after the 14-day unfreezing period |
| claim-unstaked-trx | Receive TRX from finished unfreezing rounds | read claimable(); if it is above zero, call claim() or claimAll() |
| check-position | Read the TRX value of a position | viewBalanceOfUnderlying(address) gives the TRX value; exchangeRate() gives the current rate |
Unstaking takes 14 days. TRX from a withdrawal is claimable only after its unfreezing round finishes.
The sTRX rate depends on staking rewards, Energy rental revenue and governance voting. Rewards can fall, so the value can drop relative to TRX.
sTRX is a proxy. Its implementation can be changed by the issuer.
Claiming before the round ends does nothing. Check claimable() first.
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).sTRX (StakedTRX proxy)staking on tronTU3kjFuhtEo42tsCBtfYUAZxoqQ4yuSLQ5
write deposit()
Stake TRX. Send TRX as call value. Returns the sTRX minted at the current exchange rate.
write withdraw(uint256)
Burn an sTRX amount (in minimum units) and queue the TRX for the 14-day unfreezing period. No approval needed. Returns the sTRX burned. Claim the TRX later with claim or claimAll.
write withdrawExact(uint256)
Queue an exact TRX amount in sun for the unfreezing period. Burns the matching sTRX and returns the amount burned.
write claim()
Claim TRX from the earliest finished unfreezing round. Check claimable() first; the call does nothing if it is zero. Returns the TRX claimed.
write claimAll()
Claim TRX from all finished unfreezing rounds. Check claimable() first. Returns the TRX claimed.
read claimable()
TRX claimable now from finished unfreezing rounds.
read exchangeRate()
TRX per sTRX, scaled by 1e18. Rises as rewards accrue.
read totalUnderlying()
Total TRX managed by the contract, in sun.
read viewBalanceOfUnderlying(address)
TRX value of an address's sTRX balance, in sun.
read round()
Current unfreezing round number. Starts at 1.