# OracleModule

### UNIT

```solidity
uint256 UNIT
```

1e18 scale

### GHO\_DECIMALS

```solidity
uint256 GHO_DECIMALS
```

Number of decimals in the GHO token

### AAVE\_ORACLE

```solidity
address AAVE_ORACLE
```

Address of the Aave Price Oracle

### GHO

```solidity
address GHO
```

Address of the GHO token

### constructor

```solidity
constructor(address _oracle, address _gho) public
```

### getCollateralAmount

```solidity
function getCollateralAmount(address collateral, uint256 feeAmount) external view returns (uint256)
```

Get the amount of collateral for a given amount of fees

*Calculates the amount of collateral matching the given amount of fees based on current prices*

#### Parameters

| Name       | Type    | Description               |
| ---------- | ------- | ------------------------- |
| collateral | address | Address of the collateral |
| feeAmount  | uint256 | Amount of fees            |

#### Return Values

| Name | Type    | Description                    |
| ---- | ------- | ------------------------------ |
| \[0] | uint256 | uint256 : Amount of collateral |

### getFeeAmount

```solidity
function getFeeAmount(address collateral, uint256 collateralAmount) external view returns (uint256)
```

Get the amount of fees for a given amount of collateral

*Calculates the amount of fees matching the given amount of collateral based on current prices*

#### Parameters

| Name             | Type    | Description               |
| ---------------- | ------- | ------------------------- |
| collateral       | address | Address of the collateral |
| collateralAmount | uint256 | Amount of collateral      |

#### Return Values

| Name | Type    | Description              |
| ---- | ------- | ------------------------ |
| \[0] | uint256 | uint256 : Amount of fees |


---

# 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.paladin.vote/dullahan/smart-contracts/oraclemodule.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.
