# How to Find Out Unstake Fee

### LBTC

<https://etherscan.io/address/0x8236a87084f8b84306f72007f36f2618a5634494#readProxyContract>

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2FE8QoH5TFXs8EilG3l93K%2F01-lbtc-read-as-proxy.png?alt=media\&token=fd228633-1239-4f44-849a-373d210de809)

Unstake fee calculation depends on what is destination if unstake operation:

* BTC -> unstake fee is a sum of "redeem fee" and "to native commission"
* BTC.b -> unstake fee equals to "redeem fee"

Below is information about how to get both "redeem fee" and "to native commission":

**Function:** 12. getRedeemFee (0xc6d98f1a) **Returns:** amount of LBTC to be taken as redeem fee

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2F3LMBBJNqEeAjvFKbZGcB%2F02-lbtc-getRedeemFee.png?alt=media\&token=5bcf4a21-8bc5-4389-9fbc-d12ce916e118)

**Function:** 28. toNativeCommission (0xb743ab4f) **Returns:** amount of LBTC to be taken as "to native commission"

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2FC6Hisiu7GzBouTpW6uMm%2F03-lbtc-toNativeCommission.png?alt=media\&token=8498298d-900f-456d-9db2-dd6fa61d0a4f)

Also there is a function that tells what is the mi amount (after paying fee) that can be redeemed

**Function:** 13. getRedeemForBtcMinAmount (0x1beda7e3) **Returns:** amount of LBTC to be taken as redeem fee

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2F5Xyddz6M6qPDUBblGiRb%2F04-lbtc-getRedeemForBtcMinAmount.png?alt=media\&token=1271ffff-d148-4941-9897-9bdb026f9b41)

***

### BTC.b

<https://etherscan.io/address/0xB0F70C0bD6FD87dbEb7C10dC692a2a6106817072#readProxyContract>

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2FbnkrgQqeBvx5ZzuA3Mmr%2F05-btcb-read-as-proxy.png?alt=media\&token=0d6eb227-24e3-4ec6-ba08-1a6b96e1ee0a)

Unstake fee is calculation: unstake fee is a sum of "redeem fee" and "to native commission"

Below is information about how to get both "redeem fee" and "to native commission":

**Function:** 20. getRedeemFee (0xc6d98f1a) **Returns:** amount of LBTC to be taken as redeem fee

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2FFyVl8WdSsvL9jZbuADX3%2F06-btcb-getRedeemFee.png?alt=media\&token=72099e0d-a517-4b5b-a624-0d367b5f4e9d)

**Function:** 35. toNativeCommission (0xb743ab4f) **Returns:** amount of LBTC to be taken as "to native commission"

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2F1lasIoRpaQ6JoF8Sf9dv%2F07-btcb-toNativeCommission.png?alt=media\&token=fbd76299-b3d5-4399-a3a1-bd72f3ab55d0)

Also there is a function that tells what is the mi amount (after paying fee) that can be redeemed

**Function:** 21. getRedeemForBtcMinAmount (0x1beda7e3) **Returns:** amount of LBTC to be taken as redeem fee

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2FJ3kyyV1izAdKlpQN76X8%2F08-btcb-getRedeemForBtcMinAmount.png?alt=media\&token=69dd93a4-6bd7-4272-93b4-ee8f01d69821)

***

### AssetRouter

In general absolutely the same information can be collected from AssetRouter contract:

<https://etherscan.io/address/0x9ece5fb1ab62d9075c4ec814b321e24d8ea021ac#readProxyContract>

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2FCudUtTqNOskssU0xEF0r%2F09-assetrouter-read-as-proxy.png?alt=media\&token=95edc469-20f4-4626-a2fc-7bfcb00fde42)

**Function:** 24. toNativeCommission (0x5698732f) **Returns:** amount of LBTC to be taken as "to native commission"

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2FHW8HIxF85xKwCvTUok01%2F10-assetrouter-toNativeCommission.png?alt=media\&token=611d42ae-1a1f-46af-814c-e13acd433959)

**Function:** 25. tokenConfig (0xfe136c4e) **Returns:** basic configuration for selected token, redeem fee, minimal redeemForBTC amount and redeem enabled flag

![](https://1161095600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl7wTwC5uXA2Yk5tvZMBg%2Fuploads%2F3Em8ntBBLwaak7qNAvxh%2F11-assetrouter-tokenConfig.png?alt=media\&token=1ce21949-4ecf-48f0-9a68-91c49cd6f632)
