# pool-reserve-data

1. `set-flashloan-fee-protocol`: Sets the protocol fee for flash loans for a given asset.
2. `get-flashloan-fee-protocol`: Retrieves the protocol fee for flash loans for a given asset.
3. `set-health-factor-liquidation-threshold`: Sets the health factor liquidation threshold.
4. `get-health-factor-liquidation-threshold`: Gets the health factor liquidation threshold.
5. `set-protocol-treasury-addr`: Sets the address of the protocol treasury.
6. `get-protocol-treasury-addr`: Gets the address of the protocol treasury.
7. `set-reserve-vault`: Sets the reserve vault address.
8. `get-reserve-vault`: Gets the reserve vault address.
9. `set-user-reserve-data`: Sets the reserve data for a user.
10. `delete-user-reserve-data`: Deletes the reserve data for a user.
11. `get-user-reserve-data`: Gets the reserve data for a user.
12. `set-user-assets`: Sets the user's assets.
13. `delete-user-assets`: Deletes a user's assets.
14. `get-user-assets`: Gets a user's assets.
15. `set-reserve-state`: Sets the state of a reserve.
16. `delete-reserve-state`: Deletes the state of a reserve.
17. `get-reserve-state`: Gets the state of a reserve.
18. `set-user-index`: Sets the user index for an asset.
19. `delete-user-index`: Deletes the user index for an asset.
20. `get-user-index`: Gets the user index for an asset.
21. `set-assets`: Sets the list of assets in the protocol.
22. `get-assets`: Gets the list of assets in the protocol.
23. `set-isolated-assets`: Sets whether an asset is isolated.
24. `delete-isolated-assets`: Deletes the isolated status of an asset.
25. `get-isolated-assets`: Gets the isolated status of an asset.
26. `set-borroweable-isolated`: Sets the list of assets that can be borrowed using isolated assets as collateral.
27. `get-borroweable-isolated`: Gets the list of assets that can be borrowed using isolated assets as collateral.
28. `set-optimal-utilization-rate`: Sets the optimal utilization rate for an asset.
29. `get-optimal-utilization-rate`: Gets the optimal utilization rate for an asset.
30. `set-base-variable-borrow-rate`: Sets the base variable borrow rate for an asset.
31. `get-base-variable-borrow-rate`: Gets the base variable borrow rate for an asset.
32. `set-variable-rate-slope-1`: Sets the first slope of the variable borrow rate for an asset.
33. `get-variable-rate-slope-1`: Gets the first slope of the variable borrow rate for an asset.
34. `set-variable-rate-slope-2`: Sets the second slope of the variable borrow rate for an asset.
35. `get-variable-rate-slope-2`: Gets the second slope of the variable borrow rate for an asset.
36. `set-liquidation-close-factor-percent`: Sets the liquidation close factor percentage for an asset.
37. `get-liquidation-close-factor-percent`: Gets the liquidation close factor percentage for an asset.
38. `set-origination-fee-prc`: Sets the origination fee percentage for an asset.
39. `get-origination-fee-prc`: Gets the origination fee percentage for an asset.
40. `set-reserve-factor`: Sets the reserve factor for an asset.
41. `get-reserve-factor`: Gets the reserve factor for an asset.
42. `set-contract-owner`: Sets the owner of the contract.
43. `get-contract-owner`: Gets the owner of the contract.
44. `is-contract-owner`: Checks if a given principal is the contract owner.
45. `set-approved-contract`: Approves or revokes a contract's access to modify protected state variables.
46. `delete-approved-contract`: Deletes an approved contract from the list of approved contracts.
47. `is-approved-contract`: Checks if a contract is approved.

#### `set-flashloan-fee-protocol`

Sets the protocol fee for flash loans for a given asset.

| Parameter | Type        | Description                         |
| --------- | ----------- | ----------------------------------- |
| `asset`   | `principal` | The asset for which the fee is set. |
| `fee`     | `uint`      | The fee amount.                     |

#### `get-flashloan-fee-protocol`

Retrieves the protocol fee for flash loans for a given asset.

| Parameter | Type        | Description                               |
| --------- | ----------- | ----------------------------------------- |
| `asset`   | `principal` | The asset for which the fee is retrieved. |

#### `set-health-factor-liquidation-threshold`

Sets the health factor liquidation threshold.

| Parameter | Type   | Description                                    |
| --------- | ------ | ---------------------------------------------- |
| `hf`      | `uint` | The health factor liquidation threshold value. |

#### `get-health-factor-liquidation-threshold`

Gets the health factor liquidation threshold.

#### `set-protocol-treasury-addr`

Sets the address of the protocol treasury.

| Parameter           | Type        | Description                        |
| ------------------- | ----------- | ---------------------------------- |
| `protocol-treasury` | `principal` | The new protocol treasury address. |

