Comment on page
In TeleSwap, users can leverage the Teleportation functionality to instantly move BTC from Bitcoin to Polygon. To utilize this feature, users need to lock collateral on the Polygon network. Upon doing so, they can promptly obtain a loan in the form of teleBTC. Once their BTC is successfully transferred to Polygon, the repayment of the loan is automatically processed. From the users' perspective, these two steps occur simultaneously, ensuring a seamless and efficient transfer experience.
To initiate an instant cross-chain transfer, a user submits an instant loan request to the TeleSwap contract, specifying the desired loan amount and the recipient's address. The contract verifies if the user has sufficient collateral locked to cover the loan amount. If the user has already locked an adequate amount of collateral, the contract grants the requested teleBTC from the instant pool and registers the user's loan request.
The user is given a specific timeframe to repay the instant loan. To do so, the user sends BTC along with a repayment request on the Bitcoin network. Once the request is finalized on Bitcoin, a Teleporter submits the request on the Polygon network. The smart contract validates the inclusion of the request on Bitcoin and proceeds to mint teleBTC tokens from the instant pool. These minted teleBTC tokens are then used to repay the user's loan.
If the user fails to repay the loan within the specified timeframe, a slasher triggers the smart contract to penalize the user. The contract initiates a process where the user's collateral is slashed and exchanged for teleBTC. The teleBTC obtained from this exchange is sent back to the instant pool. A portion of the remaining collateral is awarded to the slasher as a reward, while the remaining portion is returned to the user who has been penalized.