# Deploy Oracles

Curators can deploy a Napier Oracle from their markets via the Curator Dashboard.&#x20;

### What You'll Find Here

We assume you want to integrate PT and LP oracles into your system. In this guide, you will:

* Configure the **PT and LP oracles**.
  * Choose, per your use case, a price oracle for **any market’s PT or LP**.
  * Set an appropriate **TWAP duration**.
  * **Deploy** the oracle and obtain its feed/endpoint.
* **Validate** the oracle to ensure it’s working correctly.

***

### Using the Napier Oracle

Follow the steps below to deploy a Napier Oracle.

{% stepper %}
{% step %}

### Step 1: Preparation

Before Configuring the oracle, you will prepare:

#### Before Configuring the Oracle

* Access the **Curator Dashboard**.
* If your account is not verified, complete verification under [**Verify Curator Account**](/curate/napier-curation/verify-curator-account.md).
* If you haven’t created a market yet, follow the steps in [**Create Market**](/curate/napier-curation/create-market-napier-amm.md).
* Once you finish creating a market, it will appear in your Curator Dashboard.

#### **C**larify the prerequisites

* If you haven’t learned how Napier market work, start with [Markets - Napier AMM](/learn/protocols/markets-napier-amm.md).
* If you haven’t learned how Napier’s oracles work, start with Napier Oracles (Github)
  {% endstep %}

{% step %}

### **Step 2: Scoping**

Select the following parameters（[Github](https://github.com/napierfi/napier-v2/blob/d9648b23e337322defedf95b282d3c4bbacd294e/test/lens/uniswap/TokiLinearChainlinkOracle.t.sol#L39-L40)）

<div align="left" data-with-frame="true"><figure><img src="/files/T30Zl78JTpcUzjWIs0y4" alt="" width="563"><figcaption></figcaption></figure></div>

#### **Chose a Market**

* Select the market from which you want to source the oracle.

#### **Chose an Oracle Type**

When deploying the oracle, specify the type:

* **TWAP** or **Deterministic Oracles**; if you select the latter, follow [Deploy Deterministic Oracles](/curate/napier-curation/manage-market/deploy-oracles/deploy-deterministic-oracles.md).
* **Quote unit**: **Underlying asset** or **Asset** (i.e., price of PT in the underlying unit vs. in the asset unit)

{% hint style="success" %}

#### **Recommendation:** Price PT **against Underlying Assets** rather than against the **Asset**.

* **Why:** Many underlying assets (yield-bearing tokens) represent “assets staked in a specific protocol,” so the Asset price of that underlying is not strictly well-defined (redeemability, slashing risk, etc.). Therefore, a “perfect” **PT→Asset** price cannot be provided.
* **Example (PT-sUSDe / sUSDe, Asset = USDe):** Napier can guarantee that **1 PT-sUSDe** can be exchanged for **X sUSDe**, so a **PT→Underlying Assets** price exists natively.\
  By contrast, sUSDe→USDe redemption is not guaranteed; sUSDe’s “Asset” is actually **USDe staked in Ethena**, making the Asset-denominated price of the underlying not strictly well-defined.
* **Depeg behavior:** Even if **sUSDe depegs from USDe**, the **PT→sUSDe** conversion remains correct, since it relies on the Underlying assets side, not on external redeemability.
  {% endhint %}
  {% endstep %}

{% step %}

### Step 3: Price Retrieval

&#x20;Finally, deploy it and fetch the oracle.

#### Deploy the Oracle <a href="#step-1-deploy-the-oracle-if-not-already-deployed" id="step-1-deploy-the-oracle-if-not-already-deployed"></a>

Deploy and initialize the oracle here. ([Github](https://github.com/napierfi/napier-v2/blob/d9648b23e337322defedf95b282d3c4bbacd294e/test/lens/ChainlinkOracleFactory.t.sol#L43-L59))

```
function clone(address implementation, bytes calldata args, bytes calldata initializationData)
```

#### Call the Oracle <a href="#step-2-call-the-oracle" id="step-2-call-the-oracle"></a>

Price can be obtained simply by calling the `latestRoundData()` function. ([Github](https://github.com/napierfi/napier-v2/blob/d9648b23e337322defedf95b282d3c4bbacd294e/src/oracles/chainlink/TokiTWAPChainlinkOracle.sol#L76))
{% endstep %}

{% step %}

### Step 4: Sanity Checks

After integrating an oracle for PT price , do these steps to check the oracle's correctness:

#### **PT Oracle Sanity Check**

1. Fetch the **PT price** from your deployed oracle.
2. On the relevant PT market in Napier, open the **Price** tab and note the **PT/Underlying** price.
3. Multiply the price from step 2 by the **Underlying asset’s price** to convert it to **PT/Stable** terms.
4. Compare step 1 vs. step 3. If the deviation exceeds **0.2%**, investigate (and consider contacting the Napier team).

#### **Liquidity & Volatility Checks**

* **Price volatility:** On the market page, review **PT/Underlying** volatility, then use it to infer an estimate of **PT/Stable** volatility.
* **Liquidity:** In the same tab, run **trading simulations** (buy/sell PT against the underlying) and check **price impact** for different order sizes in both directions.
  {% endstep %}
  {% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.napier.finance/curate/napier-curation/manage-market/deploy-oracles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