#### `get-protocol-treasury-addr`

Gets the address of the protocol treasury.

#### `set-reserve-vault`

Sets the reserve vault address.

| Parameter           | Type        | Description                    |
| ------------------- | ----------- | ------------------------------ |
| `new-reserve-vault` | `principal` | The new reserve vault address. |

#### `get-reserve-vault`

Gets the reserve vault address.

#### `set-user-reserve-data`

Sets the reserve data for a user.

| Parameter | Type        | Description                    |
| --------- | ----------- | ------------------------------ |
| `user`    | `principal` | The user's identifier.         |
| `reserve` | `principal` | The reserve identifier.        |
| `data`    | `tuple`     | The reserve data for the user. |

#### `delete-user-reserve-data`

Deletes the reserve data for a user.

| Parameter | Type        | Description             |
| --------- | ----------- | ----------------------- |
| `user`    | `principal` | The user's identifier.  |
| `reserve` | `principal` | The reserve identifier. |

#### `get-user-reserve-data`

Gets the reserve data for a user.

| Parameter | Type        | Description             |
| --------- | ----------- | ----------------------- |
| `user`    | `principal` | The user's identifier.  |
| `reserve` | `principal` | The reserve identifier. |

#### `set-user-assets`

Sets the user's assets.

| Parameter | Type        | Description                   |
| --------- | ----------- | ----------------------------- |
| `user`    | `principal` | The user's identifier.        |
| `data`    | `tuple`     | The assets data for the user. |

#### `delete-user-assets`

Deletes a user's assets.

| Parameter | Type        | Description            |
| --------- | ----------- | ---------------------- |
| `user`    | `principal` | The user's identifier. |

#### `get-user-assets`

Gets a user's assets.

| Parameter | Type        | Description            |
| --------- | ----------- | ---------------------- |
| `user`    | `principal` | The user's identifier. |

#### `set-reserve-state`

Sets the state of a reserve.

| Parameter | Type        | Description                     |
| --------- | ----------- | ------------------------------- |
| `reserve` | `principal` | The reserve identifier.         |
| `data`    | `tuple`     | The state data for the reserve. |

#### `delete-reserve-state`

Deletes the state of a reserve.

| Parameter | Type        | Description             |
| --------- | ----------- | ----------------------- |
| `reserve` | `principal` | The reserve identifier. |

#### `get-reserve-state`

Gets the state of a reserve.

| Parameter | Type        | Description             |
| --------- | ----------- | ----------------------- |
| `reserve` | `principal` | The reserve identifier. |

#### `set-user-index`

Sets the user index for an asset.

| Parameter | Type        | Description            |
| --------- | ----------- | ---------------------- |
| `user`    | `principal` | The user's identifier. |
| `asset`   | `principal` | The asset identifier.  |
| `data`    | `uint`      | The index data.        |

#### `delete-user-index`

Deletes the user index for an asset.

| Parameter | Type        | Description            |
| --------- | ----------- | ---------------------- |
| `user`    | `principal` | The user's identifier. |
| `asset`   | `principal` | The asset identifier.  |

#### `get-user-index`

Gets the user index for an asset.

| Parameter | Type        | Description            |
| --------- | ----------- | ---------------------- |
| `user`    | `principal` | The user's identifier. |
| `asset`   | `principal` | The asset identifier.  |

#### `set-assets`

Sets the list of assets in the protocol.

| Parameter | Type             | Description                    |
| --------- | ---------------- | ------------------------------ |
| `data`    | `list principal` | The list of asset identifiers. |

#### `get-assets`

Gets the list of assets in the protocol.

#### `set-isolated-assets`

Sets whether an asset is isolated.

| Parameter | Type        | Description                    |
| --------- | ----------- | ------------------------------ |
| `reserve` | `principal` | The reserve identifier.        |
| `data`    | `bool`      | Whether the asset is isolated. |

#### `delete-isolated-assets`

Deletes the isolated status of an asset.

| Parameter | Type        | Description             |
| --------- | ----------- | ----------------------- |
| `reserve` | `principal` | The reserve identifier. |

#### `get-isolated-assets`

Gets the isolated status of an asset.

| Parameter | Type        | Description             |
| --------- | ----------- | ----------------------- |
| `reserve` | `principal` | The reserve identifier. |

#### `set-borroweable-isolated`

Sets the list of assets that can be borrowed using isolated assets as collateral.

| Parameter | Type             | Description                    |
| --------- | ---------------- | ------------------------------ |
| `data`    | `list principal` | The list of asset identifiers. |

#### `get-borroweable-isolated`

Gets the list of assets that can be borrowed using isolated assets as collateral.

#### `set-optimal-utilization-rate`

Sets the optimal utilization rate for an asset.

