swap_rtoken_for_native_token
method. The chain will perform a series of legality checks (rToken balance, exchange rate, minimum exchange amount, etc.) according to the parameters provided by the user. If the verification is correct, the transInfo data corresponding to the transaction will be automatically generated for the user and stored on the chain. This information will be processed by the rToken-swap service.`
real exchange rate = rToken exchange rate * exchange rate
`
, the rToken exchange rate changes in real time, and the exchange rate changes with different conversion gears. Different gears correspond to different unlocking time and exchange rate. The longer the unlocking time, the higher the exchange rate. When the unlocking time gradually converges to the time required for redemption through liquidityUnbond
, the exchange rate at this time should converge to 1.`
min_out_amount = rtoken_amount * rToken exchange rate * exchange rate * (1-slippage)
`
. If the chain is processing the transaction and finds that `
real_out_amount < min_out_amount
`
, the transaction will be terminated to prevent the loss of user tokens.