# Interactions

#### **setMintFee**

Updates the mint fee on pool.

```solidity
function setMintFee(uint256 newFee) external;

```

**Parameters**

| Name     | Type      | Description                                                                                                          |
| -------- | --------- | -------------------------------------------------------------------------------------------------------------------- |
| `newFee` | `uint256` | The new mint fee value. Uses 10 decimal precision (denominator = 10^10). Examples: 1e6 = 0.01%, 1e7 = 0.1%, 1e8 = 1% |

**Access:** Only GOVERNOR\_ROLE

#### **pause**

Pause mint/swap/redeem actions

```solidity
function pause() external;

```

**Access:** Only GUARDIAN\_ROLE

#### **unpause**

Unpause mint/swap/redeem actions

```solidity
function unpause() external;

```

**Access:** Only PROTOCOL\_OWNER\_ROLE

#### **setRedeemFee**

Updates the redeem fee on pool.

```solidity
function setRedeemFee(uint256 newFee) external;

```

**Parameters**

| Name     | Type      | Description                                                                                                            |
| -------- | --------- | ---------------------------------------------------------------------------------------------------------------------- |
| `newFee` | `uint256` | The new redeem fee value. Uses 10 decimal precision (denominator = 10^10). Examples: 1e6 = 0.01%, 1e7 = 0.1%, 1e8 = 1% |

**Access:** Only GOVERNOR\_ROLE

#### **setOffPegFeeMultiplier**

Updates the off peg fee multiplier of pool.

```solidity
function setOffPegFeeMultiplier(uint256 newMultiplier) external;
```

**Parameters**

| Name            | Type      | Description                          |
| --------------- | --------- | ------------------------------------ |
| `newMultiplier` | `uint256` | The new off peg fee multiplier value |

**Access:** Only GOVERNOR\_ROLE

#### **setExchangeRateFeeFactor**

Updates the exchange rate fee factor of pool.

```solidity
function setExchangeRateFeeFactor(uint256 newFeeFactor) external;

```

**Parameters**

| Name           | Type      | Description                            |
| -------------- | --------- | -------------------------------------- |
| `newFeeFactor` | `uint256` | The new exchange rate fee factor value |

**Access:** Only GOVERNOR\_ROLE

#### **setBufferPercent**

Updates the buffer percent

```solidity
function setBufferPercent(uint256 newBuffer) external;
```

**Parameters**

| Name        | Type      | Description                  |
| ----------- | --------- | ---------------------------- |
| `newBuffer` | `uint256` | The new buffer percent value |

**Access:** Only GOVERNOR\_ROLE

#### **setTokenSymbol**

Updates the token symbol

```solidity
function setTokenSymbol(string calldata newSymbol) external;

```

**Parameters**

| Name        | Type     | Description          |
| ----------- | -------- | -------------------- |
| `newSymbol` | `string` | The new token symbol |

**Access:** Only GOVERNOR\_ROLE

#### **setDecayPeriod**

Updates the decay period

```solidity
function setDecayPeriod(uint256 newDecayPeriod) external;

```

**Parameters**

| Name             | Type      | Description                |
| ---------------- | --------- | -------------------------- |
| `newDecayPeriod` | `uint256` | The new decay period value |

**Access:** Only GOVERNOR\_ROLE

#### **setRateChangeSkipPeriod**

Updates the rate change skip period of pool.

```solidity
function setRateChangeSkipPeriod(uint256 newSkipPeriod) external;
```

**Parameters**

| Name            | Type      | Description                           |
| --------------- | --------- | ------------------------------------- |
| `newSkipPeriod` | `uint256` | The new rate change skip period value |

**Access:** Only GOVERNOR\_ROLE

#### **updateFeeErrorMargin**

Updates the fee error margin of pool.

```solidity
function updateFeeErrorMargin(uint256 newMargin) external;

```

**Parameters**

| Name        | Type      | Description                    |
| ----------- | --------- | ------------------------------ |
| `newMargin` | `uint256` | The new fee error margin value |

**Access:** Only GOVERNOR\_ROLE