| Parameter | Type        | Description                   |
| --------- | ----------- | ----------------------------- |
| `asset`   | `principal` | The asset identifier.         |
| `rate`    | `uint`      | The optimal utilization rate. |

#### `get-optimal-utilization-rate`

Gets the optimal utilization rate for an asset.

| Parameter | Type        | Description           |
| --------- | ----------- | --------------------- |
| `asset`   | `principal` | The asset identifier. |

#### `set-base-variable-borrow-rate`

Sets the base variable borrow rate for an asset.

| Parameter | Type        | Description                    |
| --------- | ----------- | ------------------------------ |
| `asset`   | `principal` | The asset identifier.          |
| `rate`    | `uint`      | The base variable borrow rate. |

#### `get-base-variable-borrow-rate`

Gets the base variable borrow rate for an asset.

| Parameter | Type        | Description           |
| --------- | ----------- | --------------------- |
| `asset`   | `principal` | The asset identifier. |

#### `set-variable-rate-slope-1`

Sets the first slope of the variable borrow rate for an asset.

| Parameter | Type        | Description           |
| --------- | ----------- | --------------------- |
| `asset`   | `principal` | The asset identifier. |
| `rate`    | `uint`      | The first slope rate. |

#### `get-variable-rate-slope-1`

Gets the first slope of the variable borrow rate for an asset.

| Parameter | Type        | Description           |
| --------- | ----------- | --------------------- |
| `asset`   | `principal` | The asset identifier. |

#### `set-variable-rate-slope-2`

Sets the second slope of the variable borrow rate for an asset.

| Parameter | Type        | Description            |
| --------- | ----------- | ---------------------- |
| `asset`   | `principal` | The asset identifier.  |
| `rate`    | `uint`      | The second slope rate. |

#### `get-variable-rate-slope-2`

Gets the second slope of the variable borrow rate for an asset.

| Parameter | Type        | Description           |
| --------- | ----------- | --------------------- |
| `asset`   | `principal` | The asset identifier. |

#### `set-liquidation-close-factor-percent`

Sets the liquidation close factor percentage for an asset.

| Parameter | Type        | Description                              |
| --------- | ----------- | ---------------------------------------- |
| `asset`   | `principal` | The asset identifier.                    |
| `rate`    | `uint`      | The liquidation close factor percentage. |

#### `get-liquidation-close-factor-percent`

Gets the liquidation close factor percentage for an asset.

| Parameter | Type        | Description           |
| --------- | ----------- | --------------------- |
| `asset`   | `principal` | The asset identifier. |

#### `set-origination-fee-prc`

Sets the origination fee percentage for an asset.

| Parameter | Type        | Description                     |
| --------- | ----------- | ------------------------------- |
| `asset`   | `principal` | The asset identifier.           |
| `prc`     | `uint`      | The origination fee percentage. |

#### `get-origination-fee-prc`

Gets the origination fee percentage for an asset.

| Parameter | Type        | Description           |
| --------- | ----------- | --------------------- |
| `asset`   | `principal` | The asset identifier. |

#### `set-reserve-factor`

Sets the reserve factor for an asset.

| Parameter | Type        | Description           |
| --------- | ----------- | --------------------- |
| `asset`   | `principal` | The asset identifier. |
| `factor`  | `uint`      | The reserve factor.   |

#### `get-reserve-factor`

Gets the reserve factor for an asset.

| Parameter | Type        | Description           |
| --------- | ----------- | --------------------- |
| `asset`   | `principal` | The asset identifier. |

#### `set-contract-owner`

Sets the owner of the contract.

| Parameter | Type        | Description             |
| --------- | ----------- | ----------------------- |
| `owner`   | `principal` | The new contract owner. |

#### `get-contract-owner`

Gets the owner of the contract.

#### `is-contract-owner`

Checks if a given principal is the contract owner.

| Parameter | Type        | Description          |
| --------- | ----------- | -------------------- |
| `caller`  | `principal` | The caller to check. |

#### `set-approved-contract`

Approves or revokes a contract's access to modify protected state variables.

| Parameter  | Type        | Description                           |
| ---------- | ----------- | ------------------------------------- |
| `contract` | `principal` | The contract to approve or revoke.    |
| `enabled`  | `bool`      | `true` to approve, `false` to revoke. |

#### `delete-approved-contract`

Deletes an approved contract from the list of approved contracts.

| Parameter  | Type        | Description             |
| ---------- | ----------- | ----------------------- |
| `contract` | `principal` | The contract to delete. |

#### `is-approved-contract`

Checks if a contract is approved.

| Parameter  | Type        | Description            |
| ---------- | ----------- | ---------------------- |
| `contract` | `principal` | The contract to check. |


---

# 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.zestprotocol.com/start/borrow-1/stacks-market-v1-smart-contracts-overview/reserve-and-configuration-v1/pool-reserve-data.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.
