# Deterministic Oracles Deployment

### Overview

Deployment of deterministic oracles, both according to the linear discount model and the zero-coupon bond model, is done through the `SpectraPriceOracleFactory` .&#x20;

### Deployment

One deploys a deterministic oracle through the method

```solidity
/**
* @dev Deploys a new `SpectraOracle` for a given PT.
* @param _pt The address of the Principal Token (PT).
* @param _discountModel The discount model address.
* @return oracle The address of the newly deployed Oracle.
*/
function createOracle(
   address _pt,
   address _discountModel,
   uint256 initialImpliedAPY,
   address initOwner
) external returns (address oracle)
```

The `_discountModel` address corresponds to the address of either the `LinearDiscountModel` , `LinearAPRModel` or `ZeroCouponDiscountModel` , depending on the pricing model one wants to use.&#x20;

The `initialImpliedAPY` field is the implied APY according to which we want to discount the PT over the term. The  `initialImpliedAPY` field is in 18 decimals precision, `10 ** 18` representing a `100%`  implied APY.&#x20;

The owner of the oracle contract can change the discount model used in the oracle by calling `setDiscountModel()` .

### Example

For example, to deploy an oracle with a `30%` implied APY over the term, one does

```solidity

createOracle(
   address(0) // PT address,
   address(0) // Discount Model Contract address,
   3e17, // 30% implied APY
   address(0) // Address of the owner
) external returns (address oracle)
```


---

# 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://dev.spectra.finance/integration-reference/spectra-oracles/oracle-deployment/deterministic-oracles-deployment.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.
