Repay Your Loan via Contract
Incase of any issue that prevents you from repay loans on x2y2.io , you could repay directly via the loan contract. Below is a step-by-step tutorial on how to do it.
Before begin
Make sure you have obtained these information:
- The ID of your loan to pay. You can get it either via the Browser's developer tool, or ask on our Discord.
- A wallet with enough WETH to pay. (Doesn't have to be your wallet)
Approve WETH
If you have never approved WETH on the x2y2 loan contract:
- Open the etherscan.io page of WETH
- Click the
Connect to Web3
button to connect to your wallet. - Expand the
1. approve (0x095ea7b3)
function section. - Fill
0xef887e8b1c06209f59e8ae55d0e625c937344376
in theguy (address)
input. - Fill
1000000000000000000000
in thewad (uint256)
input. (Approve 1000 ETH, adjust the number if you want) - Click
Write
button, and confirm the transaction in your wallet.
Repay Loan
- Open the etherscan.io page of X2Y2 loan
- Click the
Connect to Web3
button to connect to your wallet if not connected yet. - Expand the
9. repay (0xe7610eb1)
function section - Fill the ID of your loan in the
_loanId (uint32)
input. - Click
Write
button, and confirm the transaction in your wallet. - Once the transaction is confirmed on chain, your loan is repaid and status on X2Y2 will update within 1-2 minutes.