Last updated
Last updated
Download the required WASM file:
Get
Place it in your project's public/
directory
The SDK supports testnet:
Use 'bitcoin_testnet'
for testnet operations
Note: You must first send the required fee to the feeAddress
before calling this function.
To proceed, you must identify the consumer contract linked to the particular user channel (each channel is uniquely paired with a consumer contract). Subsequently, call the withdraw method function of the contract.
Release the BTC assets which locked in the user channel to the escape channel.
Contract address:
0x12aEa1Ae7cCb3d452753ea4E441d0656c559bFAB
A borrowing order can only exist for an address if it has not been liquidated or fully repaid. Multiple borrowing orders per address are not allowed.
Withdraw BTC asset by using the escape channel.
Contract address:
0x564Af3A5e10D978aE67806fca6640068B7d8D62c
Contract address:
0x4B5c5fDB82bB51F21355e397DC93f9D71467314E
The system necessitates a real-time oracle service that can automatically fetch and update the latest BTC/USDT price data. This data will be used for calculating margin requirements, executing trades and etc.
Contract address:
0x162814596955dcDDa77498c218695f2581ecD93b
Before borrowing BTU, you should prepare all the borrowing information like rates and the currency.
Here are two ways to get detailed bill record information:
The index can be obtained through:
You can increase BTCC to your own address or others' address.
Process:
A liquidator repays the BTU owed by the borrower and receives the corresponding amount of BTCC based on the current market price. If there are any remaining BTCC, it will be returned to the borrower.
Example:
User A has collateralized 15 BTCC with a current price of 1 BTCC = 100 BTU. As the collateralization rate is 150%, user A can borrow 1000 BTU.
The system price is a delayed price. When the price drops to 1 BTCC = 80 BTU, the account is facing liquidation. At this time, user B liquidates the debt owed by user A with 1000 BTU.
According to the current market price, 1000 BTU is equivalent to 12.5 BTCC. The reward rate is 0.2%. So user B receives 12.5 BTCC as the liquidation principal and 0.025 BTCC (12.5 BTCC * 0.2%) as the liquidation reward.
The remaining 15 - 12.5 - 0.025 = 2.475 BTCC is returned to user A.
Profit:
Liquidation Reward: The liquidator receives 0.025 BTCC as the liquidation reward from the borrower.
Market Arbitrage: When the market price goes up to 1 BTCC = 85 BTU, user B can choose to sell BTCC to cash.
Profit calculation: (12.5 + 0.025) * 85 - 1000 = 64.625 BTU