# Introducing

Welcome to PrimeFi, the omnichain lending and borrowing DeFi protocol.

Created with your assets in mind, PrimeFi is the omnichain platform that streamlines borrowing and lending with the most competitive terms in DeFi. Powered by LayerZero, your assets move natively across chains — no bridges, no extra risk.

Prime Numbers Labs has launched PrimeFi, the first omnichain lending and borrowing protocol on Hyperliquid EVM, and operates additional markets on Base and XDC.

### Why PrimeFi?

| Advantage                   | What it means for you                                                                                                                                           |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **True Omnichain**          | Operates natively on Base, HyperEVM and XDC, with more chains coming soon.                                                                                      |
| **Deposit ≠ Loan**          | Use your collateral where you hold it and receive liquidity where you need it.                                                                                  |
| **Proven Security**         | Audited smart contracts and LayerZero architecture provide secure cross-chain messaging.                                                                        |
| **PRFI Rewards**            | Earn $PRFI tokens by providing liquidity, participating in liquidations, or holding NFTs from the PrimeFi collection.                                           |
| **PRFI NFT Staking**        | Stake $PRFI inside NFTs on Base to earn a share of a monthly reward pool, weighted by rarity and level. See [PRFI NFTs](/rewards-and-tokens/prfi-staking-nfts). |
| **Prime Numbers Ecosystem** | Direct synergies with PrimeStaking and PrimePort that multiply returns.                                                                                         |

### Two protocol versions in the app

Inside the PrimeFi app you'll see a **v2 / v3** toggle in the header:

* **v2 — PrimeFi** (Base, HyperEVM, XDC). The full omnichain lending experience with pLP boosts, PRFI emissions and cross-chain borrows. Most of this documentation describes v2.
* **v3 — Fathom Lending (XDC only).** A third-party Aave v3 fork **operated by Fathom Protocol**, surfaced inside the PrimeFi UI as a convenience. PrimeFi does not operate these contracts — for help with Fathom positions, see the [Fathom Lending documentation](https://docs.fathom.fi/lending/deployments/xdc-network).

See the [Fathom v3 (XDC)](/v3-markets/fathom-v3) page for the full explanation of the v3 toggle.


# What's new

Recent additions and improvements to the PrimeFi app.

A roundup of the latest user-facing changes in the PrimeFi app.

### psXDC markets on Base and HyperEVM

**psXDC** — PrimeStaking's liquid-staking XDC token — can now be supplied and borrowed on the **Base** and **HyperEVM** v2 markets, in addition to XDC. psXDC moves between chains natively as a LayerZero OFT, so you can bridge it from XDC and use it as collateral (20% LTV) where you need liquidity. See [PrimeStakedXDC (psXDC)](/product/liquid-staking-tokens/primestakedxdc-psxdc) for details and addresses.

### XRP money markets (testnet)

PrimeFi now has **XRP lending markets live on testnet** — Flare Coston2 and the XRPL EVM testnet — accessible from the app's **v3** toggle. Supply XRP (as FXRP on Flare, or native XRP on XRPL EVM) and borrow against it. See [XRP Testnet Markets](/v3-markets/xrp-testnet-markets) and [Testnet Faucets](/v3-markets/testnet-faucets).

### Self-serve testnet faucet

The XRP market screens now include a **Get test tokens** button. Connect, switch to the market's chain, and mint any reserve (or **Mint all**) in a click — each freshly minted token is offered to your wallet so it shows up right away. Details in [Testnet Faucets](/v3-markets/testnet-faucets).

### Live on-chain reward APRs

Reward APRs on the v3 markets (e.g. **rFLR** on Flare Coston2) are now read **live from on-chain** incentive data, so the numbers in the markets table and asset pages reflect actual emission rates rather than estimates.

### Single-signature "Claim All" for PRFI NFTs

On the PRFI NFT staking screen, **Claim All** now batches every claimable NFT into a **single transaction** (via the Multicall3 aggregator) instead of one wallet prompt per NFT. Claimable amounts are also shown accurately.

### Personalized pLP emissions view

The pLP **Boost & Locks** tab now shows:

* a personalized **"Your PRFI / day"** column in the per-market emissions table, based on your actual position, and
* a **"Rewards earned to date"** lifetime card summarizing your cumulative PRFI.

These build on the corrected single-global-budget emissions model — see [Maximum APR by asset](/product/prime-liquidity-provider-plp/maximum-apr-by-asset) and the [Boost & Locks tab](/product/prime-liquidity-provider-plp/boost).

### Network-first onboarding

New users get a **network-first market chooser**: pick a network, and the app switches (and adds) the chain for you. The XRP testnet markets are surfaced by default during the testnet phase, and v3-specific surfaces are explained inline.


# PrimeFi Features


# Key Features of PrimeFi

### PrimeFi: Key Feature Summary

<table><thead><tr><th>Area</th><th width="468">Description</th></tr></thead><tbody><tr><td><strong>Omnichain lending (LayerZero)</strong></td><td>Liquidity supplied on one EVM network can be borrowed against on another. Cross-chain messages are sent through LayerZero; no wrapped assets or third-party bridges are involved.</td></tr><tr><td><strong>PRFI as an OFT</strong></td><td>PRFI follows LayerZero’s <em>Omnichain Fungible Token</em> standard. A single canonical supply is tracked while tokens move natively between chains via Stargate-LayerZero.</td></tr><tr><td><strong>NFT collateral &#x26; marketplace</strong> (post-mainnet launch)</td><td>Selected NFT collections, will be pledged as collateral. Floor-price or oracle valuations set loan-to-value limits, and an internal market handles trading or collateral liquidation.</td></tr><tr><td><strong>Over-collateralised risk model</strong></td><td>Every position must maintain <strong>Health Factor ≥ 1</strong>. Oracle price feeds and interest-index updates recalculate HF on each transaction; the UI surfaces warnings before liquidation thresholds are reached.</td></tr><tr><td><strong>Security controls</strong></td><td>Core money-market code inherits audited Aave v2 contracts. New modules (cross-chain messaging, incentives, NFT logic) undergo independent audits and are covered by a live Immunefi bug-bounty programme. Upgrades use UUPS proxies with timelocks and an emergency pause guardian.</td></tr><tr><td><strong>Documentation &#x26; community tooling</strong></td><td>Self-service resources include step-by-step courses, an AI documentation assistant, and a public forum for support and governance discussions.</td></tr><tr><td><strong>Omnichain gas deposit (for incentives sync)</strong></td><td>Users on non-Base networks pre-deposit a small gas reserve into the protocol. This reserve funds cross-chain message relays, ensuring that sidechain actions (deposits, borrows, repayments, transfers) are reflected on the Base mainchain incentives controller. Rewards remain globally consistent across all supported chains.</td></tr></tbody></table>

{% hint style="warning" %}
The integration of NFTs will occur after the main features of the protocol are launched on the Mainnet.
{% endhint %}


# Omnichain Lending & Borrowing

PrimeFi lets you **open a borrow on one network** and **receive the borrowed asset on another**, without manual bridging.\
Under the hood, PrimeFi uses **LayerZero messaging** and **Stargate liquidity**:

* **Accounting stays on the origin chain** (your collateral, debt, interest accrual, health factor, and potential liquidation live there).
* **Delivery happens on the destination chain** (the asset you borrow is sent to your wallet on the target network via **Stargate**).

This design removes cross-chain friction while keeping a **single, consistent risk model** (prices, LTVs, liquidations) anchored to the origin chain.

***

### Key properties

* **One position, many networks**: supply collateral on chain **A**, receive the loan on chain **B**.
* **Origin-anchored risk**: health factor, interest, and liquidation live on the **origin chain** where you opened the position.
* **Bridging handled for you**: the borrowed asset is **bridged by Stargate** to the destination chain, no manual bridge or wallet hop needed.
* **Unified pricing**: Chainlink price feeds drive LTV and HF on the **origin chain**.
* **Omnichain incentives**: actions from any network are synchronized to Base (PrimeFi’s incentives home chain) so rewards remain consistent.

***

### Repay on the origin network

* **Repay on origin**: send USDC on HyperEVM and call `repay()`.

Interest and HF always update on the **origin**.

***

### Liquidations

If your **health factor falls below 1**, a liquidator acts on the **origin chain**:

* Seizure and close-out occur **only on the origin** against your posted collateral.
* The physical location of the borrowed asset (e.g., Base) is irrelevant to liquidation logic.

This keeps the risk model **simple and predictable**.

***

### Fees & gas

* **Protocol fees/interest**: accrue on the **origin chain**.
* **Cross-chain fees**: the borrow transaction includes **LayerZero** and **Stargate** fees (quoted pre-trade).
* **Omnichain Gas Deposit**: used for **incentive synchronization** when you act on non-Base networks (not required to execute the borrow itself).
* **Claims**: lender rewards are claimable weekly from any network; **pLP claims after vesting execute on Base** and need a small amount of **ETH on Base**.

***

### Safeguards & parameters

* **Slippage protection**: `minAmountOut` and `deadline` guard the Stargate leg on delivery.
* **Idempotency & retries**: cross-chain messages are **nonce-tracked** and **retryable** if a destination step temporarily fails.
* **Rate limits & caps**: per-asset **daily borrow caps** and **per-route limits** can be enforced.
* **Pause per market**: individual assets/paths can be paused if volatility or oracle anomalies are detected.
* **Oracles**: Chainlink price feeds secure LTV and HF on the **origin**.

***

### What changes versus a classic bridge?

* You **do not** manually bridge assets or manage two legs.
* Borrow is **one action** on the origin; PrimeFi handles **delivery**.
* Risk, rates, and liquidation remain **coherent and local** to the origin chain.


# End-to-end workflow

(example)

#### Scenario

You have **ETH collateral on HyperEVM** and want to **borrow USDC on Base**.

#### What you do (single flow)

1. In PrimeFi (still on **HyperEVM**), choose:
   * **Borrow asset**: USDC
   * **Destination chain**: Base
   * **Amount**: e.g., 5,000 USDC
   * Optional safety params: **minAmountOut**, **slippage bps**, **deadline**
2. Confirm the transaction on **HyperEVM**.\
   The UI quotes **interest + LayerZero/Stargate fees** before you sign.

#### What happens on-chain

1. **Origin checks (HyperEVM)**
   * LendingPool validates your **health factor**, LTV and caps.
   * Your **variable debt** is minted on HyperEVM for the borrowed amount.
2. **Cross-chain messaging**
   * PrimeFi’s **Borrow OApp** sends a LayerZero message with borrow details.
   * In parallel, a **Stargate** instruction moves 5,000 USDC liquidity to **Base**.
3. **Destination delivery (Base)**
   * Stargate **delivers 5,000 USDC** to your wallet on Base.
   * Your **collateral and debt remain on HyperEVM**.

Result: you now **hold USDC on Base** while your **debt accrues on HyperEVM** against your ETH collateral.

> Tip: You don’t need to switch networks during the borrow. PrimeFi handles the bridge leg via Stargate.


# Innovations in Lending and Borrowing

**Innovations in Lending and Borrowing**:

* PrimeFi is committed to cutting-edge technology. In this way, and through innovation to solve the existing problem of intercommunication between networks, we have adopted LayerZero technology:

1. This technology allows you to deposit an asset on one network and borrow another asset on a different network without any risk. All from within our protocol.
2. PRFI, as an OFT token, enables seamless bridging across all integrated networks on PrimeFi through our interface, without any bridge risk, thanks to Stargate-LayerZero technology.

* PrimeFi stands out for integrating NFTs into the lending and borrowing framework. This unique feature and an NFT marketplace allow for novel lending and borrowing opportunities involving NFTs.

{% hint style="warning" %}
The integration of NFTs will take place after the main features of the protocol are launched on Mainnet.
{% endhint %}


# Rewards distribution and NFT Integration

* A distinctive aspect of PrimeFi is the 40% of the borrowing fee distribution is offered to PRFI token holders who stake their tokens with Prime Numbers NFTs.
* This integration of lending and borrowing with NFTs, coupled with the platform's comprehensive approach to yield optimization and asset management, underscores PrimeFi's commitment to innovation and versatility in the rapidly evolving DeFi ecosystem.

{% hint style="info" %}
The origin of the fees shared with NFT holders does not compromise the benefits of lenders or pLP providers since these fees come from the company income.
{% endhint %}

<figure><img src="/files/b5PkbsIWZYMafac6yp8C" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
The integration of NFTs will occur after the main features of the protocol are launched on the Mainnet.
{% endhint %}


# Oracles

PrimeFi leverages decentralized oracle networks to ensure that price data is **secure, reliable, and tamper-resistant**. In most chains, **DataStreams** deliver continuous updates with low latency, while **DataFeeds** provide historical precision and compatibility. For key ecosystem tokens (e.g. PRFI, HYPE), we employ **DataLink**, which offers a dedicated oracle channel.

On **XDC**, all price data is sourced via **eOracles / ePRICE feeds**, which integrate with the AggregatorV3Interface. [EO Docs](https://docs.eo.app/docs/eprice/feeds-addresses/price-feed-addresses/xdc-network)

***

### Comparative Overview by Network & Assets

#### 1. Base Network

| Asset | Oracle Type           | Notes                                                          |
| ----- | --------------------- | -------------------------------------------------------------- |
| cbBTC | DataStream / DataFeed | Flexible usage depending on latency or historical requirements |
| USDC  | DataStream / DataFeed | Continuous feed or fallback feed as needed                     |
| ETH   | DataStream / DataFeed | Redundancy through feed fallback                               |
| PRFI  | DataLink              | Dedicated channel for PRFI-USD                                 |
| psXDC | DataStream (XDC/USD)  | Priced at the XDC/USD Data Stream (1 psXDC ≈ 1 XDC)            |

#### 2. HyperEVM

| Asset | Oracle Type           | Notes                                               |
| ----- | --------------------- | --------------------------------------------------- |
| HYPE  | DataLink              | Specialized oracle for HYPE-USD                     |
| UETH  | DataStream / DataFeed | Similar logic to ETH                                |
| PRFI  | DataLink              | Consistent with Base network usage                  |
| USDT0 | DataStream / DataFeed | Stream first, feed as fallback                      |
| UBTC  | DataStream / DataFeed | Equivalent to cbBTC in HyperEVM                     |
| psXDC | DataStream (XDC/USD)  | Priced at the XDC/USD Data Stream (1 psXDC ≈ 1 XDC) |

#### 3. XDC Network

*All oracles on XDC use **eOracles / ePRICE feeds**.*

| Asset | Oracle Type           | Notes                                 |
| ----- | --------------------- | ------------------------------------- |
| XDC   | eOracle / ePRICE Feed | Price via eOracles                    |
| psXDC | eOracle / ePRICE Feed | Synthetic / pegged derivative on XDC  |
| USDC  | eOracle / ePRICE Feed | Stablecoin feed via eOracle           |
| USDT0 | eOracle / ePRICE Feed | ePRICE feed for USDT0                 |
| PRFI  | eOracle / ePRICE Feed | Treated as standard asset feed in XDC |

***

### Technical Rationale

* **DataStreams** → Ideal for low-latency continuous updates (real-time trading).
* **DataFeeds** → Offer dependable historical data and broad compatibility.
* **DataLink** → Reserved for strategic tokens needing dedicated oracle infrastructure.
* **eOracles / ePRICE feeds (XDC only)** → Provide on-chain price feeds in the XDC ecosystem, integrated via AggregatorV3Interface. [EO Docs](https://docs.eo.app/docs/eprice/feeds-addresses/price-feed-addresses/xdc-network)

By combining these methods appropriately per network and asset, PrimeFi ensures the optimal balance of **performance, reliability, and accuracy**.


# Omnichain Gas Deposit Mechanism for Incentives Synchronization

#### Abstract

Incentive distribution across multiple blockchains requires a unified accounting system. To address this, PrimeFi introduces an **Omnichain Gas Deposit Mechanism** that allows users to seamlessly synchronize their activity on sidechains (e.g., HyperEVM) with the **Mainchain Incentives Controller** (e.g., Base). This design ensures that all user actions, such as deposits, borrows, transfers, and repayments, are consistently reflected in the global rewards calculation, independent of the originating chain.

#### Motivation

As DeFi ecosystems become increasingly multichain, sidechains and rollups provide scalability and cost efficiency, yet incentive programs must remain **globally coherent**. Without cross-chain aggregation, rewards distribution risks becoming fragmented, undermining fairness and efficiency. Our mechanism addresses this gap by enabling users to prefund the cost of cross-chain execution through a dedicated gas deposit, ensuring reliable and timely synchronization of incentive, related activity.

#### System Overview

1. **User Action on Sidechain**
   * A user performs an action (deposit, borrow, transfer, repay) on the Sidechain Incentives Controller (e.g., HyperEVM).
   * This action must be registered on the Mainchain Incentives Controller (e.g., Base) to update the global rewards ledger.
2. **Gas Deposit for Omnichain Execution**
   * The user deposits a small amount of gas into the protocol.
   * This reserve is dedicated to omnichain message delivery, guaranteeing that sidechain actions can be transmitted and executed on the mainchain.
3. **Omnichain Message Relay**
   * The protocol packages the user’s action into a cross-chain message.
   * Using the deposited gas, the message is relayed from the sidechain to the mainchain.
   * The Mainchain Incentives Controller executes the mirrored action, updating the global rewards state.
4. **Global Rewards Consistency**
   * Regardless of the originating chain, the mainchain maintains the **single source of truth** for rewards.
   * Users benefit from a unified and fair incentive program across all supported networks.

#### Key Benefits

* **User-Friendly Participation:** Users only need to deposit gas once; the protocol automates the complexity of cross-chain execution.
* **Fair Rewards Distribution:** All user actions, regardless of chain, are accounted for in the global rewards ledger.
* **Scalability:** High-volume activity occurs on sidechains, while the mainchain preserves a consolidated and lightweight reward state.
* **Security:** By centralizing reward accounting on the mainchain, the system prevents inconsistencies or double-counting across chains.

#### Example Flow

* Alice deposits a small amount of gas into the omnichain mechanism.
* She provides liquidity on HyperEVM.
* The protocol relays her deposit action to the Mainchain Incentives Controller on Base.
* The mainchain updates Alice’s rewards balance in the global ledger.
* Alice’s contribution is now recognized in parity with users across all supported chains.

#### Conclusion

The **Omnichain Gas Deposit Mechanism** is a cornerstone of PrimeFi’s multichain architecture. It ensures that user actions on sidechains are faithfully represented in the global rewards system, combining the **scalability of sidechains** with the **consistency of a mainchain-based incentive model**.


# Lend

### Lending Workflow

All procedures can be carried out from the **Dashboard**. Screens and labels may vary slightly between networks, but the underlying logic remains the same.

***

#### 1. Supplying Assets

| Step | Action                                                                                                              |
| ---- | ------------------------------------------------------------------------------------------------------------------- |
| 1    | Navigate to Markets or Dashboard.                                                                                   |
| 2    | Click **Deposit** next to the asset you want to deposit.                                                            |
| 3    | <p>Enter the amount.</p><p>• The projected APY and current utilisation are shown for reference.</p>                 |
| 4    | Confirm the on-chain transaction in your wallet.                                                                    |
| 5    | After the transaction is final, the asset appears in the **Supplied** list and starts earning interest immediately. |

***

#### 2. Borrowing

PrimeFi utilizes LayerZero messaging, allowing the asset you borrow to reside **on a different network** from your collateral.

<table><thead><tr><th>Parameter</th><th width="402">Details</th></tr></thead><tbody><tr><td><strong>Collateral</strong></td><td>Only assets marked <em>Collateral enabled</em> can be used to borrow. Collateral factors (LTV, liquidation threshold) are shown in the asset tooltip.</td></tr><tr><td><strong>Borrowable amount</strong></td><td>Calculated from your collateral value, current debt, and per-asset LTV. The UI displays a real-time <strong>Health Factor (HF);</strong> keep HF > 1 to avoid liquidation.</td></tr><tr><td><strong>Rate mode</strong></td><td><p>• <strong>Variable</strong> (default) – interest updates with pool utilisation.</p><p>• <strong>Stable</strong> – fixed at borrow time. You may switch modes later; the change applies to the whole position for that asset.</p></td></tr><tr><td><strong>Cross-chain withdrawal</strong></td><td>Select a target network in the borrow dialog. The loan principal is bridged automatically via LayerZero; no manual bridge or wrapper is required.</td></tr></tbody></table>

***

#### 3. Withdrawing or Unlocking Liquidity

| Situation                           | Action                                                                                                                                                                                                                |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Withdraw underlying**             | In **Dashboard → Withdraw**, choose the asset and amount, then confirm the transaction. The protocol checks HF; if withdrawal would push HF ≤ 1, it is blocked.                                                       |
| **Use pTokens without withdrawing** | Your supplied balance is represented by **pTokens** (e.g. `pUSDC`). You can transfer or use these tokens in other DeFi protocols as collateral or liquidity, while the deposit continues to earn interest on PrimeFi. |
| **Insufficient pool liquidity**     | A withdrawal fails if the pool’s available liquidity is lower than the requested amount. Wait for new supplies or borrower repayments, then retry. The UI shows current liquidity in real time.                       |

***

#### 4. Monitoring & Maintenance

| Tool                  | Purpose                                                                                                                  |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Health Factor bar** | Turns yellow when HF < 1.1, red at HF ≤ 1.0.                                                                             |
| **Rate switch**       | In the **Borrowed** list, click the rate badge to toggle between Stable and Variable (subject to asset policy).          |
| **Repay**             | Partial or full repayment reduces debt and raises HF. Setting the amount to *Max* repays the entire outstanding balance. |

***

#### Notes

* **Cross-chain delays:** Borrowing to another network finalizes after LayerZero confirmation; this typically takes seconds but may vary depending on the network load.
* **Liquidation buffer:** Maintain HF well above 1 to account for price volatility and accrued interest, especially when using volatile collateral.


# How to Deposit?

In the **Markets** tab, under the **Stats Overview** section, you’ll find the **Base Network Assets** section. Here, you can select an asset from your preference and start interacting with it.

Let’s say you’ve chosen USDC. The initial setup will display the option to deposit.

Enter the amount of USDC you want to deposit and press **Deposit USDC**.

<figure><img src="/files/TlG0gOWJimKNKBmDShWc" alt=""><figcaption></figcaption></figure>

Next, you’ll see a prompt that says **“Approve”**. If you haven’t used this protocol before, you’ll need to approve the token, granting the protocol permission to manage this asset within your wallet. Click **“Approve”,** this is a simple signing transaction.

Now, wait for the approval to complete. Once it’s done, press **“Confirm Deposit”** and accept the subsequent transaction to deposit your USDC into the protocol. In return, you’ll receive an p\_Token\_ that tracks the interest you earn as a *lender*.

<figure><img src="/files/JLXN6Aqqb4SGfvufYZSG" alt=""><figcaption></figcaption></figure>


# Collateral

After depositing an asset, you can choose whether to use it as collateral. Collateralizing an asset activates your borrowing power, but it also makes the asset available for partial liquidation if your account becomes insolvent.

You can enable collateralization on the asset details page or through the Dashboard (shown below).

<div data-full-width="true"><figure><img src="/files/RinwGXHnSwaRzbliqS7M" alt=""><figcaption></figcaption></figure></div>

By default, all deposits are enabled as collateral. However, you can opt out for individual assets in the "Deposits" section of the Dashboard.

{% hint style="info" %}
To exclude an asset from being used as collateral, simply toggle the "Collateral" button next to the asset and confirm the transaction.
{% endhint %}

<figure><img src="/files/RKGbzkIHWl9X6sS8lgTL" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Please be cautious if you decide to withdraw assets as collateral. Market volatility can lead to liquidation risks.
{% endhint %}


# pTokens

### pTokens: Interest-Bearing Deposit Tokens

**pTokens** (interest-bearing tokens) are minted when users **deposit assets** into the protocol.\
They act both as deposit receipts and as yield-accruing instruments.

* **Primary function:** represent the user’s share of the liquidity pool.
* **Interest accrual:** the value of each pToken increases relative to its underlying asset as the pool generates yield.
* **Example:** when depositing USDC, the user receives `pUSDC`. These tokens can later be redeemed for the original deposit plus accrued interest.
* **User role:** pTokens serve as the user’s “proof of deposit” and guarantee the right to reclaim funds with interest.

👉 In short: **pTokens represent the creditor (lender) side of the protocol.**

| Topic                 | Detail                                                                                                                                                                                                                                                                                                                                                                                                                        |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Symbol format**     | `p<ASSET>`, e.g. `pWETH`, `pUSDC`                                                                                                                                                                                                                                                                                                                                                                                             |
| **Lifecycle**         | <p>• <strong>Minted</strong> when you supply the underlying asset.</p><p>• <strong>Burned</strong> when you withdraw or when your collateral is liquidated.</p>                                                                                                                                                                                                                                                               |
| **Valuation**         | <p>pTokens maintain a 1:1 peg to the underlying asset at all times. Each pToken can always be redeemed for exactly 1 unit of the underlying (e.g., 1 pUSDC = 1 USDC).</p><p>As yield accrues, <strong>your pToken balance increases automatically over time,</strong> no action required. This means the protocol <em>rebases</em> your balance to reflect accumulated interest rather than changing the value per token.</p> |
| **Interest accrual**  | PrimeFi tracks interest using an internal liquidity index for each reserve. When the index increases due to earned yield, the protocol **rebases pToken balances upward proportionally** across all holders’ wallets.                                                                                                                                                                                                         |
| **Wallet visibility** | pTokens are standard ERC-20 tokens and appear in most wallets; you may need to add the contract address manually.                                                                                                                                                                                                                                                                                                             |
| **Redeeming**         | Navigate to **Dashboard → Deposits → Withdraw** to convert pTokens back to the original asset. The protocol burns the pTokens and transfers the corresponding underlying amount.                                                                                                                                                                                                                                              |


# Contract Addresses

## Base Mainnet – pTokens

#### Interest-Bearing pTokens

| Symbol | Address                                    |
| ------ | ------------------------------------------ |
| pUSDC  | 0xB9a14B24C6E669D24E76dab65f7c4dc52f68741C |
| pWETH  | 0x2a50Be4Df06202A239384e828D6e67F9F2fA954e |
| pcbBTC | 0x1fF5E0037B478547715a4CE337d9fcFF86A30401 |
| pPRFI  | 0x834695A5d33967f8cC27E6d15684c0aA36cA4375 |
| ppsXDC | 0x3A577f9789FC81C2Ea0B81B9e02B6Dbc67158A37 |

***

## HyperEVM – pTokens

#### Interest-Bearing pTokens

| Symbol | Address                                    |
| ------ | ------------------------------------------ |
| pUSDC  | 0x386f40C2A8485d6572Cb74a736A0763c0521095B |
| pUSD₮0 | 0x5Fc1737115eCB6850be0A4F0CE25B7F98231cAB9 |
| pWHYPE | 0xCF4642EF89683D0299B59738b1Cc3AC0177348Ba |
| pUETH  | 0x6E811Aa146F961c918d14BE9Ed9C0Cd68F447a6e |
| pUBTC  | 0x98b7056E0e0521b7bA32F4Ac8af8e1249789d2d6 |
| pPRFI  | 0x07CB5Aa0c467Df9b3A38dF3fBfd465c454905690 |
| ppsXDC | 0x1952dD6d79A7ab0419321e0669B1BdF4dF1490E5 |

## XDC Network– pTokens

#### Interest-Bearing pTokens

| Symbol | Address                                    |
| ------ | ------------------------------------------ |
| pUSDC  | 0xB9a14B24C6E669D24E76dab65f7c4dc52f68741C |
| pUSDT  | 0x2a50Be4Df06202A239384e828D6e67F9F2fA954e |
| pWXDC  | 0x1fF5E0037B478547715a4CE337d9fcFF86A30401 |
| ppsXDC | 0x3Bd0183584185F8341B83dDefD73E6Eae1a64eeF |
| pPRFI  | 0x3A577f9789FC81C2Ea0B81B9e02B6Dbc67158A37 |


# Withdraw

This functionality is the reverse of making a deposit. To use it, follow the same process but through the section labelled **“Withdraw”**.

<div data-full-width="true"><figure><img src="/files/uoKukol2QiAhHePrHIeJ" alt=""><figcaption></figcaption></figure></div>

Select the desired amount and submit the transaction.

Ensure there is sufficient available liquidity in the protocol to complete the withdrawal. If not, you’ll need to wait for more liquidity to be provided by depositors or for borrowers to repay their loans before you can withdraw the desired amount.

You can withdraw your collateralized assets as long as:

* The assets are not currently being used to secure any active loans.
* The withdrawal does not trigger a liquidation of your loans.

The platform will always notify you if any of your actions jeopardize your Health Factor. It is not possible to withdraw deposits if doing so would negatively impact your Health Factor due to your loans.

<figure><img src="/files/EJXgi0bkEmJS9haSy00I" alt="" width="303"><figcaption></figcaption></figure>


# Borrow


# How to Borrow

Maximize the potential of your capital

To leverage borrowing, an asset must be pledged as collateral. This function allows you to borrow any of the assets available in the protocol.

After securing collateral, navigate to the Markets section to assess borrowing availability and yields.

Select the specific asset you intend to borrow. Access the Reserve Status & Configuration screen and click on the borrow option.

<figure><img src="/files/4jpTsAGBc17Xy5y1l9B9" alt=""><figcaption></figcaption></figure>

In the provided illustration, 27.43 ETH is available for borrowing (calculated from the deposited collateral) against the supported assets.

Specify the desired borrowing amount based on your available collateral balance, and proceed to confirm the transaction. It's important to note that the extent of your borrowing has a proportional impact on your overall Health Factor \[details elaborated below].

<figure><img src="/files/3CFaYQHANnRQqKAa7ZpK" alt=""><figcaption></figcaption></figure>

Whenever you borrow, it’s important to understand the risks associated with your collateral and market volatility. On our Dashboard, you will find information about your positions and Health Factor status.

Additionally, be aware that borrowing incurs interest (APY) on the borrowed asset.


# Borrowing Eligibility

The maximum borrowing limit is determined by the collateral value deposited and the available liquidity for the asset. If there is insufficient liquidity or if your Health Factor is too low, borrowing the asset may not be possible.

<figure><img src="/files/BwsiNE5NcKj1BbyObkTL" alt=""><figcaption></figcaption></figure>

The Loan-to-Value (LTV) ratio signifies the highest borrowing capacity of specific collateral. To illustrate, if a collateral like USDC has a maximum LTV of 80%, the user can borrow up to $0.80 worth of DAI in the principal currency for every $1 of USDT in collateral. This data is accessible on the Markets page for each asset.


# Health Factor

Safeguarding Your Investments from Liquidation

The Health Factor acts as a numerical measure of the security of your deposited assets in relation to your borrowed assets and their inherent value. A higher Health Factor indicates greater protection of your funds from potential liquidation.

<figure><img src="/files/tQmg3yr5n29p5QunWKJX" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Should the Health Factor fall to 1 or below, it triggers a liquidation event. In such a scenario, up to 50% of your outstanding borrowing is repaid, and the collateral, along with a liquidation fee, is used to cover this repayment. The amount liquidated from your debt is then considered settled.
{% endhint %}

<figure><img src="/files/EJXgi0bkEmJS9haSy00I" alt="" width="303"><figcaption></figcaption></figure>

This factor is influenced by the liquidation threshold of your collateral in comparison to the value of your borrowed assets.

**Fluctuations in Health Factor** The Health Factor can fluctuate based on changes in the market value of your deposited assets.

Take, for instance, a situation where BTC is your collateral for a USDC loan. If the market value of BTC falls, the value of your collateral diminishes correspondingly. This decline in collateral value adversely affects your Health Factor, heightening the risk of your assets being liquidated.

Maintaining a robust Health Factor benefits your portfolio in two distinct ways:

1. It reduces the likelihood of liquidation, especially when using volatile assets as collateral, aligning with a low-risk investment strategy.
2. It enhances your capacity to borrow, allowing you to leverage more collateral, which is a strategy that entails higher risk.


# Loan Repayment

The repayment period for loans is indefinite as long as the position remains secure. Nevertheless, fees associated with the loan accumulate over time, diminishing the Health Factor (unless addressed by the user), which could potentially lead to liquidation.

Repayment of loans must be made using the same asset that was borrowed. For instance, if 1 Ethereum was borrowed, repayment requires 1 ETH along with accrued fees to settle the loan.

To initiate loan repayment, navigate to the Dashboard and, scroll down until find the Borrows section, click on "Repay" for the desired asset.

<figure><img src="/files/XdhBOytnhZEGtd1ual96" alt=""><figcaption></figcaption></figure>

This action will prompt the display of a "Repay" section specific to the chosen asset. Within this section, you can review details such as your borrowed amount, wallet balance, and Health Factor. Choose the repayment amount for the loan and click "Continue" to confirm the transaction.

<figure><img src="/files/xjuJIWiHP2e4Yo8zInDT" alt=""><figcaption></figcaption></figure>


# Liquidations

Liquidation is a procedure triggered when a borrower's Health Factor falls to 1 or below, as their collateral value fails to adequately cover their loan or debt value. This scenario may arise from a decline in the value of the collateralized asset or an increase in the borrowed debt.

<figure><img src="/files/0C7d6rnqRY9sNlqExhTK" alt=""><figcaption></figcaption></figure>

To mitigate the risk of liquidation, you can either repay outstanding loans or deposit additional collateral to increase your Health Factor.

## Liquidators

Liquidators are adept DeFi users who employ automated systems, such as bots, to monitor collateralized positions. These bots interact with the protocol's L2Pool contract and initiate a liquidationCall().

This process allows liquidators to pay off a portion of the debt and receive discounted collateral as a liquidation bonus.

The incentive structure encourages third parties to participate in maintaining the protocol's health, ensuring that borrows across the protocol maintain sufficient collateralization.

## In a liquidation scenario

* Bob deposits 10 ETH and borrows 5 ETH worth of DAI
* If Bob’s Health Factor drops below 1, his loan will be eligible for liquidation
* A liquidator can liquidate up to 50% of a single borrowed amount (in this case, 2.5 ETH worth of DAI)
* In return, the liquidator can claim a single collateral, which is ETH, at a 7.5% bonus
* The liquidator claims 2.5 + 0.1875 ETH for repaying Bob's bad debt (2.5 ETH worth of DAI)
* 0.1875 ETH is claimed by the protocol at a 7.5% bonus (15% total penalty)
* After liquidation, Bob has 7.125 ETH (10-2.5-0.1875-0.1875 ETH) of supplied ETH collateral and 2.5 ETH worth of DAI borrowed.

## Liquidation Penalty & Risk Parameters

The total liquidation penalty is 15%, with half (7.5%) allocated as a bonus to liquidators and the other half directed to the PrimeFi Treasury. This allocation allows the company to fund new initiatives without the need to sell PRFI tokens on the open market.

Each asset within PrimeFi has specific risk-related values that influence its supply and borrowing dynamics.

<figure><img src="/files/hc3drzIiZvuXeeb43wVa" alt=""><figcaption></figcaption></figure>


# Flash Loans

Available on Mainnet

Flash loans allow a user to borrow any liquid asset in the PrimeFi pools without posting collateral, as long as the loan is opened and fully repaid within the same blockchain transaction (i.e., within one block).\
If the repayment plus a small fee does not arrive before the transaction ends, the entire operation is automatically cancelled and the chain reverts to its previous state, so the pool remains intact and depositors stay protected.

**Why Flash Loans Exist**

* **Arbitrage:** Momentarily source large liquidity to buy an asset where it is under-priced and sell where it is over-priced.
* **Collateral Swaps / Debt Restructuring:** Replace volatile collateral with a stable asset, or migrate a loan between protocols, without needing upfront capital.
* **Automated Liquidations:** Bots can cover an under-collateralised position, seize its collateral at a discount, repay the flash loan, and keep the difference, helping the protocol stay solvent.

**Operating Principles**

1. **Atomicity** – Borrow, use the funds, and repay (amount + fee) all happen in a single, indivisible transaction.
2. **No Counterparty Risk** – Because the transaction reverts if repayment fails, the pool never carries outstanding debt.
3. **Fee Structure** – A predefined premium (e.g., 0.05 %) is added to the repayment; the fee is shared between liquidity providers and the protocol treasury.
4. **Liquidity Cap** – The maximum that can be borrowed equals the pool’s unused liquidity at that moment, ensuring ordinary lenders and borrowers are never starved of funds.

**Risk & Mitigations**

| Potential Concern           | Safeguard                                                                                            |
| --------------------------- | ---------------------------------------------------------------------------------------------------- |
| **Pool Drain**              | Loans are bounded by the pool’s real-time free liquidity.                                            |
| **Smart-contract exploits** | The underlying flash-loan logic is inherited from Aave v2, which has been extensively audited.       |
| **Market manipulation**     | The single-block window gives no time to influence oracle prices or markets before repayment is due. |
| **Fee manipulation**        | Premiums are configurable only by authorised governance and are displayed to users up-front.         |

Flash loans are a specialised tool intended for developers and sophisticated users who can author smart-contract logic and understand the atomicity requirement. They add capital efficiency and arbitrage-driven price alignment to the PrimeFi ecosystem without compromising lender safety.


# Interest Rate Model

Managing liquidity risk through PrimeFi's borrow interest rate model

## Interest Rates (APY) & Utilization

PrimeFi's interest rate algorithm is finely tuned to address liquidity risk and enhance utilization. Borrow interest rates are determined based on the utilization rate, denoted as U.

U serves as an indicator of the capital availability within the pool. The interest rate model effectively handles liquidity risk in the protocol by aligning user incentives to bolster liquidity:

* During periods of ample capital availability, the model promotes low-interest rates to incentivize borrowing.
* In times of capital scarcity, higher interest rates are encouraged to stimulate debt repayments and foster additional capital supply.

## Interest Rate Model

Liquidity risk becomes pronounced as utilization reaches higher levels, particularly when U approaches 100%. To cater to this constraint, the interest rate curve is bifurcated around an optimal utilization rate, denoted as U\_optimal. Prior to U\_optimal, the slope is gradual, while beyond it, the slope increases steeply.

The interest rate Rₜ follows the model:

$$
\text{if } U \leq U\_{\text{optimal}} : \quad R\_t = R\_0 + \frac{U\_t}{U\_{\text{optimal}}} R\_{\text{slope1}}
$$

$$
\text{if } U > U\_{\text{optimal}} : \quad R\_t = R\_0 + R\_{\text{slope1}} + \frac{U\_t - U\_{\text{optimal}}}{1 - U\_{\text{optimal}}} R\_{\text{slope2}}
$$

Given that these elements of the PrimeFi smart contracts draw inspiration from Aave, kindly consult their documentation for the computation of Annual Percentage Yield (APY):

[Link to Aave documentation on APY calculations](https://aave.com/docs/concepts/reserves#interest-rates)


# vdTokens

### Variable Debt vdTokens

**vdTokens** (variable debt tokens) are minted when users **borrow assets** from the protocol.\
They track the user’s debt balance, including both principal and accrued variable interest.

* **Primary function:** represent the outstanding amount owed by the user to the protocol.
* **Interest accrual:** the vdToken balance increases dynamically as variable interest is applied to the borrowed amount.
* **Example:** when borrowing USDC, the user receives `vdUSDC`. The balance of these tokens grows until the loan is repaid.
* **User role:** vdTokens serve as the user’s “proof of debt” and must be repaid to close the borrowing position.

👉 In short: **vdTokens represent the debtor (borrower) side of the protocol.**

| Topic             | Detail                                                                                                                                                               |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Symbol format     | vd, e.g. vdWETH, vdUSDC                                                                                                                                              |
| Lifecycle         | <p>• Minted when you borrow the underlying asset.<br>• Burned when you repay the loan (partially or fully).</p>                                                      |
| Valuation         | Maintains a 1:1 peg to the borrowed asset. Your vdToken balance increases over time as variable interest accrues.                                                    |
| Interest accrual  | Each reserve has a variable debt index. When the index increases, your vdToken balance scales up proportionally, no user action required.                            |
| Wallet visibility | vdTokens are standard ERC-20 tokens and can appear in most wallets; you may need to add the contract address manually.                                               |
| Repayment         | Navigate to **Dashboard → Borrowings → Repay** to reduce or close your debt. The protocol burns the vdTokens and decreases the outstanding loan balance accordingly. |


# Contract Addresses

## Base Mainnet – vdTokens

#### Variable Debt vdTokens

| Symbol  | Address                                    |
| ------- | ------------------------------------------ |
| vdUSDC  | 0xDBEd51F298901987651FaF1dAed8Bb575942d406 |
| vdWETH  | 0xaaE0D3C0b4aa454cEb5b5346ba1E95a86395D656 |
| vdcbBTC | 0xC12bdD620A54149Df6B73Fad9726d387402a9066 |
| vdPRFI  | 0x47C4d740016411Bb8f5c9D9bDb3f866c9b46e0A4 |
| vdpsXDC | 0xD9bA32E8a4955E4fbbbDD61F121b2f81ca7bBFE8 |

***

## HyperEVM – vdTokens

#### Variable Debt vdTokens

| Symbol  | Address                                    |
| ------- | ------------------------------------------ |
| vdUSDC  | 0x009A18797c9C7eB06811D4cDc44881F3C5fA748a |
| vdUSD₮0 | 0xd00fe535B82F215989178609286610fe666E5365 |
| vdWHYPE | 0x9601C465c3c404465d968a2dda10FD807f2B2d5C |
| vdUETH  | 0x71f719166c403aC15F55567BABdd19b7dA1E8817 |
| vdUBTC  | 0xD218a5F74aF42d9b1a879e2349e751DEaFe3114C |
| vdPRFI  | 0x182CFb49ad159F8C770ef7ad9Ff56F3E61b9A9fa |
| vdpsXDC | 0x11f7467591b3E9e7B4d97e0827dCAaE51e46d373 |

## XDC Network – vdTokens

#### Variable Debt vdTokens

| Symbol      | Address                                      |
| ----------- | -------------------------------------------- |
| **vdUSDC**  | `0xDBEd51F298901987651FaF1dAed8Bb575942d406` |
| **vdUSDT**  | `0xaaE0D3C0b4aa454cEb5b5346ba1E95a86395D656` |
| **vdWXDC**  | `0xC12bdD620A54149Df6B73Fad9726d387402a9066` |
| **vdPRFI**  | `0xD9bA32E8a4955E4fbbbDD61F121b2f81ca7bBFE8` |
| **vdpsXDC** | `0xb2FdB307cdf1cf3c6bd8b1f35E180755c24c122f` |


# Prime Liquidity Provider (pLP)

PrimeFi's eligibility and incentive engine — lock pLP to unlock PRFI emissions and earn protocol fees.

**Prime Liquidity Provider (pLP)** is PrimeFi's mechanism for aligning long-term participants with the protocol. Lock pLP tokens (PRFI paired with the chain's base asset — ETH, HYPE, or XDC) to:

* Activate **PRFI emissions** on your money-market deposits and borrows.
* Receive a share of **protocol revenue** (borrowing interest, liquidation premiums, flash-loan fees).
* Stack a duration **multiplier** (up to 25x) on both of the above.

### The pLP page in the app

`/plp` is organised into four tabs. Each maps to one of the user-facing surfaces of the pLP system:

| Tab                                                              | What you do there                                                                                   |
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [Boost](/product/prime-liquidity-provider-plp/boost)             | See your eligibility gap, Flik into pLP, simulate emissions, decide how much pLP to lock.           |
| [Locks](/product/prime-liquidity-provider-plp/boost/locks)       | Create / view / relock your pLP locks, toggle auto-relock, monitor your average multiplier.         |
| [Vesting](/product/prime-liquidity-provider-plp/rewards/vesting) | Manage the 90-day vesting of earned PRFI emissions, exit early, or Flik vesting PRFI back into pLP. |
| [Rewards](/product/prime-liquidity-provider-plp/rewards)         | Claim platform fees, review your activity log, enable auto-compound.                                |

{% hint style="info" %}
The `/manage-prime` URL from earlier versions of the app now permanently redirects to `/plp`. All Manage PrimeFi functionality lives inside the four pLP tabs above.
{% endhint %}

### Concepts

* [pLP Overview](/product/prime-liquidity-provider-plp/plp-overview) — what pLP is and why locking it is the eligibility check
* [Maximum APR by asset](/product/prime-liquidity-provider-plp/maximum-apr-by-asset)
* [pLP Pools](/product/prime-liquidity-provider-plp/plp-pools)
* [Sustaining Eligibility Status](/product/prime-liquidity-provider-plp/sustaining-eligibility-status)
* [Bounty for Disqualification](/product/prime-liquidity-provider-plp/bounty-for-disqualification)

### Ways of building a pLP position

* [Manual Positions](/product/prime-liquidity-provider-plp/ways-of-building-the-position/manual) — bring your own LP tokens (Uniswap / PrjX / HyperSwap)
* [Flik Positions](/product/prime-liquidity-provider-plp/ways-of-building-the-position/flik) — atomic borrow-and-lock from inside the app


# pLP Overview

### Prime Liquidity Provider (pLP) <a href="#id-42a6" id="id-42a6"></a>

* **What is it?**

Liquidity pools are fundamental to many DeFi protocols, enabling users to contribute liquidity in the form of paired assets (such as PRFI & HYPE) in exchange for a share of the pool’s potential yield. pLP tokens can be locked through the protocol to activate PRFI emissions in the money market, and receive protocol revenue.

#### How it works?

Example 1: Depositing $100,000 USDT without any locked pLP tokens earns you the basic APY but doesn't qualify for additional PRFI emissions.

Example 2: Deposit $10,000 USDT and lock $500 in pLP tokens to meet the 5% threshold, making you eligible for PRFI emissions.

The requirement to lock liquidity tokens in pLP form benefits the PrimeFi money market in several ways:

1. Long-Term Participation: Locking pLP tokens commits users to a specific period, increasing the likelihood of them maintaining their deposited collateral.
2. PRFI Emissions Activation: This commitment enables PRFI emissions, rewarding those invested in the protocol's long-term vision.
3. Attracting New Users: These dynamics enhance the PrimeFi money market's appeal to potential liquidity providers, fostering growth and development.

This strategic cycle not only sustains long-term liquidity but also attracts new inflows, creating a mutually beneficial scenario for individual users and the protocol as a whole.

<figure><img src="/files/6wPEQpLEEN1NFgB71T7a" alt=""><figcaption></figcaption></figure>

Below, you can see **natural market rates** highlighted in red, and **PRFI emissions** directly underneath, in blue/purple. Users that simply deposit but don't add value to the protocol will continue to earn natural market rates, but will not be eligible for PRFI emissions.

<figure><img src="/files/vcyagClqgAXbucx1GJ7a" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In order to initiate PRFI emissions for both deposits and loans, you must lock a minimum of 5% of your deposit's USD value in pLP tokens.
{% endhint %}


# Boost & Locks tab

Activate PRFI emissions on your deposits and borrows by locking pLP.

The **Boost & Locks** tab is the entry point to the pLP system. It shows the gap between your current locked pLP value and the **5% threshold** required to start earning PRFI emissions on your deposits and borrows in the markets, and it is where you create, view and manage your locks.

{% hint style="info" %}
The pLP page is organised into **two** tabs: **Boost & Locks** (this page — eligibility, the emissions table, and lock management/calendar) and **Rewards & Vesting** (claiming platform fees, PRFI vesting, and protocol stats). Earlier versions of the app split these into four separate tabs.
{% endhint %}

### What you see on this tab

* **Boost progress bar** — how close you are to qualifying for emissions on your current open positions.
* **Required pLP** — the USD value of pLP you still need to lock to reach 5% of your collateral.
* **Flik into pLP** — one-click action that takes some of your supplied collateral, pairs it with PRFI, and locks the resulting pLP for you.
* **Emissions table** — each market's slice of the single global PRFI budget, broken down per asset, plus a personalized **Your PRFI / day** column when an eligible wallet is connected. See [Maximum APR by asset → Per-market PRFI emissions](/product/prime-liquidity-provider-plp/maximum-apr-by-asset) for exactly how these numbers are derived.
* **Your locks & lock-expiry calendar** — every active lock, its multiplier and unlock date, with relock / withdraw and auto-relock controls.

### Eligibility model

To activate PRFI emissions for both deposits and loans, you must lock a minimum of **5% of your deposit's USD value in pLP tokens** on the relevant chain.

{% hint style="info" %}
PRFI emissions on the lending markets are streamed by the `ChefIncentivesController` contract. Emissions are only active on chains where the chef is currently funded — at the moment that's primarily **Base**. The Boost tab will show an explicit "Emissions inactive" banner on chains where the chef isn't streaming, so the eligibility check doesn't silently look broken.
{% endhint %}

For the full pLP eligibility model and how it composes with multipliers, see:

* [pLP Overview](/product/prime-liquidity-provider-plp/plp-overview)
* [Sustaining Eligibility Status](/product/prime-liquidity-provider-plp/sustaining-eligibility-status)
* [Bounty for Disqualification](/product/prime-liquidity-provider-plp/bounty-for-disqualification)

### Building your pLP position

Two ways to get pLP and qualify:

1. **Flik into pLP** — borrow the paired asset (HYPE / ETH / XDC) atomically against your deposit and lock the resulting pLP. See [Flik Positions](/product/prime-liquidity-provider-plp/ways-of-building-the-position/flik).
2. **Manual** — generate pLP on Uniswap / HyperSwap / PrjX yourself and lock it. See [Manual Positions](/product/prime-liquidity-provider-plp/ways-of-building-the-position/manual).


# Locks

Lock pLP, manage active locks, relock or rely on auto-relock.

Lock management is where you actively manage your pLP locks: create new locks, monitor active ones, relock expired positions, and toggle auto-relock.

{% hint style="info" %}
In the current app, lock management lives inside the [**Boost & Locks tab**](/product/prime-liquidity-provider-plp/boost) (it is no longer a separate top-level tab). The mechanics below are unchanged.
{% endhint %}

### Top stats

| Stat                   | What it means                                                                                                   |
| ---------------------- | --------------------------------------------------------------------------------------------------------------- |
| **Locked pLP**         | Total pLP currently locked under your address on the active chain.                                              |
| **Average multiplier** | Weighted average of the multipliers of your individual locks (1x to 25x depending on lock duration).            |
| **Daily PRFI**         | Your projected daily PRFI emissions, given your current locked pLP, average multiplier, and chef emission rate. |
| **Next unlock**        | Earliest unlock date among your active locks — the moment you must relock to avoid disqualification.            |

### Locking pLP

Before locking pLP, generate liquidity tokens on **Uniswap**, **PrjX** or **HyperSwap**, or use the **Flik into pLP** flow.

To manually lock pLP, navigate to the **Locks** tab. Choose the amount of pLP tokens to lock and the lock duration of **one, three, six, or twelve months**. Each duration corresponds to a multiplier — a 12-month lock earns **25x** platform revenue compared to one month.

<figure><img src="/files/oFPiEXYS8Q05y2nz8eJb" alt=""><figcaption></figcaption></figure>

#### Rules

* Locked pLP is subject to a mandatory variable lock duration (1 month to 1 year). **Early unlocking is not permitted.**
* If you don't choose a default lock duration, the lock period defaults to 3 months.
* Each lock period has a distinct multiplier, ranging from **1x to 25x**, contingent on the chosen duration.
* Fees generated from locked pLP can be claimed at any time without penalty.
* You continue to receive fees throughout the entire lock period.
* Platform fees are distributed linearly over a 7-day rolling window.
* If you leave your locked pLP in the protocol after the expiration date, disqualification bounty hunters will remove you from the pool and you forfeit the corresponding 7 days of streamed platform fees to the remaining lockers. Activate **Auto-Relock** to avoid this.

### Relock pLP

Banners across the PrimeFi platform indicate when your lock expires. Expired locks stop receiving platform fees and may impact your PRFI emission eligibility in the money market.

From the top banner on the PrimeFi platform, choose **"Relock pLP"** and confirm the transaction.

{% hint style="info" %}
The default lock duration is configured to **3 months (4x multiplier)** unless you have chosen a different default from the Locks tab.
{% endhint %}

<figure><img src="/files/xijO8cRDliFsYkvy9vmR" alt=""><figcaption></figcaption></figure>

1. Select the lock length.

   <figure><img src="/files/tTqaW7unijhhdpBZIHPO" alt=""><figcaption></figcaption></figure>
2. Click **"Relock"**.

   <figure><img src="/files/MNX5ww0pJGrjzmGoo0KN" alt=""><figcaption></figcaption></figure>
3. Review the transaction details, click **"Relock pLP"**, and confirm in your wallet.

   <figure><img src="/files/cxIQlUJlEjSxdBaMgOfT" alt=""><figcaption></figcaption></figure>

#### Auto-relock

To prevent the loss of platform fees and maintain eligibility for PRFI emissions, use the **Auto-Relock** feature on the Locks tab.

* To activate auto-relock, toggle the switch to the right and confirm the transaction in your wallet.
* To deactivate auto-relock, toggle the switch to the left and confirm the transaction in your wallet.

<figure><img src="/files/2zSr9OlRbJBBPkl4KeQd" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Auto-relocks lock all expired pLP automatically for your default lock duration.
{% endhint %}

### Lock calendar

The Locks tab also surfaces a **calendar view** of every active lock, so you can see at a glance when each lock matures. Use it to plan claim/relock windows for several locks created at different times.

### Statistics for pLP

The Locks tab also exposes the per-user stats panel:

* **Your Locked pLP** — variable value of pLP influenced by volatility of the underlying tokens (PRFI & HYPE / PRFI & ETH).

  <div data-gb-custom-block data-tag="hint" data-style="success" class="hint hint-success"><p>pLP USD Value = (TWAP(PRFI, 1 hr) × prfiInLp) + (hypePrice × hypeInLp) / LP Supply</p></div>
* **pLP Locked (global)** — cumulative value of all pLP locked on the chosen chain.
* **Daily platform fees (global)** — total daily platform fees, influenced by borrowing interest, liquidations and flash loan fees generated by the protocol over a rolling 24-hour period. Distributed linearly over 7 days.
* **Your share** — percentage of global daily platform fees that belongs to you, determined by your locked pLP weighted by your average multiplier divided by the global locked pLP weighted by the global average multiplier.

  Calculation: `(User pLP × User Avg Multiplier) / (Total Protocol pLP × Global Avg Multiplier)`
* **Total Annual Platform Fees** — projected protocol fees over 365 days, extrapolated from the rolling 24-hour sample.

  Calculation: `User Daily Protocol Fees × 365`
* **Your Present Lock APR** — user-specific Lock APR derived from your average multiplier.

  Calculation: `Global 1-month Locking APR × User Avg Multiplier`


# Rewards & Vesting tab

Claim platform fees, vest PRFI, view activity history, and configure auto-compound.

The **Rewards & Vesting** tab is where you actually receive value back from your locked pLP — the protocol's share of borrowing interest, liquidation premiums and flash-loan fees, paid out as a basket of pTokens — and where you manage your PRFI vesting.

{% hint style="info" %}
This tab combines what earlier versions of the app split across separate **Rewards** and **Vesting** tabs. Lock management lives on the [Boost & Locks tab](/product/prime-liquidity-provider-plp/boost).
{% endhint %}

### What you can do on this tab

* **Claim All** — sweep all claimable platform fees in **a single transaction** (batched, so you only sign once even when claiming many positions).
* **Lifetime PRFI earned** — a running total of all PRFI you have earned to date (ready-to-vest + currently vesting + ready-to-claim).
* **Vesting** — start vesting earned PRFI, track maturation, and claim matured PRFI (see [Vesting tab](/product/prime-liquidity-provider-plp/rewards/vesting) for the full mechanism).
* **Activity log** — chronological record of every interaction with the protocol (deposit, borrow, withdraw, repay, relock, disqualification).
* **Auto-compound** — automatically reinvest your claimable platform revenue into pLP.
* **Protocol stats** — global protocol fees, your share, your historical payouts.

### Protocol fees (Claim All)

Locked pLP contributes utility to the protocol, so the protocol shares a portion of borrowing-driven revenue with lockers.

<figure><img src="/files/p1nQ21KDOVb6DHt9flOs" alt=""><figcaption></figcaption></figure>

After choosing **Claim All** and confirming the transaction, the obtained fees are reflected as **pTokens** in your wallet.

<figure><img src="/files/VzqmTYqpNt56kPU6QtXl" alt="" width="522"><figcaption></figcaption></figure>

Convert them back to their underlying asset or continue contributing utility to the money market by leaving them deposited. If you opt to convert back to the original asset, go to your deposits on the Dashboard and follow the withdrawal flow.

<figure><img src="/files/iqwuvuzz7ic7GhjoBcnK" alt=""><figcaption></figcaption></figure>

Borrowers settle loans by utilising their deposited collateral. As they contribute this utility to the PrimeFi ecosystem, their interaction with the protocol is distributed to pLP lockers. Once claimed, your share materialises as a slice of the protocol's pToken inventory.

{% hint style="info" %}
pTokens are interest-bearing tokens denoted as `pXXXX` in your wallet (e.g., `pWETH` for WETH).
{% endhint %}

### Auto-compound

Auto-compound your platform fees into pLP to enhance the growth of your position over time. Compounding takes place daily on a global schedule and can substantially boost pLP holdings over time.

#### How to enable Auto-compound

On the Rewards tab, locate the pLP overview section, choose your default lock duration, and confirm the transaction in your wallet.

<figure><img src="/files/EmMXJGEk9B94eculakYp" alt=""><figcaption></figcaption></figure>

Then, in the platform-revenue console, toggle **Auto-compound** on and confirm the transaction in your wallet. To disable, toggle it off and confirm.

{% hint style="success" %}
Global auto-compounds run daily and are staggered to spread load. A **3% fee** is charged per compounding event.
{% endhint %}

Prefer manual control? Choose a default lock duration and click **Compound to earn XX%**, then confirm the transaction in your wallet — that compounds your current claimable balance once, without enabling the recurring auto job.

### Activity Log

The Activity Log records every interaction by your address with timestamps in UTC for **traceability, auditability and consistency** in asset management within the protocol.

Recorded event types:

* **Deposit** — collateral or liquidity added into the corresponding smart contracts.
* **Borrow** — debt opened by taking a borrowing position.
* **Withdraw / Withdrawn** — request and effective settlement of previously deposited assets.
* **Repay** — payment that reduces or fully settles outstanding debt.
* **Relocked** — re-locking of pLP to extend the lock period.
* **Disqualified** — status assigned when a position fails to meet protocol parameters (e.g., insufficient collateral, expired lock).

<figure><img src="/files/rFtLmOlKXY9HVGm9v7x4" alt=""><figcaption></figcaption></figure>

Usability enhancements available on this surface:

* **CSV Export** — download your complete activity history as a CSV file for record-keeping, reconciliation with external systems and off-platform analysis.
* **Pagination** — navigate long histories efficiently without performance loss.

The availability of this structured record supports **data integrity**, **on-chain and off-chain audit processes**, and **advanced position management** for active users.


# Vesting

Vest earned PRFI emissions, or Flik them into pLP without paying the early-exit penalty.

Vesting is where the PRFI you earned from the lending markets (as boosted emissions) sits during its 90-day maturation period. You can let it vest in full, exit early with a penalty, or Flik it into a new pLP lock.

{% hint style="info" %}
In the current app, vesting lives inside the [**Rewards & Vesting tab**](/product/prime-liquidity-provider-plp/rewards) (it is no longer a separate top-level tab). The mechanics below are unchanged.
{% endhint %}

### Top stats

| Stat                   | What it means                                                                     |
| ---------------------- | --------------------------------------------------------------------------------- |
| **Earned PRFI**        | Cumulative PRFI emissions you've earned and started vesting.                      |
| **Currently vesting**  | PRFI still inside the 90-day vesting window.                                      |
| **Ready to claim**     | PRFI that has fully matured and can be withdrawn at 100%.                         |
| **Lifetime penalties** | Total PRFI lost over time by exercising "Exit Early" on partially-vested batches. |

### Overview

For participants in PrimeFi's money markets, opting to vest PRFI is a way to convert protocol emissions into long-term protocol-aligned tokens. By depositing assets and meeting pLP eligibility, users earn an APY on their assets **plus** additional yield through PRFI emissions.

The vesting of PRFI follows a structured approach: a **linearly decreasing penalty for early withdrawal**, starting at **90% and dropping to 25%** over a 90-day window. This structure encourages users to commit to the full vesting duration, ensuring they can fully reap the benefits of earned PRFI.

<figure><img src="/files/ynXcD32hmYJR71FV4bEx" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This tab is only meaningful for users who meet the pLP eligibility requirements. If you aren't eligible yet, head over to the **Boost** tab to start.
{% endhint %}

### Initiating PRFI Vesting

To fully vest PRFI and unlock its full value, a **90-day maturation period** is required.

1. **Starting the vesting process** — go to the Vesting tab and locate the **Vesting Overview** section.
2. **Eligibility** — if you haven't met the pLP requirements, the **Start vesting** button is disabled.
3. **Activation** — eligible users click **Start vesting** and confirm the transaction in their wallet.

<figure><img src="/files/Upon1mELw2kSrM77nAOl" alt=""><figcaption></figcaption></figure>

After activation, the **Vesting Overview** panel exposes diverse management functions for monitoring your vesting process.

### Flik vesting PRFI into pLP

Once PRFI is in the vesting phase, you can **Flik it directly into a locked pLP position without paying the exit penalty**, starting to earn platform revenue and re-qualifying for further PRFI emissions immediately.

Within the **"currently vesting"** section, choose **Flik into pLP**.

<figure><img src="/files/x3BUibxpNS71mrGBunxH" alt=""><figcaption></figcaption></figure>

The Flik-with-vesting-PRFI modal appears:

<figure><img src="/files/IBywpOOcgxn7i5AvCOli" alt=""><figcaption></figcaption></figure>

The PRFI and paired-asset input fields are auto-populated. Fliking from vesting can only be done **for the entire vesting amount**, so the paired asset (borrowed or pulled from your wallet) is calculated automatically to match the LP ratio.

After clicking continue, choose the lock duration and corresponding multiplier, then confirm. Verify the Fliking information is accurate and click **Flik into pLP** to sign the necessary transactions.

### Early exit

Exiting early triggers a linear-schedule penalty to receive PRFI immediately. Vests can be exited collectively for the penalty displayed under the **Exit Early** button.

<figure><img src="/files/x3BUibxpNS71mrGBunxH" alt=""><figcaption></figcaption></figure>

Alternatively, exit individual vests with their own penalty by clicking the right arrow beside each one.

<figure><img src="/files/AhElqCxnfcqrIcAiKa8B" alt=""><figcaption></figcaption></figure>

### Vest to maturity

PRFI that has completed the 90-day maturation can be withdrawn in full from the **vested** panel on the Vesting tab.

<figure><img src="/files/F01ZySpBo6uj2eMXltCu" alt=""><figcaption></figcaption></figure>

### Additional notes

* Exiting a vest early triggers a **25%–90% penalty** based on a linear schedule of elapsed time.
* The penalty paid is distributed **90% to the PrimeFi Treasury** and **10% burned**.
* Initiating **Exit Early** from the **Currently vesting** panel exits all separate vesting periods at once, applying the corresponding penalty per batch.
* Alternatively, you can **Exit Early** from individual vests using the per-row menu.
* **Flik into pLP** from this panel includes all separate vesting periods.


# Ways of Building the Position


# Manual Positions

* **How it works**

To manually create a position in the pLP, we need to go to the PRFI/native token pool on the network. We will add a position with a specific composition and receive our LP token, which will represent that position.

This LP token can be locked through the PrimeFi interface for different periods of time.

{% hint style="warning" %}
*Note: This feature is only available on Mainnet.*
{% endhint %}

* **Lock Length**

We can lock the position for different periods of time:\
1, 3, 6, or 12 months.

<figure><img src="/files/h2DufWRAQvw2YHla4YnL" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="success" %}
The longer the lock period, the greater the rewards we will receive from the protocol.
{% endhint %}


# Flik Positions

## **How it Works**

Imagine you have HYPE and want to enter the PRFI-HYPE pool. The traditional process for doing so is quite cumbersome.

Initially, you need to provide PRFI and HYPE in the correct ratios, which requires four separate transactions.

***Fliking*** simplifies this process by allowing you to complete it with a single click.

When you use ***Flik*** with one of these assets, the system automatically converts it to HYPE behind the scenes. This HYPE is then combined with PRFI to create and lock the LP.

This feature is designed to give you increased flexibility with the protocol, making it easier and more efficient to earn and lock LP.

## **Methods for Building it**

You can select between 2 *Flik* sources.

### **1.-Wallet**

PrimeFi enables you to *Flik* using supported assets from your wallet.

<figure><img src="/files/hFJLS5msZykrxF3JLt8Z" alt=""><figcaption></figcaption></figure>

### **2.-Borrow**

Alternatively, if you have deposited collateral, you can borrow directly from the protocol.

<figure><img src="/files/IpU9r0pfS48MxRJUs91Y" alt=""><figcaption></figcaption></figure>

Be mindful of your Health Factor and the risk of liquidation before borrowing. Fliking will never lower your Health Factor below 1.1.

The lock periods function the same way as in the manual pLP.


# Maximum APR by asset

### Maximum APR by asset

<figure><img src="/files/ZmeCNIjDwcTTElsZmUMw" alt=""><figcaption></figcaption></figure>

On the Markets Page, users have the ability to assess the Maximum pLP Locking APR. Additionally, there is an asset breakdown modal that provides a detailed view of the APR for each specific asset.

<figure><img src="/files/kMdWdUDvtvPrrOblvj6H" alt=""><figcaption></figcaption></figure>

#### Maximum Lock APR:

This is determined as the highest APR achievable when pLP is locked for a one-year period.

**Formula:**

`1-month lock APR * 1-year lock multiplier (25x)`

#### 1-Month Locking APR:

This represents the current APR for locking your pLP tokens for a one-month period.

**Formula:**

`(Total 1 Month Lockers’ Share of Annualized Protocol Fees) / (Total 1 Month Lockers’ Share of pLP Pool Size)`

#### 1 Month Locker Share of Protocol Fees:

**Formula:**

`(1 Month Locker Share of Protocol Power) / (Total Protocol Locking Power)`

#### Total Protocol Locking Power:

This is the sum of all lockers’ shares, each adjusted by its respective multiplier.

```
= (1 Month Lockers' Share of pLP Pool Size * 1 Month Locker Multiplier (1x)) 
+ (3 Month Lockers’ Share of pLP Pool Size * 3 Month Locker Multiplier (4x))
+ (6 Month Lockers’ Share of pLP Pool Size * 6 Month Lockers’ Multiplier (10x))
+ (12 Month Lockers' Share of pLP Pool Size * 12 Month Locker Multiplier (25x))
```

***

### Per-market PRFI emissions (how the table is built)

The pLP page shows a **Per-market emissions** table that breaks the protocol's PRFI emissions down per asset. Two facts are important for reading it correctly:

#### 1. There is a single, global emission budget

PRFI emissions are **one protocol-wide budget**, not a separate budget per chain. The `rewardsPerSecond` rate lives on the **Base mainchain** `ChefIncentivesController`. Activity on the sidechains (HyperEVM, XDC) is synchronized back to Base over LayerZero through the [Omnichain Gas Deposit Mechanism](/product/primefi-features/omnichain-gas-deposit-mechanism-for-incentives-synchronization), so the mainchain holds the **single source of truth** and the budget is **never duplicated per chain**.

At the current rate this global budget is ≈ **0.1614 PRFI/sec (\~13.9K PRFI/day)**, shared across every market on every chain.

#### 2. Each pool earns a share proportional to its allocation points

Every reward pool (each pToken on the supply side and each vdToken on the borrow side) has an **allocation point** (`allocPoint`). A pool's slice of the global budget is:

```
poolEmissionsPerSec = globalRewardsPerSec
                      × poolAllocPoint
                      ÷ TOTAL allocPoint across ALL pools on ALL chains
```

> **Important:** the denominator is the allocation total summed across **all** PrimeFi v2 chains (Base + HyperEVM + XDC), not just the chain you are currently viewing. Dividing by a single chain's local total would imply that chain alone distributes the entire 13.9K PRFI/day, over-counting the one global budget several times over and inflating every displayed APR.

By default each non-PRFI asset is given an **equal** allocation, so within a market the listed assets emit the same PRFI/day; the PRFI pool itself is given a deliberately small allocation. Allocation points are an on-chain governance parameter and can be re-weighted per asset at any time — the UI follows whatever is configured on-chain.

#### Your PRFI / day (personalized)

When a reward-eligible wallet is connected, the table adds a **Your PRFI / day** column: each pool's emissions multiplied by your live pro-rata share of that pool (`yourBalance ÷ poolTotalSupply`). Pools where you hold no position show `—`. Sub-cent USD values are rendered as `<$0.01` rather than `$0.00`.

Remember that these emissions only flow to wallets that maintain pLP eligibility (a locked pLP value ≥ 5% of deposits); see [Sustaining Eligibility Status](/product/prime-liquidity-provider-plp/sustaining-eligibility-status).


# pLP Pools

PrimeFi supports two liquidity-pool types per network. Only one of them is eligible for **pLP** rewards.

### Pool types

* **v2 pool (eligible for pLP):**\
  This is the pool used by pLP. Create your position with **Flik** or add liquidity manually. pLP emissions are distributed **only** to v2 LP tokens.
* **v3 / v4 pools (concentrated liquidity):**\
  For active LPs who want custom price ranges. These positions **do not** qualify for pLP emissions and earn **swap fees only**.

> Always verify pool addresses **inside the PrimeFi app** before adding liquidity.

***

### Mainnet pools (live)

#### Base

* **PRFI-ETH v2 (Flik pool, pLP-eligible)**\
  Uniswap: <https://app.uniswap.org/explore/pools/base/0x87b417af600312df37f551a05ae14bcc3d55bc36>\
  Dexscreener: <https://dexscreener.com/base/0x87b417af600312df37f551a05ae14bcc3d55bc36>

#### HyperEVM

* **PRFI–HYPE on PrjX (pLP-eligible via Flik/manual v2-style LP)**\
  Add liquidity: <https://www.prjx.com/deposit?tokenA=0x0000000000000000000000000000000000000000&tokenB=0x7bbcf1b600565ae023a1806ef637af4739de3255&fee=3000>\
  Dexscreener: <https://dexscreener.com/hyperevm/0xfae262d0384b3e1c58abe28ce8ac5678af874354>

#### **XDC Network**

* PRFI-WXDC v2 Xswap (pLP-eligible)\
  Geckoterminal: <https://www.geckoterminal.com/es/xdc/pools/0xffa04f091128fb89d3b1ecd0149dc677dfae1c69>

***

### Notes & risk

* **pLP rewards apply only to the v2 pool** on each network.
* Concentrated LP (v3/v4) requires **range management** and is subject to **impermanent loss**.
* Additional networks (e.g., Ethereum, Arbitrum, BNB Chain) may be added in future releases; official pool links will be published before going live.


# Sustaining Eligibility Status

{% hint style="warning" %}
Keep in mind: You must always maintain a minimum 5% ratio between the total value of your deposit and the value of your pLP to stay eligible!
{% endhint %}

Being a risk asset, pricing volatility can cause users to fluctuate in and out of eligibility.

Example:

* Boris holds $5 worth of pLP on Base (PRFI/HYPE) and has $100 in USDT deposits, meeting the 5% requirement (eligible for emissions).
* When the price of HYPE decreases by 5%, the value of pLP falls below $5. Consequently, Boris falls below the 5% threshold required to earn emissions.

{% hint style="info" %}
The protocol must consistently assess the eligibility status to ascertain which users are included and which are excluded.
{% endhint %}

Once eligible, banners at the top of each page will display "Emissions active."

<figure><img src="/files/l4uWRV1c67NJz9IRSxne" alt=""><figcaption></figcaption></figure>

Should you lose eligibility, a notification reading "boost inactive" will be visible at the top of each page. It will also indicate the amount of pLP needed to restore eligibility.

Click "Flik into pLP" and follow the prompts to resume receiving $PRFI emissions.

<figure><img src="/files/GMmvOy9AyknZzKLF7F76" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
To enhance the chances of staying eligible for PRFI emissions, money market participants may want to maintain a buffer zone above the 5% threshold to accommodate potential volatility.
{% endhint %}

### Example:

Bob deposits $1,000 USDT in the money market and must lock a minimum of $50 of pLP to qualify for PRFI emissions.

Choosing to stay cautious amid potential volatility, Bob opts to lock $60 in pLP (1% above the threshold) to ensure he maintains eligibility status.

Furthermore, users can enhance their chances of preserving eligibility status by enabling auto-compound and auto-relock features from the Manage PrimeFi page.


# Bounty for Disqualification

{% hint style="warning" %}
It will be available for the final version of the protocol that will be launched on mainnet.
{% endhint %}

PrimeFi is introducing a feature for users who fulfill the 5% pLP requirement to disqualify ineligible users for a bounty, similar to operating a liquidation bot. This can be done either directly through the UI or with the assistance of searcher bots.

A "bounty" is assigned to the account, which eligible pLPs can claim as a base reward.

Watchful bounty hunters can keep track of available disqualification bounties on the Manage PrimeFi page and disqualify ineligible users by selecting "claim" and confirming the transaction.

<figure><img src="/files/70x3TwGdOGMiHemuOGHj" alt="" width="488"><figcaption></figcaption></figure>

The disqualification system serves to prevent expired pLP accounts from receiving platform fees that have been illegitimately earned and stops ineligible users from receiving $PRFI emissions that fall below the 5% pLP threshold.

Furthermore, bounty hunters are entitled to a base bounty for relocking pLP for users who have activated "auto-relock." They also receive compensation for executing auto-compounds on behalf of users who have opted for this automation.

This not only contributes to further decentralizing actions taken on the protocol but also empowers users to easily remove ineligible participants with a simple point-and-click method, benefiting both the protocol and themselves.

To reduce the risk of disqualification, it is advisable to maintain eligibility status by setting your pLP threshold above 5%.

To avoid disqualifications related to expired locked pLP, users can toggle the "auto-relock" function on the Manage page, ensuring the continuous receipt of platform fees without interruption.

<br>

<div align="center"><figure><img src="/files/4g8s7BsVqJR43IsKuH4G" alt=""><figcaption></figcaption></figure></div>

Additional Information Bounty hunters are required to maintain the 5% pLP threshold status and have deposited assets to be eligible for claiming bounties.

Claimed bounties are rewarded in Vesting PRFI.

The base bounty is dynamic and depends on the demand for searcher bots and the price of $PRFI.

Bounties follow a prioritization system, allowing only one bounty per account at a time, although there are up to three types of bounties:

1. Bounty priority is given to expired lock treatment, involving the removal of expired locks from the pool or re-locking pLPs with auto-relock enabled. This prevents the account from receiving ineligibly earned platform revenue. The bounty for removing an expired lock is the base bounty.
2. The next bounty priority is preventing accounts from continuing to receive ineligibly earned PRFI emissions that fall below the 5% eligibility threshold. The bounty for emissions ineligibility equals the base bounty.
3. The last bounty priority is for auto-compounding. When an auto-compound event is triggered, the protocol delegates the transaction execution to bounty hunters. AutoCompound bounties are funded by the fee paid by the user, which will be compounded. This amount starts small and increases over time as users accrue more pending rewards for compounding.

Self-disqualification occurs when performing an on-chain action within the Dapp (deposit/claim/lock) triggers disqualification if the above parameters are detected.


# Liquid Staking Tokens

Liquid staking tokens (LSTs) let you earn staking rewards while keeping your capital liquid and usable in DeFi. PrimeFi supports LSTs from the Prime Numbers ecosystem as first-class collateral: supply them, borrow against them, and keep earning the underlying staking yield the whole time.

Currently supported:

* [PrimeStakedXDC (psXDC)](/product/liquid-staking-tokens/primestakedxdc-psxdc) — the liquid-staking token for XDC from [PrimeStaking](https://primestaking.xyz/). Available on the **XDC**, **Base** and **HyperEVM** markets.


# PrimeStakedXDC (psXDC)

## psXDC Deposits on the XDC Network

**PrimeFi** now supports **psXDC** as a supply and borrow asset on the **XDC Network**, **Base** and **HyperEVM**.\
**psXDC** is the liquid‑staking token (LST) from **PrimeStaking** that accrues XDC staking rewards while you hold it.

When you deposit psXDC on PrimeFi, you receive **ppsXDC**, PrimeFi’s interest‑bearing receipt token. **ppsXDC is a rebase token**—its balance increases automatically as rewards are distributed.

> **Important:** If you deposit psXDC into PrimeFi, you **will not** claim staking rewards directly at primestaking.xyz. Instead, the PrimeFi psXDC pool claims those rewards **on‑chain** and **redistributes** them to **ppsXDC holders** via rebases. You still earn the underlying staking yield—plus PrimeFi incentives.

***

### Contracts & roles

* **psXDC (underlying, XDC):** `0xDc74c0DaED82ae94486DeeF22991d2F54173c734`
* **ppsXDC (receipt token, XDC):** `0x3Bd0183584185F8341B83dDefD73E6Eae1a64eeF`\
  Add this token to your wallet to watch your balance.
* **PrimeStaking (primestaking.xyz):** liquid staking that mints **psXDC** from **XDC** and produces staking rewards.
* **PrimeFi (primefi.xyz):** lending & borrowing that mints **ppsXDC** when you supply **psXDC** and routes rewards + incentives.

{% hint style="info" %}
Earlier psXDC token versions were migrated as the PrimeStaking vault was upgraded. Old psXDC reserves on PrimeFi are **frozen** (withdraw/repay only). If you still hold a deprecated version, withdraw and migrate at primestaking.xyz.
{% endhint %}

***

### psXDC on Base and HyperEVM

psXDC is a **LayerZero OFT**, so it also lives natively on **Base** and **HyperEVM** at the same address: `0x98D916F5773Ac0482b49856f2659d6c32114C4Ba`. Every psXDC on Base/HyperEVM is backed 1:1 by real psXDC locked on XDC.

You can supply and borrow psXDC on both chains' PrimeFi markets:

| Chain    | ppsXDC (receipt)                             | vdpsXDC (variable debt)                      |
| -------- | -------------------------------------------- | -------------------------------------------- |
| Base     | `0x3A577f9789FC81C2Ea0B81B9e02B6Dbc67158A37` | `0xD9bA32E8a4955E4fbbbDD61F121b2f81ca7bBFE8` |
| HyperEVM | `0x1952dD6d79A7ab0419321e0669B1BdF4dF1490E5` | `0x11f7467591b3E9e7B4d97e0827dCAaE51e46d373` |

* Collateral parameters on Base/HyperEVM: **LTV 20%**, liquidation threshold 80%, liquidation bonus 7.5%.
* psXDC is priced at the **XDC/USD** feed on these chains (1 psXDC ≈ 1 XDC).
* To move psXDC between chains, use the bridge at primestaking.xyz (LayerZero, \~2–5 min).

***

### What you earn when you deposit psXDC

Your psXDC deposit on PrimeFi earns **three** streams of yield, all accruing to **ppsXDC holders**:

1. **LST base yield (from psXDC)**\
   The psXDC inside the PrimeFi pool continues to generate XDC staking rewards via PrimeStaking. PrimeFi **claims** those rewards and **rebases** them to ppsXDC.
2. **Extra PRFI incentive (3–4% APY, variable)**\
   An additional reward paid in **PRFI** for psXDC suppliers.
3. **Platform & pLP incentives (variable)**\
   Additional incentives are shown in the app UI. These change with program parameters and utilization.

> Live APYs are variable—always rely on the rate shown in the PrimeFi app.

***

### Why ppsXDC yield can change: Coverage Ratio

Only the **psXDC actually held by the PrimeFi pool contract** generates staking rewards for rebase. If users **borrow psXDC** out of the pool or **loop** by re‑depositing borrowed psXDC (minting more ppsXDC), then **ppsXDC supply can exceed psXDC in the pool**. That dilutes the LST component of the deposit APY.

**Coverage Ratio**

```
Coverage Ratio = (psXDC balance in the PrimeFi pool contract) / (total ppsXDC supply)
```

* **1.00** → ppsXDC captures \~100% of psXDC’s base LST yield.
* **0.85** → ppsXDC captures \~85% of psXDC’s base LST yield (diluted).

**Total Deposit APY (simplified)**

```
Total Deposit APY ≈ [Base psXDC APY × Coverage Ratio] + [PRFI APY] + [platform/pLP APY]
```

> Because looping can increase ppsXDC supply and reduce Coverage Ratio, heavy looping **lowers** the LST portion of yield for **everyone** (including the looper).
>
> Users can **borrow psXDC** and **re‑deposit** it, minting additional ppsXDC. Because borrowed psXDC is no longer held by the pool, the Coverage Ratio drops, so the **6%+ LST yield gets diluted** across more ppsXDC.

***

### Supported assets (XDC market)

As shown in the current market: **XDC, psXDC, USDC, USDT, PRFI**.\
Supply/borrow caps, APYs, and utilization are visible in the app and change over time.

***

### How deposits, rewards, and withdrawals work

1. **Deposit psXDC → receive ppsXDC**
   * Connect on **XDC Network** and approve psXDC.
   * Supplying psXDC mints **ppsXDC 1:1** (subject to the vault’s current exchange mechanics). ppsXDC is **rebase**: your balance increases as rewards are distributed.
2. **Rewards distribution**
   * The pool contract **claims psXDC staking rewards** from PrimeStaking and re‑distributes them to **ppsXDC holders** via rebase.
   * **PRFI incentives** and **platform/pLP incentives** are added on top (see the Rewards panel in the UI for your accrued amounts).
3. **Withdraw**\
   Redeem ppsXDC to withdraw psXDC (subject to pool liquidity). Because ppsXDC rebases, you don’t need to claim the LST portion—your **ppsXDC balance grows** over time and you redeem more psXDC.

*Wallet tip:* Some wallets refresh rebase balances only on activity. If your ppsXDC display looks stale, a tiny self‑transfer can refresh it. Gas is paid in **XDC**.

***

### Borrowing, looping, and strategies

PrimeFi is a **lending & borrowing** protocol. You can deposit psXDC, borrow against it, and optionally **loop** (lever up) by re‑depositing what you borrow. This increases your exposure to deposit APY but also increases **borrow costs** and **liquidation risk**. Because psXDC is intended to be \~1:1 with XDC, same‑asset loops reduce price risk but **do not remove** interest‑rate or depeg risk.

> **Critical:** Looping often **lowers** the LST portion of your deposit APY for everyone by pushing down the **Coverage Ratio** (see above). It can also make **borrow APR** spike when utilization is high. Always check live rates.

#### Common loop patterns

**A) psXDC → borrow psXDC → re‑deposit (same‑asset loop)**

1. Deposit psXDC.
2. Borrow psXDC against it.
3. Re‑deposit the borrowed psXDC to mint more ppsXDC.
4. Repeat until you reach your target health factor/risk.

* **Pros:** Simple; minimizes price basis mismatch.
* **Cons:** Pushes Coverage Ratio down (diluting everyone’s LST yield, including yours) and exposes you to **psXDC borrow APR** spikes. If psXDC briefly trades away from its intended peg, you can face unexpected PnL or collateral value changes.

**B) psXDC → borrow XDC → stake to psXDC → deposit (cross‑asset loop)**

1. Deposit psXDC.
2. Borrow **XDC**.
3. Stake the borrowed XDC at **PrimeStaking** to mint psXDC.
4. Deposit the new psXDC back into PrimeFi.

* **Pros:** May be attractive if **XDC borrow APR** is lower than **psXDC borrow APR**.
* **Cons:** Adds **staking/unstaking frictions**, extra transactions and gas, and potential **timing/price basis** risk between XDC and psXDC. Still reduces Coverage Ratio once the added psXDC is re‑deposited.

***

### Loop math & break‑even

Let:

```
c    = collateral factor / target LTV (e.g., 70% = 0.70)
L    = 1 / (1 - c)                  # supply leverage
B    = c / (1 - c)                  # borrow leverage
Ydep = (Base psXDC APY × Coverage Ratio) + PRFI APY + platform/pLP APY − frictions
Yb   = borrow APR on the asset you borrow (psXDC or XDC)
```

**Break‑even condition**

```
Looping is profitable  ⇔  Ydep > (c × Yb)
```

**Approximate net APY on your equity**

```
Ynet ≈ (L × Ydep) − (B × Yb)
```

***

### Worked examples (illustrative only)

**Example 1 — Same‑asset loop (psXDC → psXDC)**

Assumptions:

* `c = 70%` → `L = 3.33×`, `B = 2.33×`
* Base psXDC APY `= 6.0%`
* Coverage Ratio `= 0.85`
* PRFI APY `= 3.5%`
* platform/pLP APY `= 1.0%`
* psXDC borrow APR `Yb = 16.0%`

Calculations:

```
Ydep = (6.0% × 0.85) + 3.5% + 1.0% = 9.6%
Break-even: c × Yb = 0.70 × 16.0% = 11.2%  → not met
Ynet ≈ (3.33 × 9.6%) − (2.33 × 16.0%) = 32.0% − 37.3% ≈ −5.3%  (unprofitable)
```

**Takeaway:** With high psXDC borrow APR and diluted Coverage Ratio, looping loses versus a simple deposit.

***

**Example 2 — Cross‑asset loop (psXDC → borrow XDC → stake to psXDC → deposit)**

Assumptions:

* `c = 70%` → `L = 3.33×`, `B = 2.33×`
* Base psXDC APY `= 6.0%`
* Coverage Ratio `= 0.92` after adding new psXDC
* PRFI APY `= 3.5%`, platform/pLP APY `= 1.0%`, frictions `= 0.5%`
* **XDC** borrow APR `Yb = 9.0%`

Calculations:

```
Ydep = (6.0% × 0.92) + 3.5% + 1.0% − 0.5% = 9.5%
Break-even: c × Yb = 0.70 × 9.0% = 6.3%  → met
Ynet ≈ (3.33 × 9.5%) − (2.33 × 9.0%) = 31.7% − 21.0% ≈ +10.7%  (profitable under these inputs)
```

**Takeaway:** When **XDC borrow APR** is materially below psXDC’s and frictions are small, a cross‑asset loop can work. Small changes in borrow APR or incentives can erase this edge—stress‑test before levering up.

***

### Practical looping tips

* **Keep a safety buffer.** Health factor can fall from price moves, parameter changes, or rising borrow APRs.
* **Watch Coverage Ratio.** The **Deposit APY in the app already reflects** Coverage Ratio and incentives—use it as your ground truth.
* **Borrow APR is dynamic.** Utilization spikes can push APR higher and flip a positive spread negative.
* **Mind frictions.** Cross‑asset loops add transactions, gas, staking time, and potential slippage/peg risk.
* **Stress‑test.** If `borrow APR +5–10%` or `incentives −2–3%`, do you stay positive? If not, de‑leverage.

***

### Step‑by‑step: deposit psXDC and earn

1. Connect wallet on **XDC Network** and hold psXDC (+ a small amount of XDC for gas).
2. Approve and **supply psXDC** in the PrimeFi psXDC market.
3. Receive **ppsXDC** (rebase). Optionally add `0x3Bd0183584185F8341B83dDefD73E6Eae1a64eeF` to your wallet.
4. Monitor the **Deposit APY** (LST effective yield + PRFI + platform/pLP).
5. **Claim PRFI/platform rewards** from the app as they accrue (ppsXDC rebases automatically).
6. **Withdraw** by redeeming ppsXDC for psXDC (subject to pool liquidity).

***

### FAQ

**Does ppsXDC supply sometimes exceed psXDC in the pool?**\
Yes. Borrowers can re‑deposit psXDC and mint **more ppsXDC** while the borrowed psXDC leaves the pool. This reduces **Coverage Ratio** and dilutes the LST component.

**Why is psXDC deposit APY sometimes below \~6%?**\
Because **Coverage Ratio < 1** when psXDC is heavily borrowed/looped; the base LST yield is spread across more ppsXDC.

**Why is my ppsXDC balance increasing without claims?**\
ppsXDC is a **rebase** token. Staking rewards from PrimeStaking and pool incentives are applied as **supply increases** to ppsXDC.

**Do PRFI incentives compound into ppsXDC?**\
No. PRFI is a separate incentive you claim in the app. The LST portion compounds via **ppsXDC rebases**.

**Can I withdraw anytime?**\
Yes—subject to **pool liquidity**. High utilization may require waiting for liquidity to free up or repaying borrows.

***

### Risks & disclaimers

APYs/APRs are **variable** and depend on utilization, incentives, and market conditions. Risks include interest‑rate risk (borrow APR spikes), liquidation risk, psXDC/XDC peg deviations, incentive program changes, and liquidity constraints on withdrawal. Nothing here is financial advice.

***

### TL;DR

* Deposit **psXDC** → receive **ppsXDC** (rebase).
* PrimeFi claims psXDC staking rewards and **distributes them to ppsXDC holders**.
* You also earn **PRFI (3–4% APY)** + **platform/pLP** incentives.
* **ppsXDC can exceed psXDC in the pool** due to borrowing/looping, which **dilutes** the LST portion (Coverage Ratio ↓).
* Looping only makes sense when **Deposit APY > (collateral factor × borrow APR)**, and it increases risk.


# XRP Testnet Markets

PrimeFi's XRP money markets are live on testnet — Flare Coston2 and the XRPL EVM testnet. Connect, mint test tokens, and try supplying/borrowing today.

PrimeFi is bringing lending & borrowing to **XRP** through two Aave v3 markets that are **live now on testnet**:

| Market               | Chain ID  | Gas token | Oracle        | Rewards                   |
| -------------------- | --------- | --------- | ------------- | ------------------------- |
| **Flare Coston2**    | `114`     | C2FLR     | Flare FTSO    | **rFLR** (live emissions) |
| **XRPL EVM Testnet** | `1449000` | XRP       | Band Protocol | —                         |

Both are operated by **Prime Numbers Labs**, the same team behind PrimeFi v2. They let XRP holders put their XRP to work — supply it as collateral and borrow against it without selling.

{% hint style="info" %}
These markets are in **testnet phase**. Balances, rewards, and prices are test-only. Use the in-app faucet and the public gas faucets below to get test funds — no real value is at risk.
{% endhint %}

### These markets are "v3" in the app

The PrimeFi app header has a **v2 / v3** toggle. The XRP markets live under **v3** (the Aave v3 stack). Unlike the third-party [Fathom v3 (XDC)](/v3-markets/fathom-v3) market, **the XRP markets are PrimeFi's own** — we operate the pool, oracle and rewards.

### How they compare to PrimeFi v2

| Feature                                           | PrimeFi v2 (Base / HyperEVM / XDC)       | XRP markets (v3)                                |
| ------------------------------------------------- | ---------------------------------------- | ----------------------------------------------- |
| Underlying protocol                               | PrimeFi (Aave v2 fork + omnichain layer) | PrimeFi (Aave v3 stack)                         |
| Core actions (supply / borrow / repay / withdraw) | Yes                                      | Yes                                             |
| E-Mode (correlated assets)                        | Yes                                      | Yes — XRP-correlated category on Flare          |
| External reward emissions                         | PRFI (where the chef is active)          | **rFLR on Flare Coston2**; none on XRPL EVM yet |
| pLP boost / PRFI emissions / locked pLP           | Yes                                      | **No** (v3 has no pLP layer)                    |
| Prime Points / Flik / Prepaid Gas                 | Yes                                      | No                                              |
| Phase                                             | Production                               | **Testnet**                                     |

### How to open an XRP market

1. Open the [PrimeFi app](https://app.primefi.xyz/).
2. Click the **v3** pill in the top-right header.
3. Pick **Flare Coston2** or **XRPL EVM Testnet** from the market chooser — the app will prompt your wallet to switch (and add) the network.
4. Grab gas + test tokens (see [Testnet Faucets](/v3-markets/testnet-faucets)) and start supplying.

### Per-market guides

* [Flare Coston2](/v3-markets/xrp-testnet-markets/flare-coston2)
* [XRPL EVM Testnet](/v3-markets/xrp-testnet-markets/xrpl-evm-testnet)


# Flare Coston2

PrimeFi's XRP money market on the Flare Coston2 testnet (chain 114).

The Flare Coston2 market is PrimeFi's XRP lending market running on Flare's **Coston2 testnet** (chain `114`). XRP enters the Flare ecosystem as **FXRP** (FAssets-minted XRP), which you supply as collateral to borrow against — without selling your XRP.

|               |                                                                        |
| ------------- | ---------------------------------------------------------------------- |
| **Chain ID**  | `114`                                                                  |
| **Gas token** | C2FLR (Coston2 Flare)                                                  |
| **Oracle**    | Flare **FTSO** (native price feeds)                                    |
| **Rewards**   | **rFLR** emissions via the Aave v3 RewardsController                   |
| **Stack**     | PrimeFi v3 (Aave v3)                                                   |
| **Explorer**  | [coston2.testnet.flarescan.com](https://coston2.testnet.flarescan.com) |

### Reserves

All non-native reserves are mintable test mocks dispensed by the in-app **Get test tokens** button:

* **FXRP** — testnet stand-in for FAssets-minted XRP (your primary collateral)
* **RLUSD** — Ripple USD stablecoin
* **stXRP** — staked-XRP representation
* **FBTC** — wrapped BTC variant
* **USDT0** — USD₮0 stablecoin
* **WBTC**
* **WETH**

{% hint style="info" %}
On **mainnet**, FXRP is minted from real XRP via Flare **FAssets** — see [How FXRP works](https://dev.flare.network/fassets/overview). On Coston2 it's a mintable mock you get from the in-app faucet.
{% endhint %}

### Rewards (rFLR)

Supplying and borrowing on Coston2 earns **rFLR**, streamed by the Aave v3 RewardsController. The app reads the live emission rate from the on-chain incentive data provider, so the reward APRs you see in the markets table and asset pages are **live on-chain values**, not estimates.

### E-Mode

The market ships an **XRP-correlated E-Mode category** so XRP-pegged assets can be used together at higher capital efficiency (higher LTV / liquidation threshold) when borrowing within the correlated group.

### Get started

1. Switch to **v3 → Flare Coston2** in the app (see the [section overview](/v3-markets/xrp-testnet-markets)).
2. Claim **C2FLR** for gas from the [Coston2 faucet](https://faucet.flare.network/coston2).
3. Mint reserves with the in-app **Get test tokens** button.
4. Supply FXRP (or any reserve) and borrow against it.

Full faucet walkthrough: [Testnet Faucets → Flare Coston2](https://github.com/PrimeNumbersLabs/primefi-gitbook/blob/main/testnet-faucets/flare-coston2.md).


# XRPL EVM Testnet

PrimeFi's XRP money market on the XRPL EVM Sidechain testnet (chain 1449000).

The XRPL EVM market is PrimeFi's XRP lending market on the **XRPL EVM Sidechain testnet** (chain `1449000`). The XRPL EVM Sidechain is an EVM-compatible chain where **XRP is the native gas token**, bridged 1:1 from the XRP Ledger. You supply XRP directly as collateral and borrow against it.

|               |                                                                      |
| ------------- | -------------------------------------------------------------------- |
| **Chain ID**  | `1449000`                                                            |
| **Gas token** | XRP                                                                  |
| **Oracle**    | **Band Protocol**                                                    |
| **Stack**     | PrimeFi v3 (Aave v3)                                                 |
| **Explorer**  | [explorer.testnet.xrplevm.org](https://explorer.testnet.xrplevm.org) |

### Reserves

* **XRP / WXRP** — native XRP (and its wrapped form) — your primary collateral
* **USDC** — mintable test mock
* **USDT** — mintable test mock
* **RLUSD** (Ripple USD), priced live by Band Protocol — mintable test mock
* **WBTC** — mintable test mock
* **WETH** — mintable test mock

The non-native reserves are mintable test mocks dispensed by the in-app **Get test tokens** button. WXRP is obtained by wrapping the native XRP you receive from the gas faucet.

### Get started

1. Switch to **v3 → XRPL EVM Testnet** in the app (see the [section overview](/v3-markets/xrp-testnet-markets)).
2. Claim test **XRP** for gas from the [XRPL EVM faucet](https://faucet.xrplevm.org/) (up to 90 XRP).
3. (Optional) Bridge test XRP from the XRPL testnet via [Squid testnet](https://testnet.xrpl.squidrouter.com/).
4. Mint USDC/USDT/RLUSD/WBTC/WETH with the in-app **Get test tokens** button.
5. Supply XRP (or any reserve) and borrow against it.

Full faucet walkthrough: [Testnet Faucets → XRPL EVM Testnet](/v3-markets/testnet-faucets/xrpl-evm-testnet).


# Testnet Faucets

PrimeFi's **XRP money markets** are live on testnet. This guide shows how to get test funds so you can supply, borrow and try every feature — at zero cost and zero risk.

The currently relevant testnets are:

1. **Flare Coston2** — gas token C2FLR ([market guide](/v3-markets/xrp-testnet-markets/flare-coston2))
2. **XRPL EVM Testnet** — gas token XRP ([market guide](/v3-markets/xrp-testnet-markets/xrpl-evm-testnet))

### Two steps to fully funded

Every testnet wallet needs two things:

1. **Gas** — the native token (C2FLR or XRP), claimed from a public faucet.
2. **Reserves** — the assets you supply/borrow (FXRP, RLUSD, USDC, …). These are mintable test mocks dispensed by the in-app **Get test tokens** button.

{% hint style="success" %}
**Get test tokens** lives on the XRP market screens, above the markets table. Connect your wallet, switch to the market's chain, then mint any single token or **Mint all** at once. Each minted token is offered to your wallet so it shows up immediately.
{% endhint %}

The pages below cover each testnet. (The earlier Hyperliquid Test, Base Sepolia, Arbitrum Sepolia and BNB Chain testnet entries have been retired — PrimeFi no longer ships test markets against those chains.)


# Flare Coston2 faucet

Get test C2FLR for gas and mint test reserves on the Flare Coston2 market.

To test the [Flare Coston2 XRP market](/v3-markets/xrp-testnet-markets/flare-coston2) you need **C2FLR** for gas first, then the mintable reserve tokens.

{% hint style="info" %}
**Supported wallets:** connect with **MetaMask** or **Rabby**. If you use Bifrost, it may stay in developer mode on Coston2; switch the network manually in the wallet settings.
{% endhint %}

### Step 1: Get C2FLR (gas)

Claim test C2FLR from the official Coston2 faucet. Paste your wallet address and claim. You only need a small amount; it just pays transaction fees.

{% embed url="<https://faucet.flare.network/coston2>" %}
Coston2 Gas Faucet
{% endembed %}

### Step 2: Mint test reserves

In the PrimeFi app, switch to **v3 → Flare Coston2**, connect your wallet, and click **Get test tokens** above the markets table. Mint any single token, or **Mint all** at once:

| Token | Amount per mint |
| ----- | --------------- |
| FXRP  | 100,000         |
| RLUSD | 100,000         |
| stXRP | 100,000         |
| USDT0 | 100,000         |
| WBTC  | 10              |
| FBTC  | 10              |
| WETH  | 100             |

{% hint style="info" %}
These are mintable test mocks, so minting is unrestricted and you can top up any time. On mainnet, FXRP is minted from real XRP via Flare [FAssets](https://dev.flare.network/fassets/overview) instead.
{% endhint %}

Once funded, head to the dashboard and start supplying or borrowing.


# XRPL EVM Testnet faucet

Get test XRP for gas and mint test reserves on the XRPL EVM testnet market.

To test the [XRPL EVM XRP market](/v3-markets/xrp-testnet-markets/xrpl-evm-testnet) you need test **XRP** for gas first, then the mintable reserve tokens.

{% hint style="info" %}
**Supported wallets:** connect with **MetaMask** or **Rabby**. Bifrost and Xaman do not support the XRPL EVM testnet yet, so they cannot connect here.
{% endhint %}

### Step 1: Get XRP (gas)

Claim test XRP from the official XRPL EVM faucet (supports Testnet and Devnet). Paste your wallet address and claim up to 90 test XRP.

{% embed url="<https://faucet.xrplevm.org/>" %}
XRPL EVM Faucet
{% endembed %}

Already holding XRP on the XRP Ledger testnet? Bridge it into the sidechain with Squid:

{% embed url="<https://testnet.xrpl.squidrouter.com/>" %}
Squid Testnet Bridge
{% endembed %}

### Step 2: Mint test reserves

In the PrimeFi app, switch to **v3 → XRPL EVM Testnet**, connect your wallet, and click **Get test tokens** above the markets table. Mint any single token, or **Mint all** at once:

| Token | Amount per mint |
| ----- | --------------- |
| USDC  | 100,000         |
| USDT  | 100,000         |
| RLUSD | 100,000         |
| WBTC  | 10              |
| WETH  | 100             |

{% hint style="info" %}
XRP is the native gas token here, so you supply it directly (or its wrapped form, WXRP). The stablecoins and wrapped assets above are mintable test mocks.
{% endhint %}

Once funded, head to the dashboard and start supplying or borrowing.


# In addition

### More faucet resources for the XRP testnets

* **Flare Coston2 docs & faucet** — [dev.flare.network/network/getting-started](https://dev.flare.network/network/getting-started)
* **XRPL EVM docs & faucet** — [docs.xrplevm.org](https://docs.xrplevm.org/)
* **Squid testnet bridge (XRPL → XRPL EVM)** — [testnet.xrpl.squidrouter.com](https://testnet.xrpl.squidrouter.com/)

If a public gas faucet is rate-limiting you, wait a few minutes and retry, or use one of the alternate endpoints listed in the docs above. The in-app **Get test tokens** mint for reserves has no cooldown.


# Fathom v3 (XDC)

What the v3 toggle in the PrimeFi app actually is, and where to get support.

The PrimeFi app header has a **v2 / v3** toggle. This page explains what **v3** means.

### TL;DR

* **v2 = PrimeFi.** Operated by Prime Numbers Labs on Base, HyperEVM and XDC. This is the protocol the rest of this documentation describes.
* **v3 = Fathom Lending.** A separate, third-party Aave v3 fork operated by **Fathom Protocol** on the XDC network. PrimeFi surfaces it inside our app as a convenience so users can access both markets from one interface, but **PrimeFi does not operate, custody or take responsibility for the v3 contracts**.

{% hint style="info" %}
For anything related to Fathom v3 (supply, borrow, collateral, health factor, liquidations, oracle questions, contract addresses, audits, support tickets), please use the official **Fathom Lending** documentation and support channels — not PrimeFi's.
{% endhint %}

### Fathom Lending — official resources

| What you need                        | Where to go                                                                                                                                                    |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Lending docs (root)**              | [docs.fathom.fi/lending](https://docs.fathom.fi/lending/)                                                                                                      |
| **XDC deployment & contract list**   | [docs.fathom.fi/lending/deployments/xdc-network](https://docs.fathom.fi/lending/deployments/xdc-network)                                                       |
| **How to supply / borrow / repay**   | [docs.fathom.fi/lending/user-guides/supply-borrow-repay-and-withdraw-asset](https://docs.fathom.fi/lending/user-guides/supply-borrow-repay-and-withdraw-asset) |
| **FXD stablecoin (related product)** | [docs.fathom.fi/fxd-stablecoin](https://docs.fathom.fi/fxd-stablecoin/)                                                                                        |
| **Fathom dApp**                      | [app.fathom.fi](https://app.fathom.fi/)                                                                                                                        |

### What's different between v2 and v3 inside the PrimeFi UI

| Feature                              | PrimeFi (v2)                                       | Fathom (v3)                                                |
| ------------------------------------ | -------------------------------------------------- | ---------------------------------------------------------- |
| Chains                               | Base, HyperEVM, XDC                                | XDC only                                                   |
| Underlying protocol                  | PrimeFi (Aave v2 fork + omnichain layer)           | Fathom Lending (Aave v3 fork)                              |
| Reserves                             | USDC, USDT, ETH, HYPE, WBTC, XDC, PSXDC, PRFI etc. | FXD, FTHM, WXDC and other Fathom reserves                  |
| pLP boost / PRFI emissions           | Yes (where chef is active — currently Base)        | **No** — Fathom has its own incentive model                |
| Cross-chain borrow (Stargate)        | Yes                                                | No                                                         |
| Auto-compound / vesting / locked pLP | Yes                                                | No                                                         |
| Prime Points eligibility             | Yes                                                | No                                                         |
| Smart contract operator              | Prime Numbers Labs                                 | Fathom Protocol                                            |
| Audits                               | See [Audits](/reference/audits)                    | Halborn Formal Verification (March 2026) — see Fathom docs |

### How to switch versions

Open the PrimeFi app, look at the header on the top right, and click the **v2 / v3** pill. The app will:

1. Update the active market and reserves list.
2. Switch your wallet to the appropriate chain (XDC for v3).
3. Hide PrimeFi-specific surfaces that don't apply to Fathom (pLP tabs, Prime Points, Flik, Prepaid Gas).

If you're on a PrimeFi-only page like `/plp` or `/prime-points` when you toggle to v3, the app will bounce you to the Dashboard.

### Contract addresses

* **PrimeFi v2 contracts** are documented under [Smart Contracts Addresses](/reference/smart-contracts-addresses).
* **Fathom v3 contracts** are listed in the [Fathom XDC deployment doc](/reference/smart-contracts-addresses/fathom-xdc-deployment-addresses), with the canonical source being [Fathom's own deployment page](https://docs.fathom.fi/lending/deployments/xdc-network).


# PRFI

Utility token

It is the official token of the entire Prime Numbers Labs ecosystem.

<figure><img src="/files/p6IxYpn4lGjWkAB9PS1H" alt=""><figcaption></figcaption></figure>

As a utility token, it will enable various interactions for each of the components that make up our ecosystem.

<figure><img src="/files/xc1x2OjNV29V6BQGYYF4" alt=""><figcaption></figcaption></figure>

If you want to learn more about the utilization of each part of the allocation, visit the official Prime Numbers Labs WhitePaper:

{% embed url="<https://docs.primenumbers.xyz/the-ecosystem/usdprfi-token/usdprfi-tokenomics>" %}

As we have mentioned, PRFI is at the core of our extensive ecosystem. Indeed, PRFI serves various functions and utilities depending on where you are. To learn more about it, visit:

{% embed url="<https://docs.primenumbers.xyz/the-ecosystem/usdprfi-token/usdprfi-use-cases>" %}


# PRFI Token Pools

#### 1. Regular pools

**Base**

* PRFI-ETH v4 (concentrated, fees only)\
  \
  (Note: The old v4 of Base no longer exists. The new v4 is not yet indexed, it will be added manually with an official link later.)

**HyperEVM**

* PRFI–HYPE on HyperSwap (concentrated, fees only)\
  Swap: <https://app.hyperswap.exchange/#/swap?inputCurrency=HYPE&outputCurrency=0x7bbcf1b600565ae023a1806ef637af4739de3255>\
  Dexscreener: <https://dexscreener.com/hyperevm/0x7bbcf1b600565ae023a1806ef637af4739de3255>

**XDC Network**

* PRFI-psXDC v3 Xswap (concentrated, fees only)\
  Geckoterminal: <https://www.geckoterminal.com/es/xdc/pools/0x2e45c4f9dca38911cb961e8041fd7c4bf76a0141>
* PRFI-wXDC v3 Xswap (concentrated, fees only)\
  Geckoterminal: <https://www.geckoterminal.com/es/xdc/pools/0x4f07ab51fa5eda6dc6c9a53b154f9f3cf6b647f5>

#### 2. pLP Pools

{% embed url="<https://docs.primefi.xyz/prime-liquidity-provider-plp/plp-pools>" %}


# PRFI NFTs

PRFI NFTs are yield-bearing collectibles on the **Base** network. Stake PRFI tokens inside your NFT to earn a share of the **100,000 PRFI monthly reward pool**, plus royalties and PrimeFi profits.

***

## Staking at a Glance

|                         |                                                                 |
| ----------------------- | --------------------------------------------------------------- |
| **Token staked**        | PRFI                                                            |
| **Monthly reward pool** | 100,000 PRFI distributed across all staked NFTs                 |
| **Additional rewards**  | NFT marketplace royalties + 40% of PrimeFi profits              |
| **Reward frequency**    | Monthly                                                         |
| **Max level**           | 20                                                              |
| **Merge system**        | Combine two same-rarity NFTs into a higher tier                 |
| **Marketplace**         | [OpenSea](https://opensea.io/collection/primenumbers-prfi-onft) |

Higher rarity = higher base multiplier = larger share of the monthly reward pool.

→ [Staking Mechanics](/rewards-and-tokens/prfi-staking-nfts/prfi-nfts-staking-mechanics) → [Reward System](/rewards-and-tokens/prfi-staking-nfts/prfi-nft-staking-reward-system)

***

## Deflationary by Design

Every merge **burns two NFTs** and mints one of higher rarity. The collection gets scarcer over time. Of the original 4,111 NFTs, only 2,333 were ever minted - and every merge reduces that number further.

***

## Collection

The PRFI NFT collection consists of 4,111 unique digital assets - 4,096 generative and 15 handcrafted. Each NFT combines artistic value with staking utility.

During the minting period, only 2,333 NFTs were minted (roughly half the supply), making the circulating collection inherently scarce.

<figure><img src="/files/VTNXhngDeADmzJhEisiw" alt=""><figcaption></figcaption></figure>

***

## Network & Marketplace

PRFI NFTs live on **Base** (Ethereum L2). They are omnichain-capable via LayerZero, meaning they can be bridged to other supported chains while preserving full staking state and reward history.

|                 |                                                                                          |
| --------------- | ---------------------------------------------------------------------------------------- |
| **Network**     | Base (Chain ID 8453)                                                                     |
| **Buy / Sell**  | [OpenSea - primenumbers-prfi-onft](https://opensea.io/collection/primenumbers-prfi-onft) |
| **Floor price** | Check on [OpenSea](https://opensea.io/collection/primenumbers-prfi-onft)                 |

***

## Smart Contract

|              |                                                                                     |
| ------------ | ----------------------------------------------------------------------------------- |
| **Contract** | `0x693A3A45Ff596024f844Be1cc6845d59F778dCF5`                                        |
| **Explorer** | [BaseScan](https://basescan.org/address/0x693a3a45ff596024f844be1cc6845d59f778dcf5) |
| **Standard** | ERC-721 (ONFT via LayerZero)                                                        |

***

## Handcrafted NFTs

The first 15 NFTs are handcrafted by [Olatz Diaz](https://olatzdiaz.com/), each representing one of the first 15 prime numbers. These one-of-a-kind artworks will never be minted again.

<figure><img src="/files/fp2s8JjU4ibgok6QOANp" alt=""><figcaption><p>Handmade Prime Numbers NFT #5</p></figcaption></figure>

***

## Generative NFTs

Each generative NFT is composed of five art elements:

* A prime number
* Sensual vegetation
* A geometric figure
* A feminine shape
* Futuristic background lines with complementary color fades

Prime numbers were generated sequentially at mint time, starting from the 16th up to the 4,111th prime number. Each is unique. The five art elements each have eight variations with different rarity levels, producing 8^5 = 32,768 possible combinations - far more than were ever minted.

<figure><img src="/files/eHiL2heF28UZS2uqpZdu" alt=""><figcaption></figcaption></figure>

***

## Rarity System

Each NFT's global rarity is determined by averaging the rarity scores of its five art elements (rounded up). The rarity tier sets the NFT's **base multiplier** for staking rewards.

**Example:**

* Vegetation: Mythic (7), Figure: Epic (5), Shape: Legendary (6), Lines: Rare (4), Background: Godly (8)
* Average: (7+5+6+4+8) / 5 = 6.0 → **Legendary**

<figure><img src="/files/eUnrElvSo2URWiMRWZoK" alt=""><figcaption></figcaption></figure>

Higher rarity = higher base multiplier = larger share of the monthly reward pool.


# Staking Design

The PRFI NFT Staking System is built on a fully upgradeable, omnichain architecture. This section covers how the system works, from a user perspective and from a technical perspective.

→ **User Overview** — how to stake, level up, merge, and withdraw your PRFI

→ **Technical Overview** — smart contract architecture, Diamond Standard, and LayerZero integration


# User Overview

**PRFI NFTs — Staking & Rewards**

PRFI NFTs let you earn a share of a monthly PRFI reward pool by staking PRFI tokens inside collectible NFTs. The more you stake and the rarer your NFT, the larger your share.

***

**How It Works**

1. **Get a PRFI NFT** — available on OpenSea (Base network)
2. **Stake PRFI into your NFT** — your NFT gains levels as your stake grows
3. **Earn monthly rewards** — your share is determined by your NFT's rarity and staked amount
4. **Claim anytime** — rewards are claimable on any supported chain
5. **Grow your position** — merge two same-rarity NFTs into a higher rarity for stronger multipliers

***

**Reward Pool**

100,000 PRFI distributed monthly across all staked NFTs.

Your share depends on two equal factors:

* **Rarity multiplier** — determined by your NFT's rarity tier (Common → Legendary)
* **Stake weight** — your staked PRFI × your rarity multiplier

This means both the quality of your NFT and the size of your stake matter. A high-rarity NFT with low stake and a low-rarity NFT with high stake can earn similar rewards.

***

**NFT Levels & Rarity**

Staking PRFI increases your NFT's level (up to level 20). Higher levels increase your reward weight.

Merging two NFTs of the same rarity produces a single NFT with higher rarity and a stronger multiplier. The merged NFTs are burned and a new NFT is minted — your combined stake carries over.

***

**Withdrawing PRFI**

There are three withdrawal paths:

**Fee-free surplus withdrawal** — if your staked PRFI exceeds 41,490 PRFI (the maximum level threshold), you can withdraw the surplus above that amount at 0% fee using the "Get Surplus" function. Your NFT level remains unchanged.

**Below-threshold withdrawal** — if you withdraw PRFI that reduces your stake below 41,490 PRFI, a 20% fee applies to the withdrawn amount. This fee is redistributed proportionally to all other stakers. To avoid this fee, use the surplus function first to reduce your position above the threshold before withdrawing further.

**Burn to redeem** — destroy your NFT to withdraw all staked PRFI instantly. No fee applies, but the NFT is permanently burned.

***

**Where to Get PRFI NFTs**

PRFI NFTs live on the Base network (Ethereum L2) and are tradeable on OpenSea.

→ Buy on OpenSea → Learn more about the technical architecture


# Technical Overview

The PRFI NFT Staking System uses a fully upgradeable, omnichain architecture built on the Diamond Standard (EIP-2535) and LayerZero. Users stake PRFI, level up NFTs, and earn rewards across chains.

***

## Architecture

All staking logic and NFT management are modularized into facets within a single proxy contract on the main chain:

| Facet         | Description                                           |
| ------------- | ----------------------------------------------------- |
| `ERC721Facet` | Core NFT logic: minting, burning, bridging, metadata  |
| `StakerFacet` | Staking engine: stake, merge, lock, rewards, claiming |
| `AdminFacet`  | Configuration, pausing, access control                |
| `GetterFacet` | Read-only data for frontend and integrations          |

***

## Omnichain NFT Support (ONFT)

NFTs are **omnichain** - they can be bridged between Base and other supported chains using LayerZero.

* All economic logic lives on the mainnet (single source of truth).
* Users interact from low-gas chains (e.g., Base).
* NFTs preserve full metadata and reward history when bridged.

A sidechain contract manages local NFT ownership and forwards user actions (stake, claim, withdraw, redeem) to the mainchain. The mainchain executes the logic and replies with confirmations.

***

## Staking Mechanics

* **Stake PRFI into your NFT** to begin earning rewards.
* **NFT Level** increases as stake crosses defined thresholds (up to level 20).
* **Rarity Multiplier** and **Level** combine into a **weight** that determines rewards.

### Reward Calculation

Rewards are distributed monthly and split into two equal buckets:

* **50%** based on the NFT's `multiplier` (rarity + level)
* **50%** based on `stake x weight` (multiplier x staked PRFI)

This ensures fair rewards for both quality (rarity) and quantity (stake commitment).

### Claiming

* Rewards are claimable on any chain.
* Calling `claim()` syncs missed distributions and updates the last claimed amount.
* High-precision math (`ABDKMathQuad`) ensures exact distribution.

### Merging

* Two NFTs of the same rarity can be merged into one with a higher rarity.
* The resulting NFT inherits the combined stake and an upgraded multiplier.
* Merged NFTs are burned; a new NFT is minted from a reserved ID range.

***

## Withdrawing & Redeeming

* **Partial withdrawal:** Remove a portion of staked PRFI (20% fee, redistributed to other holders).
* **Burn to redeem:** Destroy the NFT to withdraw all staked PRFI.
* Withdrawals are blocked during lock periods.

***

## Security

| Measure               | Detail                                                     |
| --------------------- | ---------------------------------------------------------- |
| **Diamond Standard**  | Facets can be added or upgraded without contract migration |
| **Reentrancy Guard**  | Prevents reentrancy attacks                                |
| **Pausable**          | Authorized roles can pause functions during incidents      |
| **Trusted Endpoints** | LayerZero messages restricted to trusted chains/contracts  |
| **On-chain**          | All data is auditable and fully deterministic              |

***

## Technical Parameters

| Parameter      | Value                                                         |
| -------------- | ------------------------------------------------------------- |
| Withdrawal fee | 20% (configurable)                                            |
| Max level      | 20                                                            |
| Rewards pool   | Funded via protocol earnings, royalties, and monthly airdrops |
| Storage        | NFT state replicated between chains via bridging              |


# Staking Mechanics

Stake PRFI tokens inside your NFT to earn rewards. The NFT's value and earning potential grow as it levels up.

***

## How It Works

### 1. Stake PRFI

Deposit PRFI tokens into your NFT. This increases the NFT's level and activates its reward multiplier.

### 2. Earn Rewards

Your NFT earns from multiple sources:

| Source                | Description                                             |
| --------------------- | ------------------------------------------------------- |
| **PRFI Rewards Pool** | 100,000 PRFI distributed monthly across all staked NFTs |
| **NFT Royalties**     | Share of PrimePort marketplace royalties                |
| **PrimeFi Profits**   | 40% of PrimeFi protocol profits                         |

### 3. Level Up

As you stake more PRFI, your NFT progresses through levels (1–20). Each level increases the **added multiplier**, boosting your share of the reward pool.

***

## Multiplier System

| Component            | Description                                 |
| -------------------- | ------------------------------------------- |
| **Base Multiplier**  | Set by the NFT's rarity tier (fixed)        |
| **Added Multiplier** | Increases as the NFT levels up (1–20)       |
| **Total Multiplier** | Base + Added - determines your reward share |

<figure><img src="/files/VTNXhngDeADmzJhEisiw" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/CIehcrjIBQ75cKcM1BvI" alt=""><figcaption></figcaption></figure>

***

## Interface Actions

| Action             | Description                                                                                                                         |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Stake**          | Deposit PRFI into the NFT to earn rewards and level up.                                                                             |
| **Get Surplus**    | Withdraw PRFI above 41,490 for free once the NFT reaches max level.                                                                 |
| **Burn to Redeem** | Destroy the NFT to withdraw all staked PRFI.                                                                                        |
| **Transfer**       | Move the NFT to another wallet.                                                                                                     |
| **Withdraw PRFI**  | Remove PRFI below the 41,490 threshold. A 20% fee applies, redistributed to other holders. Use **Get Surplus** first to avoid fees. |
| **Claim PRFI**     | Claim monthly rewards.                                                                                                              |
| **Sell**           | List or auction the NFT on [OpenSea](https://opensea.io/collection/primenumbers-prfi-onft) (Base).                                  |
| **Merge**          | Combine two same-rarity NFTs into a higher-rarity NFT.                                                                              |

***

## Growth

As your NFT levels up, it earns a progressively larger share of the reward pool. Rewards are available at the end of each month and contribute to the long-term value of your NFT.


# Reward System

PRFI NFT holders earn from three distinct reward sources.

***

## Reward Sources

### 1. PRFI Fixed Rewards (100,000 PRFI/month)

10M PRFI from the token allocation is dedicated to rewarding NFT holders. Each month, 100,000 PRFI is distributed across all staked NFTs.

### 2. NFT Royalties

NFT holders receive 50% of all PrimePort marketplace royalties on secondary sales. The royalty rate is 10%, meaning 5% of each sale price is distributed to all NFT holders.

### 3. PrimeFi Profits

PRFI NFTs receive 40% of PrimeFi lending and borrowing protocol profits.

{% hint style="info" %}
To be eligible for PrimeFi rewards, you need to lock your NFT on PrimeFi for a specified period.
{% endhint %}

***

## Reward Distribution Formula

Rewards are split into two equal portions:

### Part 1 - Based on Total Multiplier (50%)

Each NFT's share is proportional to its total multiplier relative to the sum of all multipliers:

$$
R\_{1,i} = \frac{Tx\_i}{T\_{total}} \times 50{,}000 \text{ PRFI}
$$

Where:

* `Tx_i` = Total multiplier of NFT *i* (rarity + level)
* `T_total` = Sum of all NFTs' total multipliers

### Part 2 - Based on Multiplier x Stake (50%)

Each NFT's share also accounts for how much PRFI is staked:

$$
R\_{2,i} = \frac{Tx\_i \times t\_i}{P\_{total}} \times 50{,}000 \text{ PRFI}
$$

Where:

* `t_i` = PRFI tokens staked in NFT *i*
* `P_total` = Sum of (multiplier x stake) across all NFTs

### Total Reward

$$
R\_i = R\_{1,i} + R\_{2,i} + \text{Extra Rewards share}
$$

Extra Rewards (royalties + PrimeFi profits) are distributed using the same proportional formulas.

***

## Summary

This dual approach ensures balanced reward distribution:

* **Part 1** rewards NFT quality (rarity and level).
* **Part 2** rewards staking commitment (multiplier x stake).

Both factors matter - a high-rarity NFT with a large stake earns the most.


# How to Buy a PRFI NFT

PRFI Staking NFTs are available on [**OpenSea**](https://opensea.io/collection/primenumbers-prfi-onft) on the **Base** network.

***

## Step 1 - Set Up Your Wallet

Ensure your wallet (e.g., MetaMask) is configured for the **Base** network. If not already set up, add Base as a custom network in your wallet settings:

| Field          | Value                      |
| -------------- | -------------------------- |
| Network name   | Base                       |
| RPC URL        | `https://mainnet.base.org` |
| Chain ID       | 8453                       |
| Currency       | ETH                        |
| Block explorer | `https://basescan.org`     |

## Step 2 - Fund Your Wallet

You need ETH on Base to cover the NFT price and gas fees. Bridge ETH from Ethereum mainnet to Base using the [Base Bridge](https://bridge.base.org) or a supported exchange.

## Step 3 - Browse the Collection

Go to the [PRFI NFT collection on OpenSea](https://opensea.io/collection/primenumbers-prfi-onft). Review each NFT's rarity, staking potential, and current price.

## Step 4 - Purchase

Connect your wallet to OpenSea, select the NFT you want, click **Buy**, and confirm the transaction. After confirmation, the NFT appears in your wallet and on the PrimeFi app.

***

## What's Next?

Once you own a PRFI NFT, go to [app.primefi.xyz/prfi-nfts](https://app.primefi.xyz/prfi-nfts/overview) to deposit PRFI and start earning rewards. See [Staking Mechanics](/rewards-and-tokens/prfi-staking-nfts/prfi-nfts-staking-mechanics) for a full guide.

***

## Additional Resources

{% embed url="<https://medium.primenumbers.xyz/how-to-buy-a-prnt-staking-nft-e0858e0e6e8c>" %}

{% embed url="<https://www.youtube.com/watch?v=g4xQC9PR7xw>" %}


# How to Buy PRFI

PRFI is the utility token of the Prime Numbers ecosystem. You need PRFI to stake inside PRFI NFTs.

***

## Step 1 - Choose an Exchange

PRFI is available on both decentralized exchanges (DEXs) and centralized exchanges (CEXs). Check [CoinGecko](https://www.coingecko.com/) or [CoinMarketCap](https://coinmarketcap.com/) to see current listings.

## Step 2 - Fund Your Account

If using a CEX, create an account (if needed), complete verification, and deposit funds. If using a DEX, ensure your wallet is funded on the correct network.

## Step 3 - Purchase PRFI

Search for PRFI on your exchange and select a trading pair (e.g., PRFI/USDT).

* **Limit order** - Set your price and wait for it to fill.
* **Market order** - Buy instantly at the current price.

## Step 4 - Transfer to Your Wallet

Move your PRFI tokens to your personal wallet for staking or safekeeping.

***

## Additional Resources

{% embed url="<https://medium.primenumbers.xyz/how-to-buy-prnt-90f8f06553f7>" %}

{% embed url="<https://www.youtube.com/watch?v=62S6_3efHm8>" %}


# How to Use the Platform

The PRFI NFT staking platform at [app.primefi.xyz/prfi-nfts](https://app.primefi.xyz/prfi-nfts/overview) is the central hub for managing your PRFI NFTs. From the platform, you can stake, merge, transfer, claim rewards, and more.

***

## Available Actions

| Action             | Description                                                                                     |
| ------------------ | ----------------------------------------------------------------------------------------------- |
| **Stake**          | Deposit PRFI into your NFT to start earning rewards                                             |
| **Merge**          | Combine two same-rarity NFTs into a higher-rarity NFT                                           |
| **Transfer**       | Move your NFT to another wallet                                                                 |
| **Claim**          | Claim your monthly PRFI rewards                                                                 |
| **Withdraw**       | Remove staked PRFI (20% fee)                                                                    |
| **Burn to Redeem** | Destroy the NFT and withdraw all staked PRFI                                                    |
| **Sell**           | List your NFT on [OpenSea](https://opensea.io/collection/primenumbers-prfi-onft) (Base network) |

***

## Resources

{% embed url="<https://medium.com/@PrimeNumbersFi/using-the-prime-numbers-staking-platform-29c0e46243d3>" %}


# PrimeFi Reward System


# Introduction

Overview

PrimeFi has been forged using components from leading lending protocols in the sector. Moreover, PrimeFi has introduced new and innovative systems through which users can acquire many more benefits than those distributed by other lending protocols.

### General User Rewards

**The first part comprises basic methods common to other protocols:**

* Rewards for liquidity providers (lenders)
* Rewards for liquidators

{% hint style="success" %}
Any general user of the protocol has access to these benefits.
{% endhint %}

### **Advanced** User Rewards

**The second part covers the unique ideation and innovation within the Prime Numbers Labs ecosystem. These include:**

* Prime Liquidity Provisioning (pLP) rewards
* Rewards for PRFI NFTs holders

{% hint style="info" %}
Please review the dedicated section for each user type within the PrimeFi rewards system.
{% endhint %}


# General User Rewards


# Lenders

## Rewards for lenders

pTokens holders enjoy continuous earnings that dynamically adjust to market conditions, driven by:

* Interest rate payments on loans: Suppliers participate in the interests paid by borrowers, proportional to the average borrow rate multiplied by the utilization rate. The higher the utilization of a reserve, the greater the yield for suppliers.

<figure><img src="/files/VbsUUV8OhaFCkRlYMvMf" alt="" width="563"><figcaption></figcaption></figure>

Each asset operates within its unique market of supply and demand, featuring its own Annual Percentage Yield (APY) that evolves over time.

To assess rate evolution, check the average annual rate over the past 30 days. Additionally, find comprehensive data on the reserve overview of each asset in the home section of the app.


# Liquidators

In the same way mentioned previously, any user can obtain the role of liquidator and receive the benefit of liquidating a position that meets the liquidation requirements.

## Rewards for liquidators

Liquidators can be individual users, automated bots, or smart contracts participating in the liquidation process to gain profits by acquiring assets at favorable prices.

Liquidation is a crucial component of lending and borrowing protocols as it contributes to the stability and security of the ecosystem by ensuring that obligations are met, and risks are effectively managed.

PrimeFi rewards liquidators with a fixed 7,5% liquidation bonus for the collateral asset liquidated.

<figure><img src="/files/RiukNbmhyuos3fLlKDO2" alt="" width="563"><figcaption></figcaption></figure>

### Examples

Bob lends 10 ETH and borrows USDT equivalent to 5 ETH. If Bob’s Health Factor drops below 1, his loan becomes eligible for liquidation.

A liquidator can repay up to 50% of the borrowed amount (2.5 ETH worth of USDT). In return, the liquidator receives a portion of the collateral in ETH with a 7.5% bonus. Thus, for repaying 2.5 ETH worth of USDT, the liquidator claims 2.6875 ETH (2.5 ETH + 0.1875 ETH bonus) as a reward.


# XDC NFT Holders

XDC NFT collection is one of the two main NFT collections created through Prime Numbers Labs.

This collection has the advantage of earning a percentage of the fees generated by users who use Prime Finance without the need to set up a lending position or liquidity pair besides other types of rewards within the ecosystem.

### Quantity to earn

The total amount that users owning an XDC NFT can earn will be fixed and correspond to 10% of the total user rewards. This percentage will be distributed to the holders of the NFTs.

The NFTs display:

* Different rarities based on minting
* Different levels based on the amount staked within the NFT.

{% hint style="info" %}
These are variables to consider for receiving higher or lower rewards.
{% endhint %}

### <mark style="color:red;">Time frame</mark>

The distribution of benefits will be on a monthly basis. As a user, you can choose:

**OPTION 1** (DOES NOT HAVE TO BE LIKE THIS)

1. Manually claim the rewards.
2. Auto-compound them by restarting the lock-up period.

**OPTION 2**

These benefits will be sent directly to the NFT."

### Meet conditions

Prime Numbers Labs considers the rewards shared with NFT holders to be of significant magnitude and expects them to grow even larger as the generated fees increase. Qualifying for these rewards requires certain actions from the user:

1. Own an XDC NFT.
2. Deposit the NFT with a lock-up period.

Prime Finance manages an anti-sniping process. This process aims to prevent users who appear just before the distribution of rewards and disappear afterward.

Therefore, even though the rewards will be distributed at the end of each month, the minimum lock-up period for the NFT will be 31 days.

{% hint style="success" %}
The conditions must be met to receive the benefits distributed by the protocol.
{% endhint %}

### Vesting rewards?

For more information, refer to the official Medium article:

{% embed url="<https://medium.com/@PrimeNumbersFi/xdc-staking-nft-mechanics-5db9fe6437a1>" %}


# Advanced User Rewards


# LP Provider Rewards

There is a possibility to go one step further, not only to earn fees generated from all active loans as a lender.

This situation arises when a lender locks at least 5% of their lend position in a liquidity pool, thus generating a concentrated liquidity token or pLP.

This token must undergo a locked staking process with various possible time frames. Locking the pLP generates rewards for the user in the form of PRFI emissions.

There are two ways to form the pLP position:

1. Borrow against lend deposit
2. Extra capital

Lock-up periods range from 30 to 360 days. Depending on the lock-up period, the interest on fee benefits will have a multiplier. Visit the following link for more information:

{% embed url="<https://app.gitbook.com/o/j7Qko0hTNGYSZrhxYdJe/s/o4SISzko0XTUUE5cJyPX/~/changes/56/prime-liquidity-provider-plp/maximum-apr-by-asset>" fullWidth="false" %}

### LP Actors

These two ways of forming a position create two types of users:

* **Primy LP Provider**\
  Lender + Borrower + LP Provider\
  Refers to users who, after making a deposit as lenders, want to become LP Providers and borrow the necessary assets from PrimeFi to create their LP position. These users will receive 100% of the 85% borrowing fees, as they act as both lenders (30%) and borrowers (70%). At the same time, they will be earning PRFI emissions.

<figure><img src="/files/CIUNNAF6JHWqKORJctW0" alt="" width="563"><figcaption></figcaption></figure>

* **Pure LP Provider**\
  Lender + LP Provider (adds 5% from their wallet without borrowing)\
  These are users who, after depositing in the protocol, add an additional 5% from their own wallet, allowing them to receive PRFI emissions without needing to borrow from the protocol.

<figure><img src="/files/f9gGsPg0yB1WU2tQtW30" alt="" width="563"><figcaption></figcaption></figure>


# PRFI NFT Holders Rewards

PRFI NFT collection is one of the two main NFT collections created through Prime Numbers Labs.

This collection has the advantage of earning a percentage of the fees generated by users who use PrimeFi without the need to set up a lending position or liquidity pair besides other types of rewards within the ecosystem.

### **Quantity to Earn**

The total amount that users owning a PRFI NFT can earn will be fixed and correspond to 40% of the total user rewards. This percentage will be distributed to the holders of the NFTs.

<figure><img src="/files/NTQbIQRPsYgQnKGVFInI" alt="" width="563"><figcaption></figcaption></figure>

The NFTs display:

* Different rarities based on minting.
* Different levels based on the amount staked within the NFT.

{% hint style="info" %}
These are variables to consider for receiving higher or lower rewards.
{% endhint %}

### **Time Frame**

The distribution of benefits will be on a monthly basis. As a user, you can choose:

1. Manually claim the rewards.
2. Auto-compound them by restarting the lock-up period.

### **Meeting Conditions**

Prime Numbers Labs expects rewards to increase grow even larger as the generated fees increase. Qualifying for these rewards requires certain actions from the user:

1. Own a PRFI NFT.
2. Deposit the NFT with a lock-up period.

PrimeFi manages an anti-sniping process, aiming to prevent users who appear just before the distribution of rewards and disappear afterward. Therefore, even though the rewards will be distributed at the end of each month, the minimum lock-up period for the NFT will be 31 days.

{% hint style="success" %}
The conditions must be met to receive the benefits distributed by the protocol.
{% endhint %}

To learn more about PRFI NFTs, see the [PRFI NFTs](/rewards-and-tokens/prfi-staking-nfts) section, including its [Staking Mechanics](/rewards-and-tokens/prfi-staking-nfts/prfi-nfts-staking-mechanics) and [Reward System](/rewards-and-tokens/prfi-staking-nfts/prfi-nft-staking-reward-system).


# Know Your Algorithm

PrimeFi Lending & Rewards Mechanics

### Introduction

PrimeFi is a decentralized finance platform that offers lending and borrowing services, modeled after Aave’s protocols, with additional reward incentives. Users can deposit cryptocurrency assets to earn yield and use deposits as collateral to borrow other assets. PrimeFi’s smart contracts implement algorithmic interest rate models (inspired by Aave) and a custom rewards distribution mechanism to incentivize participation. This documentation explains the core algorithms underlying PrimeFi’s lending and borrowing system, as well as its rewards mechanics, including how interest rates are determined, how yields are distributed, and the roles of the key contracts involved.\
\
**Algorithm Overview**

**Lending & Borrowing:** PrimeFi’s lending algorithm uses an over-collateralized model similar to Aave. Depositors receive **aTokens** (interest-bearing tokens) representing their stake, and borrowers can take loans against deposited collateral within defined limits. Interest rates are dynamic and adjust based on pool utilization. The system supports both **stable-rate** and **variable-rate** loans, allowing borrowers to lock in a rate or use a floating rate. Key on-chain logic ensures that each action (deposit, borrow, repay, withdraw) updates the reserve’s state and interest indices, maintaining an accurate accrual of interest over time. If a borrower’s collateral value falls too low (health factor drops below 1), the protocol flags the position for liquidation to protect solvency.

**Interest Rate Model:** PrimeFi’s interest rates are determined algorithmically by the utilization ratio (U) of each asset pool, mirroring Aave’s two-slope model. There is an **optimal utilization (U\<sub>optimal\</sub>)** target. When utilization is below this optimal threshold, the borrow rate increases gradually; when above, the rate steepens significantly. In formula terms: if *U ≤ U\<sub>optimal\</sub>* then *R\<sub>borrow\</sub> = R\<sub>0\</sub> + (U/U\<sub>optimal\</sub>)*×*Slope1*; if *U > U\<sub>optimal\</sub>* then *R\<sub>borrow\</sub> = R\<sub>0\</sub> + Slope1 + ((U – U\<sub>optimal\</sub>)/(1 – U\<sub>optimal\</sub>))*×*Slope2*. Here R\<sub>0\</sub> is the base rate when U=0, and Slope1/2 are configured parameters for the interest curve. This design keeps interest low when liquidity is ample (encouraging borrowing) and raises rates sharply as pools near full utilization (encouraging repayment and new deposits). Borrowers can choose stable rates (fixed based on a reference rate plus adjustments) or variable rates (floating with utilization), and can swap between them, with on-chain validation to prevent rate arbitrage abuse.

**Yield Distribution:** Lenders earn interest from borrowers’ payments. The **liquidity rate** (deposit APY) is derived from the borrow rates after accounting for a reserve factor (protocol fee). The smart contracts compute this each time a reserve’s state updates: essentially, lenders receive the weighted average borrow rate multiplied by the utilization, minus a cut for the protocol treasury. In code, the liquidity rate is calculated as:

> *LiquidityRate = OverallBorrowRate × Utilization × (1 – ReserveFactor)*,

Meaning nearly all interest paid by borrowers flows to depositors, while a small portion (the reserve factor) is set aside as protocol revenue.

**Rewards Mechanism:** Beyond interest, PrimeFi introduces a **PRFI token** rewards system to incentivize activity. The reward algorithm is implemented in a **ChefIncentivesController** contract. It treats each interest-bearing token (and potentially debt token) as a “pool” in a reward farm. Users accrue PRFI rewards proportional to their participation (e.g. the amount they have deposited or borrowed in each pool) and the allocation weight of that pool. PrimeFi’s reward controller emits PRFI at a fixed rate (which can be adjusted over time in emission schedules) and tracks, for each pool, an **accumulated reward per share** value. Whenever a user’s balance changes (deposit, withdraw, borrow, repay), the contract updates the pool’s accounting and the user’s pending rewards based on the formula:

> **pendingReward = user.amount × pool.accRewardPerShare – user.rewardDebt**

This ensures that each user earns rewards in real-time relative to their share of the pool’s liquidity. Rewards are not drawn from lender interest; instead, PRFI emissions are configured by the protocol (and can follow a schedule of rewards-per-second). Users can claim accumulated PRFI via the rewards distributor contracts.

**Advanced Incentives:** PrimeFi’s reward system includes additional mechanics to encourage long-term engagement and ecosystem participation. For example, **Prime Numbers NFTs integration** allows PRFI holders who stake tokens alongside Prime NFTs to receive a share of platform profits (40% of PrimeFi’s profit is shared with these stakers). The protocol uses an eligibility checker on-chain to enforce that only qualified users (e.g. those meeting certain staking or NFT criteria) receive the full rewards. Addresses that do not meet requirements can be flagged by a **BountyManager** and disqualified from reward accrual until they become eligible, ensuring that the profit-sharing benefits long-term supporters. (Notably, the fees shared with NFT holders come from the platform’s own income, not by reducing lender yields.) PrimeFi also provides an optional **Compounder** tool that automatically claims and reinvests rewards into the lending pool, optimizing users' yields over time.


# Key Components

**LendingPool:** The core contract orchestrating all lending and borrowing operations. It holds the state of each reserve (asset) and user configurations. Through `LendingPool`, users can deposit assets, withdraw collateral, borrow funds, repay loans, choose interest rate modes, and even perform flash loans. This contract delegates to the library logic for validations and interest calculations, and it updates the global state whenever actions occur. It ensures that actions are only executed when the pool is not paused and enforces the rules (e.g., checking collateral sufficiency when borrowing).

**LendingPoolAddressesProvider & Configurator:** These auxiliary contracts manage the addresses of PrimeFi’s components and enable the addition or configuration of new asset markets. The **AddressesProvider** holds references to the active LendingPool, price oracle, interest rate strategy contracts, etc., while the **LendingPoolConfigurator** (accessible only by admins) can initialize new reserves (deploying new aToken and debt token contracts for each asset) and tweak parameters. For example, when a new asset is listed, the configurator sets up its aToken, debt tokens, interest rate strategy, and links the incentives controller.

**aToken (Interest-Bearing Token):** For each supported asset, PrimeFi issues an ERC20-compliant **aToken** that represents a user’s deposit in that asset. The aToken balance grows in value as interest accrues – rather than increasing the token count, the aToken uses an internal index to track interest. When a user deposits, `LendingPool` mints aTokens to the user’s address at the current liquidity index. Conversely, when withdrawing, aTokens are burned. The aToken’s override of `balanceOf()` multiplies the holder’s underlying scaled balance by the latest interest index, so the balance reflects principal + earned interest. The aToken contract also directs actual underlying asset transfers; on deposit, the underlying is sent into the aToken contract (becoming pool liquidity), and on withdrawal or borrow, the aToken contract sends the underlying out. Each aToken is associated with a specific asset and is upgradable (via proxies) to allow future improvements.

**StableDebtToken & VariableDebtToken:** These tokens represent a borrower’s debt for each asset, in stable and variable rate mode respectively. They track the amount owed by borrowers. Like aTokens, debt tokens use an index system. A variable debt token’s balance scales up with accrued interest over time, using a **variable borrow index**, while a stable debt token records a fixed interest rate and accrues interest by increasing the total debt owed (not the token balance). When a user borrows, the LendingPool calls the debt token’s `mint()` to create debt tokens for the borrower, and when a loan is repaid, the debt tokens are burned accordingly. These tokens allow the system to account for interest on loans: at any point, a borrower’s debt token balance (principal + interest) represents their outstanding loan.

**Interest Rate Strategy:** Each reserve is linked to an **InterestRateStrategy** contract (specifically `DefaultReserveInterestRateStrategy`) that encapsulates the parameters for that asset’s interest model. This contract defines the asset’s optimal utilization (U\<sub>optimal\</sub>) and the slopes/base rates for stable and variable interest. Whenever a reserve’s state is updated (e.g. liquidity added or removed), the LendingPool calls the strategy to calculate new rates. The strategy computes the current variable borrow rate, stable borrow rate, and liquidity (deposit) rate based on the formulas described earlier (utilization and piecewise slopes). These rates are stored in the reserve’s state and applied until the next update. By adjusting strategy parameters per asset, PrimeFi can calibrate risk levels (for example, a volatile asset might have a lower U\<sub>optimal\</sub> or steeper rates to compensate for liquidity risk).

**Price Oracle:** To determine borrowers’ borrowing power and handle liquidations, PrimeFi uses price oracles (e.g. Chainlink feeds) for asset valuations. The **PriceOracle** (accessible via the AddressesProvider) provides up-to-date prices for each asset, which the LendingPool queries when users borrow or withdraw to ensure the user’s **Loan-to-Value (LTV)** and **health factor** remain in safe ranges. If an action would violate collateralization limits (e.g. withdrawing too much collateral or borrowing beyond the allowed LTV), the transaction is rejected by `ValidationLogic`. The oracle is also used in liquidation to determine whether a loan is under-collateralized and to calculate collateral amounts to seize.

**Collateral Manager (Liquidation)**: In the event a loan’s health factor falls below 1, a liquidation can be triggered. PrimeFi includes a collateral manager (similar to Aave’s) that allows liquidators to repay a portion of the unhealthy loan on behalf of the borrower and in return claim an equivalent value of the borrower’s collateral (plus a bonus). The LendingPool exposes a `liquidationCall` function (as in Aave) to facilitate this. This mechanism is an on-chain decision process ensuring bad debt is cleared: it checks the user’s configuration and debt, uses oracle prices, and enforces that only up to a certain close factor of the debt can be liquidated in one go. If liquidation occurs, the borrower’s aTokens are transferred to the liquidator (or burned to release underlying) and their debt is reduced accordingly.

**ChefIncentivesController (Reward Distributor):** This is the primary contract implementing PrimeFi’s reward distribution algorithm. It is called “Chef” because it is based on the MasterChef pattern. The Chef contract maintains data for each reward **pool** (which corresponds to a PrimeFi token that can earn rewards – typically each aToken and possibly debt tokens). Key data include each pool’s allocation points (relative weight in reward allocation) and the accumulated reward per share for that pool. It also stores each user’s info (staked amount and a `rewardDebt` for that pool). When rewards are emitted, each pool’s share is proportional to its allocPoint, and within a pool, users receive PRFI proportional to their share of the pool’s total supply. The Chef contract receives hook calls from aTokens and debt tokens on any balance changes (thanks to the `IAaveIncentivesController` interface integration) – this triggers the `handleActionAfter` function to update the user’s accrued rewards in that pool. Internally, it calculates the new `accRewardPerShare`, updates the user’s pending reward (adding any newly earned portion to a claimable balance), and updates the user’s stored `amount` and `rewardDebt` to the new values. This design means reward distribution is “real-time”: with each deposit, withdrawal, or transfer, the rewards are accounted for automatically. The ChefIncentivesController can be configured with a reward emission schedule (it supports setting varying `rewardsPerSecond` over time), and the PrimeFi team can adjust pool allocation points (e.g. to reward certain markets more). Only the authorized Pool Configurator can add new pools or change allocations, preserving security.

**MultiFeeDistribution & Fee Rewards:** To handle the distribution and claiming of reward tokens, PrimeFi uses a **MultiFeeDistribution (MFD)** contract (along with a **MiddleFeeDistribution** as an intermediary). The MFD acts as an aggregator that holds reward tokens and allows users to claim them, possibly with time locks or the option to stake for boosted rewards. The `MiddleFeeDistribution` contract, in particular, mints PRFI tokens and splits protocol earnings. According to its design, it “distributes fees to the platform and rewards to stakers”. When rewards are due, this module can mint the appropriate amount of PRFI (since `prfiToken` is `IMintableToken` here) and allocate it: a portion may go to an operations/treasury account (according to an expense ratio), and the rest to the MultiFeeDistribution for users. This is how PrimeFi funds the ongoing reward emissions (separate from the interest paid by borrowers). The MFD then allows users to claim their accrued base rewards (as calculated by the Chef controller) and may also handle any bonus distributions (like the NFT profit-share) in a unified interface. Notably, if users meet the criteria (e.g. holding Prime NFTs), they can receive additional reward streams via the same MFD contract, which consolidates **base lending rewards, fee profit-sharing, and other incentives** for the user.


# Operational Flow


# Deposit (Supply) Flow

#### Deposit (Supply) Flow

1. **User Deposits Collateral:** A user calls `deposit(asset, amount, onBehalfOf, referralCode)` on the LendingPool to supply an asset. The contract validates the deposit (e.g. amount > 0) and determines the corresponding aToken for that asset. It then updates the asset’s reserve state by accruing any pending interest: `updateState()` calculates how much interest has accumulated since last update and updates indices, also minting any protocol reserve interest to the treasury. Next, `updateInterestRates()` is called to recompute the new liquidity rate and borrow rates given the increased liquidity from this deposit. The underlying tokens are then transferred from the user into the aToken contract (using `safeTransferFrom`). The user receives aToken balance minted via `aToken.mint(onBehalfOf, amount, currentLiquidityIndex)`. If the user had no prior aToken balance, their deposit is now marked as collateral by default (making it available to borrow against). The result: the user holds aTokens, and the pool’s available liquidity increases by the deposit. The transaction emits a `Deposit` event recording the action. From now on, the user’s aTokens will increase in value as interest accrues (reflected by the growing liquidity index).
2. **Earning Interest:** Once deposited, interest begins accruing for the supplier. Interest is earned continuously based on the borrowing activity in that asset’s reserve. Technically, the accrual is applied by updating the reserve’s `liquidityIndex` over time: each time someone interacts with that reserve (deposit, withdraw, borrow, repay, etc.), the `updateState()` function uses the time elapsed and current rates to compound the index. A value of liquidityIndex > 1 indicates growth (e.g. 1.05 means a 5% gain has accumulated). The user’s **aToken balance** stays constant in token units, but when they withdraw or check balance, the index is applied to compute the *actual* amount of underlying asset they can redeem. For example, if a user deposited 100 USDC when the index was 1.0, they got 100 aUSDC. If the index rises to 1.1 (10% interest accrued) by the time they withdraw, their 100 aUSDC allows them to withdraw 110 USDC (100 \* 1.1). This mechanism spreads the interest earned by borrowers to all depositors fairly, proportional to their share of the pool.
3. **Rewards Accrual for Lender:** When the user deposited, the incentives controller was notified. The aToken’s internal logic calls `ChefIncentivesController.handleActionAfter(user, newBalance, totalSupply)` during the mint/transfer. The Chef controller updates the reward pool for that aToken address: it calculates any pending PRFI reward for the user and resets the user’s `rewardDebt` to match the new balance. From this point on, as long as the user holds the aToken, they will continue accumulating PRFI rewards each second. The global reward for the aToken pool increases over time (based on its allocation weight and the PRFI emission rate), and when other users deposit or withdraw, the relative shares update accordingly. The user can later claim their accumulated PRFI via the MultiFeeDistribution contract (which may allow direct claim or require locking, depending on PrimeFi’s settings). This reward is in addition to the interest APY the user earns from lending.


# Borrowing Flow

#### Borrowing Flow

1. **User Borrows an Asset:** A user who has supplied collateral can initiate a borrow by calling `borrow(asset, amount, interestRateMode, referralCode, onBehalfOf)` on the LendingPool. The protocol first checks the user’s borrowing power by summing the value of the user’s collateral deposits and comparing it against current and new debt using the asset’s loan-to-value (LTV) ratios and the oracle prices. The `ValidationLogic.validateBorrow` ensures the new borrow won’t exceed the user’s allowed credit or push the health factor below 1. If the borrow is valid, the reserve’s state is updated: accrued interest is added to indexes (`updateState()`), and the user’s chosen rate mode is handled.
2. **Stable vs Variable Rate Selection:** The `interestRateMode` parameter lets the borrower choose a **stable rate** loan or a **variable rate** loan. If a **stable** rate is requested, the LendingPool will fetch the current stable borrow rate for the asset (which is influenced by a stable rate oracle and the reserve’s configuration). That rate is locked in for the user at borrow time (though the protocol can re-balance or update stable rates if certain conditions change drastically). If **variable** rate is chosen, the user’s interest will fluctuate based on the ongoing variable rate (which can change with utilization). In either case, the LendingPool mints debt tokens to represent the debt: for stable, it calls `StableDebtToken.mint()` which records the user’s loan with the fixed rate; for variable, it calls `VariableDebtToken.mint()` with the current variable index. The boolean return from these functions indicates if this is a new borrowing position for the user (first time borrowing this asset); if so, the user’s configuration is updated to mark that they have a debt in this reserve.
3. **Loan Funds Delivered:** After updating debt records, the LendingPool adjusts the reserve’s interest rates because liquidity has been taken out (liquidity decreases, utilization increases). It calls `reserve.updateInterestRates(asset, aToken, 0, amountBorrowed)` to apply a “liquidityTaken” change. This will typically raise the borrow APRs and deposit APY for that asset given the higher utilization. Finally, if `releaseUnderlying` is true (normal case), the LendingPool instructs the aToken contract to transfer the borrowed underlying asset to the user’s address (the borrower). The user now receives the borrowed funds in their wallet, and an event `Borrow` is emitted logging the details (asset, amount, rate mode, interest rate, etc.).
4. **During the Loan – Interest Accrual:** As time passes, the borrower’s debt grows according to the interest rate. For a variable loan, the variable borrow index for that reserve will increase each second based on the variable borrow rate; the borrower’s `VariableDebtToken` balance effectively accrues interest. For a stable loan, interest accrual is tracked separately (the stable rate is added to the total debt but the token balance might remain nominally the same – the difference is accounted when repaying). The reserve’s `currentVariableBorrowRate` and `currentStableBorrowRate` are continuously updated on any liquidity events. The **LendingPool’s accounting ensures interest is accrued to the system**: e.g., when any user interacts, `updateState()` will calculate interest on all outstanding variable debt using a linear interest formula since last update and update the debt index. This accumulated interest is factored into the pool’s liquidity index and the debt token indexes so that neither lenders nor the protocol lose track of the accruing interest.
5. **Rewards Accrual for Borrower:** Borrowers can also be incentivized with PRFI rewards. In PrimeFi, the debt tokens can be configured as reward-bearing “pools” just like aTokens. If the PrimeFi team enabled incentives for borrowing, the `ChefIncentivesController` will also track balances of stable and variable debt tokens. When the user took the loan, the corresponding debt token contract would trigger the incentive controller’s update hook (similar to aToken) to record the user’s new debt balance for rewards. This means the borrower could earn PRFI for maintaining an active loan (this is a tool to encourage borrowing activity or certain assets’ utilization). The reward calculation uses the same formula (user’s debt amount as share of that debt token’s total supply). Not all markets or modes may be rewarded equally – allocation points can differ – but the system has the flexibility to reward both sides of the market. The rationale is to bootstrap liquidity: sometimes protocols reward borrowers to encourage demand on the platform. If the borrower closes the loan, the debt tokens are burned and the incentive controller updates their reward accrual one final time.


# Repay and Withdraw Flow

#### Repay and Withdraw Flow

* **Repaying a Loan:** A borrower (or anyone on their behalf) can repay a loan by calling `repay(asset, amount, rateMode, onBehalfOf)`. The contract checks the user’s outstanding stable and variable debt for that asset. If `amount` is set to `type(uint256).max`, it will repay the full outstanding amount. The appropriate debt token contract is then invoked to burn the debt tokens equal to the repaid amount (reducing the borrower’s recorded debt). The reserve state is updated for interest accrual before and after this operation – repaying increases available liquidity, so `updateState()` and `updateInterestRates()` are called with `liquidityAdded = amountRepaid`, which will typically lower borrow rates and liquidity rate slightly. The actual asset tokens are transferred from the payer to the aToken contract (essentially returning liquidity to the pool). Finally, `aToken.handleRepayment()` is called – this might trigger any internal accounting needed on the aToken side (for Aave, this was used to redirect interest to the right places). A `Repay` event is emitted with the repaid amount. After repayment, the user’s health factor improves (since debt is reduced). If the loan is fully repaid (`remainingDebt == 0`), the user’s configuration is updated to mark they are no longer borrowing that asset. Repaying also triggers the incentives controller update via the debt token burn: the borrower’s reward accrual for that debt token pool will be updated (their debt balance goes down, so their share of future rewards is lower, but they keep any PRFI accrued so far).
* **Withdrawing Collateral:** A user can withdraw their deposited asset by calling `withdraw(asset, amount, to)`. If the amount is set to `max`, the user’s entire aToken balance for that asset will be withdrawn. The protocol first checks that after withdrawal, the user’s remaining collateral can still cover their current borrowings (if any) – this uses the oracle to ensure the user’s health factor stays ≥ 1. If the withdrawal would make the loan under-collateralized, it is rejected by `ValidationLogic.validateWithdraw`. Upon a valid withdrawal, the reserve is updated for interest (accrue up to current time) and interest rates are adjusted with `liquidityTaken = amountWithdrawn` (since liquidity is leaving the pool). If the user is withdrawing their full balance, the protocol also marks that asset as no longer being used as collateral in the user’s config (since they’ll have zero aTokens left). The aToken `burn()` function is then called to burn the user’s aTokens and transfer the corresponding underlying asset out to the specified address (the user’s wallet or another address they choose). A `Withdraw` event is emitted with the amount. This process effectively redeems the user’s underlying, including any interest earned (because the aTokens burned are valued with the latest liquidity index). From the rewards perspective, the aToken burn triggers the incentives controller to update the user’s balance in that reward pool. If the user fully exits, their `amount` in the Chef controller for that pool becomes 0, but any pending rewards they had earned remain available to claim (the system will not erase accrued rewards even if balance goes to zero). Thus, a user can withdraw and later still claim the PRFI tokens they accrued while they were supplying.


# Liquidation Flow (Brief)

#### Liquidation Flow (Brief)

If a borrower’s position becomes under-collateralized (health factor falls below 1.0 due to asset price changes or accrued interest), it enters a state where liquidation is possible. A liquidator (an external actor) can call the `liquidationCall()` on the LendingPool, specifying the target borrower, the debt asset to repay, and the collateral to seize. PrimeFi’s liquidation logic (largely inherited from Aave’s) will allow up to a certain portion of the outstanding debt (e.g. 50%, defined by close factor) to be repaid. The liquidator must provide the debt asset (plus a liquidation bonus, e.g. 5-10% extra, which incentivizes liquidators) which goes to repay the borrower’s debt. In return, the liquidator receives a corresponding amount of the borrower’s collateral asset, discounted by the bonus. Under the hood, the borrower’s debt tokens are burned for the forgiven portion, and their aTokens (or underlying collateral) are transferred to the liquidator. The result is that the borrower’s debt is partially cleared and their collateral is reduced. This brings the account back to a safer state (health factor above 1) or, if fully liquidated, closes the loan. The LendingPool enforces all the rules (using price oracles, collateral limits, and bonus rates) to ensure fairness. Liquidation events are critical on-chain decisions to manage risk; they do not rely on any off-chain trigger aside from price feeds. PrimeFi’s contracts emit events when liquidations occur, and the AddressesProvider’s emergency admin could pause the protocol in extreme conditions to halt liquidations if the oracle prices were compromised.


# Cross-Chain and Additional Features

#### Cross-Chain and Additional Features

PrimeFi is designed with multi-chain support via LayerZero, which means liquidity and rewards can operate across different networks. The **RewardDistributionController** (RDC) works in tandem with the ChefIncentivesController to synchronize reward accounting on the main chain and sidechains. Essentially, local Chef contracts handle per-chain accrual, and the RDC aggregates information like total supply per chain and ensures that users moving assets between chains get consistent rewards. It uses LayerZero messaging (OApp) to communicate actions across chains and maintain a global view of protocol usage. For users, this complexity is behind the scenes – they simply supply, borrow, and earn rewards on their chain of choice. The PrimeFi architecture also includes features like the **Looper** (an automation tool that can, for example, recycle borrowed WETH into another product called FLIK in a single step) and integrations with the **Prime Numbers NFT** ecosystem as discussed. These components expand the utility of the core lending algorithm by creating synergy between lending and other DeFi activities (yield farming, NFT staking, etc.), while the underlying algorithm remains grounded in well-audited Aave logic.


# Risks & Assumptions

**Collateral Assumptions:** PrimeFi assumes all loans are over-collateralized. Each asset has risk parameters (LTV, liquidation threshold, liquidation bonus) configured by governance or the team. The proper functioning of the algorithm depends on these parameters being set conservatively to account for volatility. If an asset’s value drops rapidly, the protocol relies on timely oracle updates and liquidators to stabilize the system. A key risk is oracle failure or delay – inaccurate prices could prevent or trigger wrongful liquidations. To mitigate this, PrimeFi likely uses robust oracles (Chainlink) and has an emergency admin who can pause markets if needed. Users are assumed to understand that borrowing carries liquidation risk and that maintaining a buffer above minimum collateral is prudent.

**Interest Rate Model Limits:** The two-slope interest model is designed to keep utilization below 100%, but in edge cases (e.g. sudden liquidity withdrawal or no liquidity for an asset), utilization could hit 100% and rates would max out. The algorithm assumes that such extreme rates will attract corrective action (either new deposits because of high APY or repayments because of expensive debt). There is a constraint that the model cannot exceed certain rates (and the smart contract uses Ray math with finite precision), so extremely high utilization should be temporary. The platform also sets a maximum stable borrow rate portion (in the LendingPool initialization, e.g. 25% of liquidity can be taken at stable rate by default) to ensure not all liquidity is locked at stable rates, maintaining some flexibility in the pool.

**Reserve Factor and Treasury:** A small portion of interest (governed by `reserveFactor`) is diverted as protocol revenue. This is assumed to be managed or re-distributed by PrimeFi (for example, it could fund the NFT profit sharing or other rewards). The reserve factor reduces lender APY slightly, but is important for the protocol’s sustainability. It’s assumed that this factor is set to a reasonable value (e.g. 10% or less) so that lender incentives remain strong. Changes to the reserve factor or interest model would require contract upgrades or governance actions.

**Rewards Distribution Assumptions:** The PRFI reward emission schedule and allocation points are set by PrimeFi and can be adjusted. The algorithm’s security assumes that the ChefIncentivesController is only operated by authorized accounts (it has owner and pool configurator restrictions). Users can trust that the reward parameters (emission rate, pool weights) won’t be arbitrarily changed without notice. However, inflationary rewards carry economic risk: the value of PRFI tokens could fluctuate, and high emissions could lead to fast token inflation. PrimeFi mitigates this by using time-based emission schedules (which can decrease over time or be adjusted) and by introducing locking mechanisms (the MultiFeeDistribution may encourage users to lock rewards for boosted yields, reducing immediate sell pressure).

**Eligibility and Gaming Prevention:** The presence of an eligibility check and disqualification system in the rewards controller indicates an assumption that some users might try to game the system (for example, Sybil addresses not holding required NFTs or attempting to farm rewards without “qualifying”). PrimeFi’s contracts assume that the off-chain or on-chain criteria (like NFT ownership, KYC, or other requirements managed by `IEligibilityDataProvider`) are correctly maintained and updated. If a user is disqualified, the system will stop their rewards – there is an implicit trust that the disqualification process is fair and that re-qualification is possible when criteria are met. A **BountyManager** may be in place to reward those who catch abuse or to handle the slashing of disqualified accounts, which suggests an additional assumption that community monitoring is part of security. Users should be aware that certain behaviors (like immediately selling all earned tokens or moving funds in a way that violates terms) might lead to loss of future rewards.

**Smart Contract Risk:** PrimeFi’s contracts are upgradeable (using proxy patterns as seen with the `VersionedInitializable` base). This allows improvements but also means users trust the PrimeFi team or governance not to introduce malicious changes. The algorithm described assumes the contracts behave as coded in the audited version (largely inherited from Aave for core functions, which is a positive sign). Any upgrades should be carefully reviewed by the community. There is also the general risk of smart contract bugs – e.g., a logic error in the interest calculation or reward distribution could cause fund misallocation. PrimeFi mitigates this by using battle-tested Aave code for lending and by presumably auditing the newer components (rewards, NFT integration). Nonetheless, users should only supply funds they can afford to lock and should keep an eye on platform announcements.

In summary, PrimeFi’s algorithm stands on the robust foundation of Aave’s money market design, enhanced with a multi-chain reward system. The design assumptions (reliable oracles, rational economic responses to rates, honest reward parameters) align with industry standards for DeFi protocols. Understanding these mechanics and risks – interest rate fluctuations, collateral requirements, and the nuances of the rewards system – is crucial for developers and advanced users to engage safely with PrimeFi’s platform. By adhering to these algorithmic rules and risk frameworks, PrimeFi aims to sustainably blend lending yields with incentive-driven growth, providing an innovative yet secure DeFi experience.


# Strategies


# XDC Network


# PrimeFi Strategies on XDC (USDC, XDC, psXDC)

> ⚠️ **Important Disclaimer – Not Financial Advice**\
> The content in this section is for **informational and educational purposes only**.\
> Nothing here is investment, trading, legal, tax, or financial advice.\
> Using leverage, borrowing, liquid staking, or DeFi protocols can result in **partial or total loss of funds**.\
> Always do your own research and consult qualified professionals before making financial decisions.

This strategy section focuses on using **PrimeFi** (`app.primefi.xyz`) on the **XDC Network** with three core assets:

* **XDC** – Native, volatile token of the XDC blockchain.
* **psXDC** – Liquid‑staked XDC (from PrimeStaking) that accrues staking rewards from masternodes.
* **USDC** – USD‑pegged stablecoin used for collateral, borrowing, and treasury management.

We group strategies into three risk buckets:

1. **Conservative** – No leverage, no liquidation risk.
2. **Moderate** – Borrowing without recursive leverage.
3. **Aggressive** – Leveraged looping strategies (advanced, high risk).

These are **conceptual playbooks**, not recommendations.


# PrimeFi Basics on XDC

> ⚠️ **Reminder – Not Financial Advice**\
> The following is an operational description of PrimeFi, not advice to use it.

Before we talk about strategies, it helps to understand how PrimeFi behaves at a high level.

### Core Concepts

* When you **deposit** an asset on PrimeFi (XDC, psXDC, USDC, etc.), you receive an interest‑bearing token\
  (for example, `pUSDC` or `ppsXDC`).
* **Borrowers** pay interest; **depositors** earn interest.
* Some markets are additionally incentivized with **PRFI** rewards, which boost deposit or borrow APYs.
* **psXDC** is a liquid‑staking token representing staked XDC:
  * It accrues staking rewards from masternodes.
  * When deposited into PrimeFi, psXDC can earn both staking yield and protocol incentives.
* **pLP** (Prime Liquidity Provider token):
  * Locking pLP up to a certain threshold (e.g., around 5% of your deposit’s USD value) can unlock **extra emissions** on your deposits and borrows.

### Health Factor & Liquidation

PrimeFi uses a **Health Factor (HF)** to track how safe your borrowing position is.

* **HF > 1** → Position is healthy (not liquidatable at that moment).
* **HF ≤ 1** → Position can be liquidated by others.

In practice:

* A **higher HF = more safety buffer**.
* For example, many users aim for **HF ≥ 1.7–2.5** on leveraged positions to survive normal volatility.

If collateral prices fall or borrow amounts grow (through interest), HF decreases. If it drops too much, your collateral can be liquidated at a discount to repay your debt.

### Risk Buckets

We refer to three broad categories:

* **Conservative**
  * No borrowing.
  * No liquidation risk.
  * Main risks: protocol risk, smart contract risk, asset price risk.
* **Moderate**
  * Borrowing without recursive loops.
  * Liquidation risk exists but is easier to manage if LTV is low and HF is high.
* **Aggressive**
  * Leveraged looping and more complex structures.
  * High liquidation risk, sensitive to APR changes, only for advanced users.

All strategies in the following pages sit somewhere in these three buckets.


# Conservative Strategies (No Borrowing)

> ⚠️ **Reminder – Not Financial Advice**\
> These examples describe *how* one could use PrimeFi conservatively.\
> They are not recommendations or guarantees of safety.

Conservative strategies **do not use borrowing**.\
You cannot be liquidated because you are not taking debt.\
Main risks are protocol risk, smart contract risk, and asset price risk.

***

### 1. “Set‑and‑Forget” psXDC Yield Stack

**Goal:** Capture XDC staking yield plus protocol incentives without leverage.

**Assets used:** XDC → psXDC

**Conceptual steps:**

1. Stake XDC using **PrimeStaking** (or equivalent) to receive **psXDC**.
2. Deposit psXDC into **PrimeFi** and receive interest‑bearing `ppsXDC`.
3. Optionally lock **pLP** (PrimeFi’s liquidity token) so your psXDC deposit qualifies for **PRFI incentives**, if available.

**Return drivers (qualitative):**

* XDC staking yield embedded in psXDC.
* PrimeFi deposit APY (if any) from borrowers.
* PRFI emissions and/or pLP‑related rewards.

**Risks:**

* XDC price volatility (you are long XDC).
* PrimeFi protocol and smart contract risk.

***

### 2. USDC “Parking Lot”

**Goal:** Park stablecoin liquidity with relatively low volatility risk.

**Assets used:** USDC

**Conceptual steps:**

1. Deposit **USDC** into PrimeFi.
2. Optionally lock some **pLP** to boost deposit APY if the UI shows meaningful extra rewards.

**Return drivers:**

* Base USDC deposit APY (interest from borrowers).
* PRFI + pLP incentives, depending on current configuration.

**Risks:**

* USDC de‑peg risk (generally low but non‑zero).
* PrimeFi protocol risk and smart contract risk.

***

### 3. 50/50 Treasury Base (psXDC + USDC)

**Goal:** Blend yield (psXDC) with stability (USDC) without borrowing.

**Assets used:** psXDC, USDC

**Conceptual steps:**

1. Allocate a fraction of your holdings to **psXDC** for yield.
2. Allocate the remaining fraction to **USDC** for stability / dry powder.
3. Deposit both into PrimeFi as suppliers.
4. Use one **pLP** position (if desired) to activate emissions on both assets.

**Why this can be useful:**

* psXDC side captures staking yield and any additional incentives.
* USDC side stabilizes the treasury and can be redeployed quickly.
* Still no liquidation risk, because no borrowing is used.


# Moderate Strategies (Borrowing Without Looping)

> ⚠️ **Important – Borrowing Introduces Liquidation Risk**\
> These strategies use **debt**. If the value of your collateral falls or borrow APRs rise,\
> your Health Factor can drop and your position can be liquidated.\
> This is not financial advice; use at your own risk.

Moderate strategies involve **borrowing once** (or a few times) but do **not** recursively loop collateral and debt.

***

### 1. Borrow USDC Against psXDC (Stay Long XDC)

**Goal:** Obtain USDC liquidity without selling XDC, while earning psXDC yield.

**Assets:** psXDC as collateral, USDC as debt

**Conceptual steps:**

1. Stake XDC → receive **psXDC**.
2. Deposit psXDC into PrimeFi as collateral.
3. Borrow **USDC** against psXDC:
   * Target a conservative **LTV** so that **Health Factor ≥ \~2.0** (or higher for more safety).
4. Use borrowed USDC for off‑protocol needs or other on‑chain strategies.

**Economic intuition:**

* psXDC collateral earns staking yield and protocol incentives.
* You pay USDC borrow APR on your debt.
* Rough “carry” on your equity ≈\
  `psXDC effective APY − (LTV × USDC borrow APR)`

**Risks:**

* XDC price drops → psXDC value falls → HF decreases → possible liquidation.
* USDC borrow APR may spike during high utilization.
* Protocol and smart contract risk.

***

### 2. USDC Collateral → Borrow XDC → Stake to psXDC

**Goal:** Increase XDC exposure while keeping USDC as base collateral.

**Assets:** USDC as collateral; XDC and psXDC on the position side.

**Conceptual steps:**

1. Deposit **USDC** as collateral on PrimeFi.
2. Borrow **XDC** at a conservative LTV (HF ≥ \~2.0 recommended).
3. Stake borrowed XDC via PrimeStaking → receive **psXDC**.
4. Optional: deposit psXDC back into PrimeFi to earn yield.

**Interpretation:**

* You are effectively **long XDC and short USDC**, with psXDC yield on the XDC side.
* Profitable if XDC holds or goes up and psXDC yield exceeds XDC borrow costs over your time horizon.

**Risks:**

* XDC price can fall quickly, pushing HF toward liquidation.
* XDC borrow APR can change over time.
* Protocol and smart contract risk.

***

### 3. psXDC Collateral → Borrow XDC for Operations

**Goal:** Unlock XDC gas/liquidity without selling long‑term psXDC holdings.

**Assets:** psXDC as collateral, XDC as debt.

**Conceptual steps:**

1. Deposit **psXDC** as collateral on PrimeFi.
2. Borrow **XDC** up to a moderate LTV.
3. Use borrowed XDC to:
   * Pay gas and operational expenses,
   * Provide liquidity on DEXes,
   * Hedge, or
   * Partially unwind XDC exposure.

Because psXDC and XDC prices are closely linked, collateral and debt move together, which can make HF somewhat more stable—but you are still exposed to volatility and must manage risk.


# Aggressive Strategies (Leveraged Loops)

> ⚠️ **High Risk – Advanced Users Only**\
> The strategies on this page involve **leveraged looping**.\
> They can amplify both gains and losses and are highly sensitive to APR changes,\
> coverage ratios, and price volatility. Liquidation can happen quickly.\
> This is not financial advice. Only consider these if you fully understand the risks.

***

### 1. Looping Math (Intuition Only)

To reason about loops, it helps to define:

* `c` = target collateral ratio (LTV as a fraction, e.g. 0.6).
* `L = 1 / (1 − c)` = effective leverage on **supplied** assets.
* `B = c / (1 − c)` = effective leverage on **borrowed** assets.
* `Ydep` = deposit APY (e.g. psXDC effective APY).
* `Yb` = borrow APR on the asset you are borrowing.

**Break‑even condition** for a simple loop:

> `Ydep > c × Yb`

**Approximate net APY on equity:**

> `Ynet ≈ (L × Ydep) − (B × Yb)`

These expressions are simplified and ignore path‑dependent effects, liquidation risk, and APR volatility, but they are useful for intuition.

***

### 2. psXDC Same‑Asset Loop

**Goal:** Lever up on psXDC yield by borrowing psXDC against psXDC.

**Conceptual steps:**

1. Deposit **psXDC** as collateral.
2. Borrow **psXDC**.
3. Deposit the borrowed psXDC back into PrimeFi.
4. Repeat until you reach a target HF or desired leverage.

**Why this is often&#x20;*****not*****&#x20;optimal:**

* Each loop increases psXDC utilization, which may **push psXDC borrow APR up**.
* The **coverage ratio** between psXDC and underlying staked XDC can fall, reducing effective yield.
* In many realistic cases, same‑asset psXDC looping produces **negative** net APY once you factor in borrowing costs and dilution.

This kind of loop should only be considered when:

* psXDC deposit APY is **clearly higher** than `c × psXDC borrow APR`,
* You are prepared to watch HF and rates very closely, and
* You fully accept the risk of fast liquidation.

***

### 3. psXDC → Borrow XDC → Stake → psXDC (Cross‑Asset Loop)

Often more interesting than same‑asset loops when conditions are right.

**Goal:** Leverage psXDC staking yield using **XDC as the borrowed asset**.

**Conceptual steps:**

1. Deposit **psXDC** as collateral.
2. Borrow **XDC** at some target LTV.
3. Stake the borrowed XDC using PrimeStaking → receive **new psXDC**.
4. Deposit that psXDC into PrimeFi.
5. Optionally repeat (loop) several times, each time watching HF and APRs.

**When this can make sense:**

* psXDC effective APY (staking + incentives) is **significantly greater** than\
  `(collateral ratio × XDC borrow APR)`.
* XDC borrowing is relatively cheap and psXDC incentives are strong.

**Key risks:**

* XDC price volatility (big drops can rapidly compress HF).
* XDC borrow APR may spike if utilization increases.
* psXDC coverage ratio changes can reduce yield for everyone, including you.
* Complexification of your risk: more steps, more things to watch.

***

### 4. USDC + psXDC Barbell Loop

**Goal:** Combine stable capital (USDC) and leveraged psXDC yield.

**Conceptual structure:**

1. Deposit both **USDC** and **psXDC** on PrimeFi.
2. Use psXDC as the main collateral source.
3. Borrow **USDC**.
4. Convert part of borrowed USDC → XDC → psXDC and deposit it.
5. Keep the rest of borrowed USDC as **liquid safety** to repay debt fast if necessary.

This creates a “barbell”:

* One side: **leveraged psXDC yield**.
* Other side: **USDC liquidity** available to repair Health Factor or use elsewhere.

Because of the complexity and tail‑risk nature of this structure, it should be limited to a **small, high‑risk sleeve** of capital, if used at all.


# Liquidations as a Strategy (Advanced)

> ⚠️ **Professional-Level Risk**\
> Acting as a liquidator is a specialized role.\
> Mistakes can lead to losses due to slippage, gas costs, or bugs.\
> This section is descriptive, not a recommendation.

Many lending protocols, including PrimeFi‑style designs, reward **liquidators** with a **bonus**.\
When a borrower’s Health Factor falls below 1.0:

* The position becomes eligible for liquidation.
* A liquidator can repay a part of the borrower’s debt.
* In return, the liquidator receives collateral at a **discount** (the “liquidation bonus”).

### How a Liquidation Strategy Could Look

**Conceptual steps:**

1. Maintain a reserve of **USDC and/or XDC** (or whatever assets are commonly borrowed).
2. Monitor PrimeFi positions programmatically:
   * Watch Health Factor values approaching 1.0.
   * Scan for sudden drops in collateral prices or market-wide volatility.
3. When a position becomes liquidatable:
   * Submit a liquidation transaction that repays part of the debt.
   * Receive collateral at a discount if the transaction succeeds.
4. Manage the acquired collateral:
   * Hold it, trade it, or redeploy it, depending on your objectives.

### Why Only Advanced Users Should Consider This

* Timing and gas costs matter; opportunities can vanish quickly.
* If many liquidators compete, MEV and priority fees become important.
* Bad parameter choices (e.g., wrong amount repaid, wrong asset routing) can turn a “profitable” liquidation into a loss.

In short, liquidation is a form of **market making in protocol risk**, not a passive yield strategy.


# Portfolio Bucketing & Final Notes

> ⚠️ **Non-Financial Advice**\
> This section provides a *framework* for thinking about risk allocation.\
> It is not a recommendation or allocation plan.

For larger holders or entities, it can be helpful to think in terms of **risk buckets**.

***

### 1. Core Treasury (Low Risk)

Focus on **non‑leveraged** positions from the Conservative page:

* psXDC “set‑and‑forget” yield stack.
* USDC “parking lot.”
* 50/50 psXDC + USDC base.

Characteristics:

* No liquidation risk (no borrowing).
* Yields mainly from staking, borrow interest, and protocol incentives.
* Main risks: protocol/contract risk and underlying asset volatility.

***

### 2. Structured Yield (Medium Risk)

Borrowing strategies with **no recursive looping**:

* psXDC collateral → borrow USDC (stay long XDC).
* USDC collateral → borrow XDC → stake to psXDC.
* psXDC collateral → borrow XDC for operations.

Characteristics:

* Liquidation risk exists but is manageable if Health Factor is kept high (e.g. ≥ 2.0).
* Yields come from spreads between psXDC yield and borrow APRs, plus incentives.
* Requires periodic monitoring and risk management.

***

### 3. Degen Sleeve (High Risk)

Only for small, high‑risk capital allocations:

* psXDC → borrow XDC → stake → psXDC loop when math is clearly favorable.
* USDC + psXDC barbell loops and other complex structures.
* Possibly automated liquidation strategies.

Characteristics:

* High tail risk and sensitivity to market conditions.
* Suitable only for advanced users who can monitor positions and systems closely.
* Should be sized such that a **complete loss** would not threaten overall solvency.

***

### 4. Final Reminder

All strategies described across these pages are **examples**, not recommendations.

Before implementing any position:

* Check **live APRs**, utilization, and risk parameters in the PrimeFi UI.
* Stress test your assumptions (e.g., sudden XDC drawdown, APR changes, de‑peg scenarios).
* Decide in advance:
  * How much you are willing to lose in worst‑case scenarios.
  * What Health Factor you consider your “panic line” for reducing risk.

> 🧠 **Always do your own research.**\
> DeFi can be powerful, but it is never risk‑free.


# Smart Contracts Addresses

PrimeFi v2 is deployed on three EVM chains, each with its own set of contracts. Pick the chain you want to inspect:

* [Base Network Deployment Addresses](/reference/smart-contracts-addresses/base-network-deployment-addresses) — chain id `8453`
* [HyperEVM Deployment Addresses](/reference/smart-contracts-addresses/hyperevm-deployment-addresses) — chain id `999`
* [XDC Network Deployment Addresses](/reference/smart-contracts-addresses/xdc-network-deployment-addresses) — chain id `50`

The PrimeFi app also surfaces a **v3** toggle that routes calls to **Fathom Lending** (a separate Aave v3 fork operated by Fathom Protocol on XDC). PrimeFi does not operate those contracts:

* [Fathom v3 (XDC) Deployment Addresses](/reference/smart-contracts-addresses/fathom-xdc-deployment-addresses) — chain id `50`, operator: Fathom Protocol
* See also: [Fathom v3 (XDC) overview](/v3-markets/fathom-v3)


# Base Network Deployment Addresses

### Core Protocol

| Component                            | Address                                    |
| ------------------------------------ | ------------------------------------------ |
| LendingPool                          | 0x8a619D8E3BfAb54F7C30Ef39Ce16c53429c739C3 |
| LendingPoolAddressesProvider         | 0xBC2adF6bEE6E8468f9E60DFC017D4E2Ce682be0C |
| LendingPoolAddressesProviderRegistry | 0xBfeE735e3868f8990787CCEAA4B920C9Ed162b07 |
| WETH Gateway                         | 0x065fd3ba477c85503BFac48be7D1a2fcAdA02847 |
| PoolHelper                           | 0x69A3c30A85aA1E22791466a08819c1080f0Aab7f |
| Base Asset (WETH)                    | 0x4200000000000000000000000000000000000006 |
| Wrapped Base Debt Token              | 0xaaE0D3C0b4aa454cEb5b5346ba1E95a86395D656 |

### Token & Yield Management

| Component      | Address                                    |
| -------------- | ------------------------------------------ |
| PRFI Token     | 0x7BBCf1B600565AE023a1806ef637Af4739dE3255 |
| Compounder     | 0xb16aECAfA1310a1c51F66EbDF6Fb753BFa76450E |
| Looper         | 0x515fBd7124a782818bA6719E48e94c489BA769F4 |
| Price Provider | 0x04EDBF3904789d80B0C991e0B66577F2208A2bE6 |

### PRFI NFT Staking

| Component                 | Address                                    |
| ------------------------- | ------------------------------------------ |
| PRFI NFT Collection       | 0x693A3A45Ff596024f844Be1cc6845d59F778dCF5 |
| PRFI Token (stake/reward) | 0x7BBCf1B600565AE023a1806ef637Af4739dE3255 |

### Oracles & Data

| Component                   | Address                                    |
| --------------------------- | ------------------------------------------ |
| Aave Protocol Data Provider | 0x7b7Cd09465ff2cab67360D5CD24A3Cc3ad0C856a |
| Aave Oracle                 | 0x2Bd11f0f5e36411D7587d8a8969f9db6C7022973 |
| Lending Rate Oracle         | 0xd719084151F1F47B7dcB937bB33845656580b79d |
| Data Stream Consumer        | 0x163A1e3cd4726F3C92EB005A942308029C27f64B |

### Incentives, Fees & Governance

| Component                       | Address                                    |
| ------------------------------- | ------------------------------------------ |
| Incentives Controller (Diamond) | 0x0c7558F634B3465fF7637500D5a710731393c8F2 |
| Eligibility Data Provider       | 0xE8DF0d0CbA73403Ca89e07E6dECa9252E1Af4084 |
| Middle Fee Distribution         | 0x7f2EBfB68BE75E56bB6c14C504BB0a0c0b6EB8df |
| Multi Fee Distribution          | 0x5b6D95545750f1bb1812F5c564d9a401D3DeBd80 |
| Bounty Manager                  | 0x95d7A59C230D184F16B497c3c1bb834CA397C241 |
| DAO Treasury                    | 0xF2e2A49631927108086268c68C559c63c3C8f73d |
| Staking Token                   | 0x87B417AF600312df37F551a05ae14bCC3d55bC36 |

### Cross-Chain / Messaging

| Component           | Address                                    |
| ------------------- | ------------------------------------------ |
| Stargate Borrow     | 0x944963ff76C7618EdbF926469A3f77a78D461D65 |
| Stargate Router\[0] | 0x27a16dc786820B16E5c9028b75B99F6f604b5d26 |
| Stargate Router\[1] | 0xdc181Bd607330aeeBEF6ea62e03e5e1Fb4B6F7C7 |

### Utility & Operational Helpers

| Component                       | Address                                    |
| ------------------------------- | ------------------------------------------ |
| Wallet Balance Provider         | 0x33cd734739c6DeD500fD080d476D93135cB813Ef |
| UI Pool Data Provider           | 0x1B2164d254c7fa14901d54fB1043fB228eacb8F6 |
| Stable & Variable Tokens Helper | 0xfEBC15460a5Af7bd5C0f2D6746AAb00c9531747D |
| aTokens & Rates Helper          | 0xeB3ba9f55eC6FA6395d64300EE2bB75F50E9E8e5 |
| Multicall3                      | 0xC7C567e10656eB2F4B1024757263a587Ac1942ad |
| LP Locker List                  | 0x7d08E488FA39E7f29701c90EB49cC766857895a8 |
| FLIK                            | 0x76C6452E7C4711ee986b4911243Ea20d8B28f506 |

### Token Addresses

#### Underlying Tokens

| Symbol | Address                                    |
| ------ | ------------------------------------------ |
| USDC   | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| WETH   | 0x4200000000000000000000000000000000000006 |
| CBBTC  | 0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf |
| psXDC  | 0x98D916F5773Ac0482b49856f2659d6c32114C4Ba |
| PRFI   | 0x7BBCf1B600565AE023a1806ef637Af4739dE3255 |

#### Interest-Bearing pTokens

| Symbol | Address                                    |
| ------ | ------------------------------------------ |
| pUSDC  | 0xB9a14B24C6E669D24E76dab65f7c4dc52f68741C |
| pWETH  | 0x2a50Be4Df06202A239384e828D6e67F9F2fA954e |
| pcbBTC | 0x1fF5E0037B478547715a4CE337d9fcFF86A30401 |
| pPRFI  | 0x834695A5d33967f8cC27E6d15684c0aA36cA4375 |
| ppsXDC | 0x3A577f9789FC81C2Ea0B81B9e02B6Dbc67158A37 |

#### Variable Debt vdTokens

| Symbol  | Address                                    |
| ------- | ------------------------------------------ |
| vdUSDC  | 0xDBEd51F298901987651FaF1dAed8Bb575942d406 |
| vdWETH  | 0xaaE0D3C0b4aa454cEb5b5346ba1E95a86395D656 |
| vdcbBTC | 0xC12bdD620A54149Df6B73Fad9726d387402a9066 |
| vdPRFI  | 0x47C4d740016411Bb8f5c9D9bDb3f866c9b46e0A4 |
| vdpsXDC | 0xD9bA32E8a4955E4fbbbDD61F121b2f81ca7bBFE8 |

### Notes

* On the Base network deployment, the protocol inherits core contract modules from the Aave v2 architecture but adapts them to Base’s consensus and block-timing parameters.
* Diamond architecture in `incentivesControllerDiamond` centralizes incentive facets into a single upgradeable contract endpoint.
* **Prefix legend:**
  * `p` → interest-bearing (aToken equivalent)
  * `vd` → variable debt token
  * `cb` → bridged/compound variant (e.g., cbBTC)
* Multi-path routing and multi-version support are implied by multiple Stargate router addresses.
* `psXDC` is the PrimeStaking liquid-staking XDC token, bridged to Base as a LayerZero OFT. It is priced at the XDC/USD feed (1 psXDC ≈ 1 XDC). See [PrimeStakedXDC (psXDC)](/product/liquid-staking-tokens/primestakedxdc-psxdc).

{% hint style="warning" %}
Always verify contract addresses with our official deployment page or in the tokens official page (This for all the tokens used that are not part of PrimeFi ecosystem) prior to integration or production use.
{% endhint %}


# HyperEVM Deployment Addresses

PrimeFi v2 contract addresses on **HyperEVM** (chain id `999`).

### Core Protocol

| Component                            | Address                                    |
| ------------------------------------ | ------------------------------------------ |
| LendingPool                          | 0xb339448E13E273f6F46e3390e0932Ab7fF9F113F |
| LendingPoolAddressesProvider         | 0x07093CA1E6c8c03Ff77dea07532F738d88De1D75 |
| LendingPoolAddressesProviderRegistry | 0x69A3c30A85aA1E22791466a08819c1080f0Aab7f |
| WETH Gateway                         | 0xac57f0D2f8ef17B8D26189Ba0Db353361374b2Ca |
| PoolHelper                           | 0x58933Fab624Ed4e6B7eb9e64Cb470bB61bE4de6d |
| Base Asset Wrapped (WHYPE)           | 0x5555555555555555555555555555555555555555 |
| Wrapped Base Debt Token              | 0x9601C465c3c404465d968a2dda10FD807f2B2d5C |

### Token & Asset Managers

| Component      | Address                                    |
| -------------- | ------------------------------------------ |
| PRFI Token     | 0x7BBCf1B600565AE023a1806ef637Af4739dE3255 |
| Compounder     | 0xb0241128b4E66Ea783f12DcB2b73Ff19d8789E0e |
| Looper         | 0x1853D7da8986A3C20F9Ab51759e9a3967c5f89e8 |
| Price Provider | 0x198C93ebd82e9285376F43e2A98B8D58969Ad850 |

### Oracles

| Component                   | Address                                    |
| --------------------------- | ------------------------------------------ |
| Aave Protocol Data Provider | 0x3Bc108Ca0202739FC65bf453A255E5c49Ba6544a |
| Aave Oracle                 | 0x8Bd82c5f94d2CAFF3F980f0137f16aDD71E98dfb |
| Lending Rate Oracle         | 0x7169Bf0CCfb949D2Fa78A8BDaEe0410fBd617632 |
| Data Stream Consumer        | 0x04EDBF3904789d80B0C991e0B66577F2208A2bE6 |

### Incentives, Fees & Distribution

| Component                       | Address                                    |
| ------------------------------- | ------------------------------------------ |
| Incentives Controller (Diamond) | 0x95d7A59C230D184F16B497c3c1bb834CA397C241 |
| Eligibility Data Provider       | 0xB3Dd71A3Ef63B7BecEfbC68A87352Fcc4507BA97 |
| Middle Fee Distribution         | 0x1B2164d254c7fa14901d54fB1043fB228eacb8F6 |
| Multi Fee Distribution          | 0x33cd734739c6DeD500fD080d476D93135cB813Ef |
| Dao Treasury                    | 0xF2e2A49631927108086268c68C559c63c3C8f73d |
| Bounty Manager                  | 0x24498eb51a72D7CCa8e005e81Ed3c2E70f390778 |
| Staking Token                   | 0x981F145a71Da6DF4A7cBe892807782c9CC9a5515 |

### Cross-Chain / Messaging

| Component       | Address                                    |
| --------------- | ------------------------------------------ |
| Stargate Borrow | 0xB380637652CAfBb37e08ECafc015FfcB800618d0 |
| Stargate Router | 0xb88339CB7199b77E23DB6E890353E22632Ba630f |

### Utility & View Helpers

| Component                       | Address                                    |
| ------------------------------- | ------------------------------------------ |
| Wallet Balance Provider         | 0xa911aFd7dB4226cEe8073cDa2Da668B4CB918af9 |
| UI Pool Data Provider           | 0x7d08E488FA39E7f29701c90EB49cC766857895a8 |
| Stable & Variable Tokens Helper | 0xAb008ABd38aC3fB371D8C442d48E10225cd46DB6 |
| aTokens & Rates Helper          | 0x8C6357575Bbe7157612ba763Dd5CBdBDFABf83e8 |
| Multicall3                      | 0x5EB7Ed8e58E7eD4509612F3e9CcB5433ee822dc9 |
| LP Locker List                  | 0x6584BFE4d784BB8f1fd81D569a2202ce6F2F42Ad |
| FLIK                            | 0x4483564436120D7FbbaC8a346Ae0bbad4c8F219b |

### Token Addresses

#### Underlying Tokens

| Symbol | Address                                    |
| ------ | ------------------------------------------ |
| USDC   | 0xb88339CB7199b77E23DB6E890353E22632Ba630f |
| USDT₮0 | 0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb |
| WHYPE  | 0x5555555555555555555555555555555555555555 |
| UETH   | 0xBe6727B535545C67d5cAa73dEa54865B92CF7907 |
| UBTC   | 0x9fdbda0a5e284c32744d2f17ee5c74b284993463 |
| PRFI   | 0x7BBCf1B600565AE023a1806ef637Af4739dE3255 |
| psXDC  | 0x98D916F5773Ac0482b49856f2659d6c32114C4Ba |

#### Interest-Bearing pTokens

| Symbol  | Address                                    |
| ------- | ------------------------------------------ |
| pUSDC   | 0x386f40C2A8485d6572Cb74a736A0763c0521095B |
| pUSDT₮0 | 0x5Fc1737115eCB6850be0A4F0CE25B7F98231cAB9 |
| pWHYPE  | 0xCF4642EF89683D0299B59738b1Cc3AC0177348Ba |
| pUETH   | 0x6E811Aa146F961c918d14BE9Ed9C0Cd68F447a6e |
| pUBTC   | 0x98b7056E0e0521b7bA32F4Ac8af8e1249789d2d6 |
| pPRFI   | 0x07CB5Aa0c467Df9b3A38dF3fBfd465c454905690 |
| ppsXDC  | 0x1952dD6d79A7ab0419321e0669B1BdF4dF1490E5 |

#### Variable Debt vdTokens

| Symbol   | Address                                    |
| -------- | ------------------------------------------ |
| vdUSDC   | 0x009A18797c9C7eB06811D4cDc44881F3C5fA748a |
| vdUSDT₮0 | 0xd00fe535B82F215989178609286610fe666E5365 |
| vdWHYPE  | 0x9601C465c3c404465d968a2dda10FD807f2B2d5C |
| vdUETH   | 0x71f719166c403aC15F55567BABdd19b7dA1E8817 |
| vdUBTC   | 0xD218a5F74aF42d9b1a879e2349e751DEaFe3114C |
| vdPRFI   | 0x182CFb49ad159F8C770ef7ad9Ff56F3E61b9A9fa |
| vdpsXDC  | 0x11f7467591b3E9e7B4d97e0827dCAaE51e46d373 |

### Notes

* HyperEVM deployment leverages the EVM-compatible layer of the Hyperliquid ecosystem, with native access to its orderbooks and data infrastructure.
* The protocol on HyperEVM uses its own oracle and feed architecture tailored for Hyperliquid's liquidity environment (not simply a copy of Base or other network feeds).
* **Prefix legend:**
  * `p` → interest-bearing token
  * `vd` → variable debt token
* `USDT₮0` is the Hyperliquid-native bridged USDT (token symbol uses the ₮ character on-chain).
* `psXDC` is the PrimeStaking liquid-staking XDC token, bridged to HyperEVM as a LayerZero OFT. It is priced at the XDC/USD feed (1 psXDC ≈ 1 XDC). See [PrimeStakedXDC (psXDC)](/product/liquid-staking-tokens/primestakedxdc-psxdc).
* Ensure there are **no address collisions** when migrating or exporting values across networks — each network uses a distinct deployment namespace.

{% hint style="warning" %}
Always verify contract addresses with our official deployment page or in the tokens' official page (this applies to all the tokens used that are not part of the PrimeFi ecosystem) prior to integration or production use.
{% endhint %}


# XDC Network Deployment Addresses

PrimeFi v2 contract addresses on **XDC mainnet** (chain id `50`).

For the Fathom Lending (v3) deployment that also runs on XDC, see [Fathom v3 (XDC) Deployment Addresses](/reference/smart-contracts-addresses/fathom-xdc-deployment-addresses).

***

#### ⚙️ Core Protocol

| Contract                                 | Address                                      |
| ---------------------------------------- | -------------------------------------------- |
| **lendingPool**                          | `0x8a619D8E3BfAb54F7C30Ef39Ce16c53429c739C3` |
| **lendingPoolAddressesProvider**         | `0xBC2adF6bEE6E8468f9E60DFC017D4E2Ce682be0C` |
| **lendingPoolAddressesProviderRegistry** | `0xBfeE735e3868f8990787CCEAA4B920C9Ed162b07` |
| **wethGateway**                          | `0x065fd3ba477c85503BFac48be7D1a2fcAdA02847` |
| **walletBalanceProvider**                | `0xe1076Fd52bF1cA8Eca89d043cC815F2356D55131` |
| **uiPoolDataProvider**                   | `0x2774De10AA274bAf5b33B096c6F32dE65C114394` |
| **aaveProtocolDataProvider**             | `0x2E6bA568aaebadb4db3E018313ee34baD0328988` |
| **lendingPoolAddressProvider**           | `0xBC2adF6bEE6E8468f9E60DFC017D4E2Ce682be0C` |
| **poolHelper**                           | `0x69A3c30A85aA1E22791466a08819c1080f0Aab7f` |
| **baseAssetWrappedAddress (WXDC)**       | `0x951857744785E80e2De051c32EE7b25f9c458C42` |
| **wrappedBaseDebtToken**                 | `0xC12bdD620A54149Df6B73Fad9726d387402a9066` |

***

#### 💰 Token & Yield Management

| Contract         | Address                                      |
| ---------------- | -------------------------------------------- |
| **prfiToken**    | `0x81B244d0be055EF3BEF1b09B7826Cc2b108B2cBD` |
| **stakingToken** | `0xffA04F091128fb89D3B1eCd0149DC677dfAe1C69` |
| **compounder**   | `0x657290d1AeC8Ffe03198d5007D6e1F7D0F3859B9` |
| **looper**       | `0x0DF687CCe1D00FA2DCB17198d49886CB4ae99693` |
| **lpLockerList** | `0x36aa7aDeeCa1d2fF802a1a5523250fFBF157183d` |
| **flik**         | `0xc995bF07a1B6f8d06101C780925ffCFaeBB52217` |

***

#### 📡 Oracles & Data

| Contract                    | Address                                      |
| --------------------------- | -------------------------------------------- |
| **aaveOracle**              | `0x1de97549d6cE6ab9e44A2F5468ae003A00826A82` |
| **lendingRateOracle**       | `0x6681155c2eDC50f79535D8E4861C3Fdb1d4Da856` |
| **priceProvider**           | `0xb78af56B6d09EEE9a157e7f28f9a16ef1845f324` |
| **eligibilityDataProvider** | `0x819Cc713B5DC3323Dd013D754b8011BD41Ad1a62` |
| **dataStreamConsumer**      | `0xAb008ABd38aC3fB371D8C442d48E10225cd46DB6` |

***

#### 🏛️ Incentives, Fees & Governance

| Contract                     | Address                                      |
| ---------------------------- | -------------------------------------------- |
| **chefIncentivesController** | `0x5aa0Ee7b5A183242Af53ad21306267571c54f80E` |
| **middleFeeDistribution**    | `0x9d96D06cB863B76B07670E98D86470407a965A9c` |
| **multiFeeDistribution**     | `0x01E7cd81D3d7A4907815877e0C937a77dE537e99` |
| **bountyManager**            | `0xb16aECAfA1310a1c51F66EbDF6Fb753BFa76450E` |
| **daoTreasury**              | `0xF2e2A49631927108086268c68C559c63c3C8f73d` |

***

#### 🌉 Cross-Chain / Messaging

| Contract           | Address                                                                                                                                      |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **stargateBorrow** | `0x6f8904e7B534fCcb81Ed21262E077eEDbEa84a77`                                                                                                 |
| **stargateRouter** | `["0x8E2E38711080bF8AAb9C74f434d2bae70e67ae44", "0xA4272ad93AC5d2FF048DD6419c88Eb4C1002Ec6b", "0xB0d27478A40223e427697Da523c6A3DAF29AaFfB"]` |

***

#### 🧰 Utility & Operational Helpers

| Contract                          | Address                                      |
| --------------------------------- | -------------------------------------------- |
| **stableAndVariableTokensHelper** | `0xfEBC15460a5Af7bd5C0f2D6746AAb00c9531747D` |
| **aTokensAndRatesHelper**         | `0x01Fd17C9A7Fe764d1f3fd1997BA834032110B709` |
| **multicall3**                    | `0x95d7A59C230D184F16B497c3c1bb834CA397C241` |

***

#### 🪙 Token Addresses

#### Underlying Tokens

| Symbol    | Address                                      |
| --------- | -------------------------------------------- |
| **USDC**  | `0xfA2958CB79b0491CC627c1557F441eF849Ca8eb1` |
| **USDT**  | `0xcdA5b77E2E2268D9E09c874c1b9A4c3F07b37555` |
| **WXDC**  | `0x951857744785E80e2De051c32EE7b25f9c458C42` |
| **psXDC** | `0xDc74c0DaED82ae94486DeeF22991d2F54173c734` |
| **PRFI**  | `0x81B244d0be055EF3BEF1b09B7826Cc2b108B2cBD` |

***

#### Interest-Bearing pTokens

| Symbol     | Address                                      |
| ---------- | -------------------------------------------- |
| **pUSDC**  | `0xB9a14B24C6E669D24E76dab65f7c4dc52f68741C` |
| **pUSDT**  | `0x2a50Be4Df06202A239384e828D6e67F9F2fA954e` |
| **pWXDC**  | `0x1fF5E0037B478547715a4CE337d9fcFF86A30401` |
| **pPRFI**  | `0x3A577f9789FC81C2Ea0B81B9e02B6Dbc67158A37` |
| **ppsXDC** | `0x3Bd0183584185F8341B83dDefD73E6Eae1a64eeF` |

***

#### Variable Debt vdTokens

| Symbol      | Address                                      |
| ----------- | -------------------------------------------- |
| **vdUSDC**  | `0xDBEd51F298901987651FaF1dAed8Bb575942d406` |
| **vdUSDT**  | `0xaaE0D3C0b4aa454cEb5b5346ba1E95a86395D656` |
| **vdWXDC**  | `0xC12bdD620A54149Df6B73Fad9726d387402a9066` |
| **vdPRFI**  | `0xD9bA32E8a4955E4fbbbDD61F121b2f81ca7bBFE8` |
| **vdpsXDC** | `0xb2FdB307cdf1cf3c6bd8b1f35E180755c24c122f` |

***

### Notes

* The XDC deployment uses **custom oracle feeds** tailored for the XDC network ecosystem.
* **Diamond architecture** in `chefIncentivesController` centralizes reward and fee-distribution logic under a unified entry point.
* **Prefix legend:**
  * `p` → interest-bearing token (pToken)
  * `vd` → variable debt token
  * `ps` → staking derivative variant (e.g., psXDC)
* **Cross-chain liquidity** support uses `stargateBorrow` and multiple `stargateRouter` endpoints, enabling omnichain borrowing across XDC and other supported networks.
* **psXDC migrations:** the psXDC market has migrated through several token versions as the PrimeStaking vault was upgraded. Earlier psXDC reserves (`0x9B8e12b0…`, `0x98D916F5…`, `0xa7FD1c56…`) are **frozen** with LTV 0 — withdraw/repay only. The addresses above are the current, active psXDC market.

{% hint style="warning" %}
Always verify contract addresses with our official deployment page or in the tokens' official page (this applies to all the tokens used that are not part of the PrimeFi ecosystem) prior to integration or production use.
{% endhint %}


# Fathom v3 (XDC) Deployment Addresses

Fathom Lending (Aave v3) contract addresses on XDC mainnet — used by the v3 toggle in the PrimeFi UI.

The PrimeFi app's **v3** toggle routes calls to **Fathom Lending**, an Aave v3 fork **operated by Fathom Protocol** on XDC mainnet (chain id `50`). **PrimeFi does not operate, own, or audit these contracts.**

{% hint style="warning" %}
The canonical, always-up-to-date source for Fathom Lending addresses is Fathom's own documentation. Always cross-check before integrating: [docs.fathom.fi/lending/deployments/xdc-network](https://docs.fathom.fi/lending/deployments/xdc-network).
{% endhint %}

### Audit

* Provider: **Halborn**
* Type: Formal Verification
* Date: March 2026
* Outcome: **0 Critical / 0 High / 0 Medium / 6 Informational**
* Audited commit: `91574f41` · Remediation commit: `5072265`

### Addresses the PrimeFi UI calls on XDC mainnet

These are the entry-point contracts the PrimeFi frontend wires up for the v3 toggle. The reserve list itself is discovered at runtime by calling `Pool.getReservesList()`.

#### Core

| Contract                  | Address                                      |
| ------------------------- | -------------------------------------------- |
| **Pool**                  | `0x70d8005E3c8C7e383FE35Fa40156042F3393449F` |
| **Pool implementation**   | `0x5c756ACD4Cb26a9cA6De7abF9765cE84B5Be9322` |
| **PoolAddressesProvider** | `0x37ab83e6a9B99DA3eAF00D1afdC45f50ee7625E5` |
| **PoolConfigurator**      | `0x56f3A75C71C207a77c3b8c77a34FC89cF1a6DB66` |
| **ACLManager**            | `0xf73e7d6309A2DaDE5B698eD33dA929d2F2281526` |
| **WrappedTokenGateway**   | `0x57Ba8bAA7c3Ff6606751859f1CED9f68819C2f41` |

#### Oracles & data providers

| Contract                  | Address                                      |
| ------------------------- | -------------------------------------------- |
| **FathomOracle**          | `0x54348d953Abc4f167cbdeDe648095c1aF7DE355A` |
| **UiPoolDataProvider**    | `0x5f7001B6Dc957dC5B2F78f0BC3aFbFc1fE628A18` |
| **ProtocolDataProvider**  | `0x7fa488a5C88E9E35B0B86127Ec76B0c1F0933191` |
| **WalletBalanceProvider** | `0x7C724DEaD5012Eb4C9e2d1529cF0353e767C82Cd` |

#### Reference tokens (for orientation only — full list is on-chain)

| Symbol   | Address                                      |
| -------- | -------------------------------------------- |
| **FXD**  | `0x49d3f7543335cf38Fa10889CCFF10207e22110B5` |
| **FTHM** | `0x3279dBEfABF3C6ac29d7ff24A6c46645f3F4403c` |
| **WXDC** | `0x951857744785E80e2De051c32EE7b25f9c458C42` |

### Where PrimeFi-specific contracts apply

PrimeFi's pLP boost, MultiFeeDistribution, ChefIncentivesController, Compounder, Flik and Stargate Borrow contracts **do not exist on Fathom**. The v3 surface inside the PrimeFi UI deliberately hides those features because they have no on-chain counterpart in Fathom's deployment.

For incentive details on Fathom, refer to Fathom's documentation: [docs.fathom.fi/lending](https://docs.fathom.fi/lending/).


# Contracts

**This section gives a global overview of the PrimeFi smart contracts and how they interact with each other.** PrimeFi is live on Base, HyperEVM and XDC — deployed addresses are listed under [Smart Contracts Addresses](/reference/smart-contracts-addresses).

Please note that the actual interactions are much more complicated and numerous. It is not the intention of this diagram to list them all, but merely to give an overview of the actors, contracts and interactions involved. A more detailed chronicle of these interactions can be found in the following subsections:

* [Lending & Borrowing](/reference/contracts/lending-borrowing)
* [Staking](/reference/contracts/stake)

![Contract Highover](/files/dPpfHoZMil2xuxmautCJ)


# Lending & Borrowing

## Lending and borrowing protocol

![Contract Highover](/files/ncfTIy8yqiz9Fzuvp03q)


# Flik Flow

## Flik Flow

![Flik Flow](/files/NzUK7KxcRrb9GLhCW4El)

## Lock Flik

![Lock Flik](/files/VCezVcfQ0Z00TPLwNYTi)

## Uniswap Oracle

![Uniswap Oracle](/files/F6fULFw3ayzZbgGGWaD6)


# Earnings


# Stargate Borrow

![Stargate & LayerZero](/files/FWezNLCUiYybsztBpIUf)


# Staking

![Stake Flow](/files/MlLoAdPgH1Dp8pEeXX1t)


# Rewards

## Withdraw

![Withdraw](/files/UNb0odBO7QXwaUUvUVIb)

## Withdraw Locked

![Withdraw Locked](/files/qMZzevdrd6iOsai4q12k)


# Bounty System

![Bounty](/files/BYsj7qPoDWZZ1RJVQumj)




---

[Next Page](/llms-full.txt/1)

