Arkis
  • Overview
    • Introduction
    • Arkis Overview
  • Concepts
    • Liquidity Pool
    • Interest Rate Model (IRM)
    • Lender
    • Asset Manager
    • Margin Account
    • Whitelisted Assets
    • Collateral Asset
    • Margin Trading
    • Overcollateralized Loan
    • Undercollateralized Loan
    • Stress-Tested Value
    • Risk Factor
    • Margin Engine
    • Liquidation
    • Margin Call
    • Vault
    • Credit Manager
    • arkisUSD
  • Quickstart
    • Sign Up
  • Arkis Portal
  • Protocol Mechanics
    • Arkis Protocol
      • How it Works
      • Liquidation
    • Arkis Risk Management
      • Introduction
      • Margin Engine v1
      • CEX-DEX Portfolio Margin v2
  • For Lenders
    • Lending
    • Monitoring Lending Position
  • Video Tutorial
  • For Borrowers
    • What can I do with Arkis?
    • Borrowing Overview
    • Working with Margin Account
    • Loan Repayment
    • CEX-DEX Portfolio Margin
    • Examples of Trades [WIP]
      • Pendle Margin Trading
      • CEX-DEX Delta-Neutral Trade [WIP]
      • Overcollateralised Loan [WIP]
      • Non-EVM Asset as Collateral [WIP]
    • Non-EVM Assets as Collateral
    • Whitelisted assets, protocols, and actions
  • Video Tutorials
    • Lending on Arkis
  • Pendle Margin Trading
  • Troubleshooting
    • Margin Account and Wallet Connect
    • Closing Margin Account
  • Prime Brokerage 101
    • Why prime brokerage?
    • What is portfolio margin?
  • FAQs
    • General FAQ
    • Glossary
  • Security
    • December 2023 Audit
    • December 2025 Audit
  • Important Links
    • Use Cases
    • GitHub
  • Brand Assets [WIP]
  • Connect With Us
    • LinkedIn
    • Telegram
    • X
    • Blog
    • Website
Powered by GitBook
On this page
  • Pre-Repayment Checklist
  • Navigate to the Margin Account page
  • Closing Your Margin Account = Repaying the Debt
  • What happens when the Margin Account is closed? Is the loan is repaid?
  1. For Borrowers

Loan Repayment

PreviousWorking with Margin AccountNextCEX-DEX Portfolio Margin

Last updated 12 days ago

When you are ready to settle your debt and release your collateral, you “close” the Margin Account.

Closing is a single onchain transaction that (1) repays the borrowed amount plus all accrued interest to the Liquidity Pool and (2) returns every remaining asset in the Margin Account back to your wallet.

As each Margin Account is associated with a loan it has taken from the Liquidity Pool, "Repaying the Loan" means "closing Margin Account".

Pre-Repayment Checklist

Requirement
Why it matters

Debt + Accrued Interest in the account

The Margin Account must already hold the exact borrowed asset (e.g., USDC, USDT, wETH) in a quantity covering Total Debt + Accrued Interest.

Healthy gas balance in your signing wallet

You will need ETH for gas to sign the close-account transaction.

No pending trades in your WalletConnect session

Pending swaps can change balances; complete or cancel them before closing.

If the Margin Account balance is short of the required debt amount, the Proceed button in the Portal remains disabled.

Navigate to the Margin Account page

Within "Borrow" -> "Opened", choose the Margin Account you want to close and click on it.

By clicking on a specific Margin Account, a user is navigated to a dedicated page for interacting with that Margin Account.

Closing Your Margin Account = Repaying the Debt

Below the Trade with Wallet Connect button, you can find "Close Credit Account," which refers to repaying the loan and closing the Margin Account.

To repay the loan (close Margin Account), the Margin Account address must have the borrowed amount of the asset plus accrued interest.

By clicking "Close Credit Account" an Asset Manager is navigated to the page to initiate the process of the Margin Account loan repayment.

However, if the Margin Account does not contain enough borrowed asset tokens and accrued interest (also in borrowed asset tokens), the Proceed button will be disabled.

Proceed is disabled until Margin Account contains enough of Total Debt

There are two ways how an Asset Manager can get Debt + Accrued interest to the Margin Account:

  1. Direct deposit to the Margin Account address the necessary amount of tokens (48.81413 USDT in this example). - The Arkis team recommends this option as the fastest and easiest to implement.

  2. Sell, exit from available positions on the Margin Account, and swap them to the necessary amount of Total Debt.

Once the Margin Account has the necessary amount of borrowed tokens, the Proceed button will become active.

What happens when the Margin Account is closed? Is the loan is repaid?

Once an Asset Manager signs the transaction to close the Margin Account, the protocol does the following:

  1. Analyses the amount of borrowed assets (Total Debt + Accrued Interest) to be sent into the liquidity pool. Please note that the protocol will only take the total debt plus the interest amount. Any surplus will be returned to the wallet of the Asset Manager who originated the loan.

  2. All other whitelisted assets (tokens, PT, LP positions) within the Margin Account will be transferred back to the Asset Manager's wallet.

As you can see, when Margin Account is closed, the protocol takes only what Margin Account owes to the Liquidity Pool, the rest is returned to Asset Manager's wallet.

If an Asset Manager wants to liquidate Margin Account portfolio themselves (using other protocols, or some specific techniques) or don't want to exit positions at all to close the loan - they only need to send borrowed amount + interest to the Margin Account address and they will get everything else back to their own wallet once Close Margin Account procedure is successfull.

Proceed is disabled until Margin Account contains enough of Total Debt
Choose the Margin Account you want to close
Margin Account page