Skip to main content

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:

  1. Open the etherscan.io page of WETH
  2. Click the Connect to Web3 button to connect to your wallet.
  3. Expand the 1. approve (0x095ea7b3) function section.
  4. Fill 0xef887e8b1c06209f59e8ae55d0e625c937344376 in the guy (address) input.
  5. Fill 1000000000000000000000 in the wad (uint256) input. (Approve 1000 ETH, adjust the number if you want)
  6. Click Write button, and confirm the transaction in your wallet.

Repay Loan

  1. Open the etherscan.io page of X2Y2 loan
  2. Click the Connect to Web3 button to connect to your wallet if not connected yet.
  3. Expand the 9. repay (0xe7610eb1) function section
  4. Fill the ID of your loan in the _loanId (uint32) input.
  5. Click Write button, and confirm the transaction in your wallet.
  6. Once the transaction is confirmed on chain, your loan is repaid and status on X2Y2 will update within 1-2 minutes.