#### **updateYieldErrorMargin**

Updates yield error margin of pool.

```solidity
function updateYieldErrorMargin(uint256 newMargin) external;

```

**Parameters**

| Name        | Type      | Description                      |
| ----------- | --------- | -------------------------------- |
| `newMargin` | `uint256` | The new yield error margin value |

**Access:** Only GOVERNOR\_ROLE

#### **distributeLoss**

Distribute losses by rebasing negatively

```solidity
function distributeLoss() external;

```

**Access:** Only GOVERNOR\_ROLE

#### **setTreasury**

Set treasury address for accumulated fees.

```solidity
function setTreasury(address newTreasury) external;

```

**Parameters**

| Name          | Type      | Description              |
| ------------- | --------- | ------------------------ |
| `newTreasury` | `address` | The new treasury address |

**Access:** Only GOVERNOR\_ROLE

#### **withdrawAdminFee**

Send newly-minted SPA tokens to Treasury

```solidity
function withdrawAdminFee(uint256 amount) external;

```

**Parameters**

| Name     | Type      | Description                                |
| -------- | --------- | ------------------------------------------ |
| `amount` | `uint256` | Amount of tokens to withdraw (18-decimals) |

**Access:** Only GOVERNOR\_ROLE

#### **rampA**

Allows to gradually ramp the A coefficient within allowed bounds

```solidity
function rampA(uint256 newA, uint256 endTime) external;

```

**Parameters**

| Name      | Type      | Description                            |
| --------- | --------- | -------------------------------------- |
| `newA`    | `uint256` | The target A value                     |
| `endTime` | `uint256` | Timestamp when ramping should complete |

**Access:** Only CURATOR\_ROLE

#### **setMinRampTime**

Allows to set MinRampTime

```solidity
function setMinRampTime(uint256 newMinRampTime) external;

```

**Parameters**

| Name             | Type      | Description                     |
| ---------------- | --------- | ------------------------------- |
| `newMinRampTime` | `uint256` | The new minimum ramp time value |

**Access:** Only GOVERNOR\_ROLE

#### **setSwapFee**

Allows governor to set the swap fee within allowed bounds

```solidity
function setSwapFee(uint256 newFee) external;

```

**Parameters**

| Name     | Type      | Description                                                                                                          |
| -------- | --------- | -------------------------------------------------------------------------------------------------------------------- |
| `newFee` | `uint256` | The new swap fee value. Uses 10 decimal precision (denominator = 10^10). Examples: 1e6 = 0.01%, 1e7 = 0.1%, 1e8 = 1% |

**Access:** Only GOVERNOR\_ROLE

#### **cancelRamp**

Allows guardians to cancel an ongoing A ramp in emergencies

```solidity
function cancelRamp() external;

```

**Access:** Only GUARDIAN\_ROLE

#### **View Functions**

#### **getRegistry**

Returns the ParameterRegistry address used for bounds checking.

```solidity
function getRegistry() external view returns (IParameterRegistry);

```

**Returns**

| Name     | Type                 | Description                    |
| -------- | -------------------- | ------------------------------ |
| `<none>` | `IParameterRegistry` | The parameter registry address |

#### **getRampAController**

Returns the RampAController address being managed.

```solidity
function getRampAController() external view returns (IRampAController);

```

**Returns**

| Name     | Type               | Description                 |
| -------- | ------------------ | --------------------------- |
| `<none>` | `IRampAController` | The RampAController address |

#### **getSpa**

Returns the SelfPeggingAsset address being managed.

```solidity
function getSpa() external view returns (SelfPeggingAsset);

```

**Returns**

| Name     | Type               | Description                  |
| -------- | ------------------ | ---------------------------- |
| `<none>` | `SelfPeggingAsset` | The SelfPeggingAsset address |

#### getSpaToken

Returns the SPAToken address being managed.

```solidity
function getSpaToken() external view returns (SPAToken);

```

**Returns**

| Name     | Type       | Description          |
| -------- | ---------- | -------------------- |
| `<none>` | `SPAToken` | The SPAToken address |
