> For the complete documentation index, see [llms.txt](https://nysa-finance.gitbook.io/nysa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nysa-finance.gitbook.io/nysa/architecture/smart-loans.md).

# Smart Loans

At Nysa, we believe AI can significantly enhance user experience and streamline complex financial workflows. However, we are deliberate in our AI integrations — we apply machine learning only where it delivers tangible, measurable value to our users.

This section outlines precisely how and where we leverage artificial intelligence and machine learning within the Nysa ecosystem.

### The Problem: Inadequate Risk Management

Nysa is a monolithic lending protocol that supports lending and borrowing of both cryptocurrencies and Real-World Assets (RWAs). During extensive internal testing, we observed a consistent pattern: users frequently struggle to configure appropriate risk parameters for their borrow positions. Inadequate risk assessment can lead to liquidations — and in severe cases, liquidation spirals — particularly when dealing with illiquid or volatile assets.

### The Solution: Machine Learning Optimization

To address this, we developed a proprietary machine learning model designed to balance two competing user objectives:

1. Maximizing the amount of capital available to borrow.
2. Minimizing the probability of liquidation.

By analyzing over 12 distinct features — including current market volatility, cross-asset correlations, and simulated liquidation scenarios — the model predicts the optimal borrow amount that preserves position safety while maximizing capital efficiency.

#### How to Use Smart Loans

The *Smart Loans* feature is designed to be completely frictionless:

1. Navigate to the Homepage.
2. Select your desired asset and go to Manage Position → Borrow.
3. When entering your desired borrow amount, click the Smart Borrow button.
4. The risk-adjusted optimal amount will automatically populate the input field.

<figure><img src="/files/7ifLu0wBjm9mVSgvBiuH" alt=""><figcaption></figcaption></figure>

#### Back-End Logic

The suggested amount is a real-time prediction generated by a machine learning model trained on hundreds of thousands of historical position combinations and market simulations specific to the assets listed on Nysa Finance.

The model is hosted on cloud infrastructure and accessed via API. When a user activates the Smart Borrow feature, the front end transmits an API request containing the specific parameters of the intended loan to our server, which instantly computes and returns the optimal borrow amount.
