> For the complete documentation index, see [llms.txt](https://docs.essencefinance.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.essencefinance.io/development/smart-contracts/peg/fixedpricepsm.md).

# FixedPricePSM

## Functions

### constructor

```solidity
function constructor(
    uint256 _floor,
    uint256 _ceiling,
    struct PegStabilityModule.OracleParams _params,
    uint256 _mintFeeBasisPoints,
    uint256 _redeemFeeBasisPoints,
    uint256 _reservesThreshold,
    uint256 _chiLimitPerSecond,
    uint256 _mintingBufferCap,
    contract IERC20 _underlyingToken,
    contract IPCVDeposit _surplusTarget
) public
```

#### Parameters

| Name                    | Type                                   | Description |
| ----------------------- | -------------------------------------- | ----------- |
| `_floor`                | uint256                                |             |
| `_ceiling`              | uint256                                |             |
| `_params`               | struct PegStabilityModule.OracleParams |             |
| `_mintFeeBasisPoints`   | uint256                                |             |
| `_redeemFeeBasisPoints` | uint256                                |             |
| `_reservesThreshold`    | uint256                                |             |
| `_chiLimitPerSecond`    | uint256                                |             |
| `_mintingBufferCap`     | uint256                                |             |
| `_underlyingToken`      | contract IERC20                        |             |
| `_surplusTarget`        | contract IPCVDeposit                   |             |

### \_getMintAmountOut

```solidity
function _getMintAmountOut(
    uint256 amountIn
) internal returns (uint256 amountChiOut)
```

helper function to get mint amount out based on current market prices

will revert if price is outside of bounds and bounded PSM is being used

#### Parameters

| Name       | Type    | Description |
| ---------- | ------- | ----------- |
| `amountIn` | uint256 |             |

### \_getRedeemAmountOut

```solidity
function _getRedeemAmountOut(
    uint256 amountChiIn
) internal returns (uint256 amountTokenOut)
```

helper function to get redeem amount out based on current market prices

will revert if price is outside of bounds and bounded PSM is being used

#### Parameters

| Name          | Type    | Description |
| ------------- | ------- | ----------- |
| `amountChiIn` | uint256 |             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.essencefinance.io/development/smart-contracts/peg/fixedpricepsm.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.
