# ACLManager

The ACLManager (Access Control List Manager) is the registry of roles and permissions within Tydro. It ensures that sensitive operations are restricted to authorised addresses and that responsibilities are clearly separated across different roles.

Tydro implements an access control list to segregate powers and/or benefits that can be allocated to different entities on the protocol. The ACL\_MANAGER contract is managed by the [PoolAddressesProvider](/developers/smart-contracts/pool-addresses-provider.md) contract.

ACLManager keeps track of the individual roles and its holders, and allows a *Role Admin* to manage roles. *Role Admin* is itself a role that is managed by the DEFAULT\_ADMIN\_ROLE.

The DEFAULT\_ADMIN\_ROLE is held by the [ACL\_ADMIN](#acl_admin), and should be initialized in the [PoolAddressesProvider](/developers/smart-contracts/pool-addresses-provider.md) beforehand.

### Roles

Below we outline the responsibilities/powers of the roles and the specific methods that are only accessible to the holders of these roles.

The [FLASH\_BORROWER](/developers/smart-contracts/aclmanager.md#flash_borrower) and [BRIDGE](/developers/smart-contracts/aclmanager.md#bridge) roles have few direct responsibilities and can primarily access specific features of the protocol, while ADMIN roles have the power and responsibility to handle risk or configuration parameters.

#### FLASH\_BORROWER

Holders of this role will have the premium on flash loans waived (this does not include the simple flash loan).

**Methods Accessible:**

[**Pool**](/developers/smart-contracts/pool.md):

**Methods Accessible:**

[**Pool**](/developers/smart-contracts/pool.md):

* [mintUnbacked()](/developers/smart-contracts/pool.md#mintunbacked)
* [backUnbacked()](/developers/smart-contracts/pool.md#backunbacked)

#### ASSET\_LISTING\_ADMIN

Holders of this role can:

* Update asset oracle sources and the fallback oracle.
* Add new assets to the Tydro market.

**Methods Accessible:**

[TydroOracles:](/developers/smart-contracts/oracles.md)

* [setAssetSources()](/developers/smart-contracts/oracles.md#setassetsources)
* [setFallbackOracle()](/developers/smart-contracts/oracles.md#setfallbackoracle)

[**PoolConfigurator**](/developers/smart-contracts/pool-configurator.md):

* [initReserves()](/developers/smart-contracts/pool-configurator.md#initreserves)

#### RISK\_ADMIN

Holders of this role can:

* Update the grace period of Oracle Sentinels.
* Update reserve parameters such as reserve factor, caps, E-Mode category, borrowing enabled, freeze/unfreeze, LTV, liquidation threshold, liquidation bonus (cannot pause/unpause or activate/deactivate a reserve).
* Create new and update existing E-Mode categories (not category 0).
* Update unbacked mint cap and liquidation protocol fee.

**Methods Accessible:**

[**PoolConfigurator**](/developers/smart-contracts/pool-configurator.md):

* [setReserveBorrowing()](/developers/smart-contracts/pool-configurator.md#setreserveborrowing)
* [configureReserveAsCollateral()](/developers/smart-contracts/pool-configurator.md#configurereserveascollateral)
* [setReserveFreeze()](/developers/smart-contracts/pool-configurator.md#setreservefreeze)
* [setBorrowableInIsolation()](/developers/smart-contracts/pool-configurator.md#setborrowableinisolation)
* [setReserveFactor()](/developers/smart-contracts/pool-configurator.md#setreservefactor)
* [setDebtCeiling()](/developers/smart-contracts/pool-configurator.md#setdebtceiling)
* [setSiloedBorrowing()](/developers/smart-contracts/pool-configurator.md#setsiloedborrowing)
* [setBorrowCap()](/developers/smart-contracts/pool-configurator.md#setborrowcap)
* [setSupplyCap()](/developers/smart-contracts/pool-configurator.md#setsupplycap)
* [setLiquidationProtocolFee()](/developers/smart-contracts/pool-configurator.md#setliquidationprotocolfee)
* [setEModeCategory()](/developers/smart-contracts/pool-configurator.md#setemodecategory)
* [setAssetCollateralInEMode()](/developers/smart-contracts/pool-configurator.md#setassetcollateralinemode)
* [setUnbackedMintCap()](/developers/smart-contracts/pool-configurator.md#setunbackedmintcap)
* [setReserveInterestRateStrategyAddress()](/developers/smart-contracts/pool-configurator.md#setreserveinterestratestrategyaddress)
* [setReserveInterestRateData()](/developers/smart-contracts/pool-configurator.md#setreserveinterestratedata)
* [disableLiquidationGracePeriod()](/developers/smart-contracts/pool-configurator.md#disableliquidationgraceperiod)
* [setReserveFlashLoaning()](/developers/smart-contracts/pool-configurator.md#setreserveflashloaning)

[**PriceOracleSentinel**](/developers/smart-contracts/oracles.md):

* [setGracePeriod()](/developers/smart-contracts/oracles.md#setgraceperiod)

#### ACL\_ADMIN

Holders of this role manage the role admins in the ACLManager. The DEFAULT\_ADMIN\_ROLE is held by the ACL\_ADMIN, and should be initialized in the PoolAddressesProvider beforehand.

**Methods Accessible:**

[**ACLManager**](/developers/smart-contracts/aclmanager.md):

* [setRoleAdmin()](/developers/smart-contracts/aclmanager.md#setroleadmin)
* [addPoolAdmin()](/developers/smart-contracts/aclmanager.md#addpooladmin)
* [removePoolAdmin()](/developers/smart-contracts/aclmanager.md#removepooladmin)
* [addEmergencyAdmin()](/developers/smart-contracts/aclmanager.md#addemergencyadmin)
* [removeEmergencyAdmin()](/developers/smart-contracts/aclmanager.md#removeemergencyadmin)
* [addRiskAdmin()](/developers/smart-contracts/aclmanager.md#addriskadmin)
* [removeRiskAdmin()](/developers/smart-contracts/aclmanager.md#removeriskadmin)
* [addFlashBorrower()](/developers/smart-contracts/aclmanager.md#addflashborrower)
* [removeFlashBorrower()](/developers/smart-contracts/aclmanager.md#removeflashborrower)
* [addBridge()](/developers/smart-contracts/aclmanager.md#addbridge)
* [removeBridge()](/developers/smart-contracts/aclmanager.md#removebridge)
* [addAssetListingAdmin()](/developers/smart-contracts/aclmanager.md#addassetlistingadmin)
* [removeAssetListingAdmin()](/developers/smart-contracts/aclmanager.md#removeassetlistingadmin)

#### EMERGENCY\_ADMIN

Holders of this role can pause and unpause the pool or an individual reserve.

**Methods Accessible:**

[**PoolConfigurator**](/developers/smart-contracts/pool-configurator.md):

* [setReservePause()](/developers/smart-contracts/pool-configurator.md#setreservepause)
* [setPoolPause()](/developers/smart-contracts/pool-configurator.md#setpoolpause)
* [setReserveActive()](/developers/smart-contracts/pool-configurator.md#setreserveactive)
* [setReserveFreeze()](/developers/smart-contracts/pool-configurator.md#setreservefreeze)

#### POOL\_ADMIN

Holders of this role can update token implementations, drop, (un)pause and (de)activate reserves, update premiums along with everything the [ASSET\_LISTING\_ADMIN](/developers/smart-contracts/aclmanager.md#asset_listing_admin) and [RISK\_ADMIN](/developers/smart-contracts/aclmanager.md#risk_admin) can do.

The [POOL\_ADMIN](/developers/smart-contracts/aclmanager.md#pool_admin) role is governed by the Guardians multisig.

**Methods Accessible:**

All methods accessible to ASSET\_LISTING\_ADMIN.

All methods accessible to RISK\_ADMIN.

[**AToken**](/developers/smart-contracts/tokenization.md):

* [rescueTokens()](/developers/smart-contracts/tokenization.md#rescuetokens)

[**Pool**](/developers/smart-contracts/pool.md):

* [rescueTokens()](/developers/smart-contracts/pool.md#rescuetokens)

[**PoolConfigurator**](/developers/smart-contracts/pool-configurator.md):

* [dropReserve()](/developers/smart-contracts/pool-configurator.md#dropreserve)
* [updateAToken()](/developers/smart-contracts/pool-configurator.md#updateatoken)
* [updateVariableDebtToken()](/developers/smart-contracts/pool-configurator.md#updatevariabledebttoken)
* [setReserveActive()](/developers/smart-contracts/pool-configurator.md#setreserveactive)
* [updateBridgeProtocolFee()](/developers/smart-contracts/pool-configurator.md#updatebridgeprotocolfee)
* [updateFlashloanPremiumTotal()](/developers/smart-contracts/pool-configurator.md#updateflashloanpremiumtotal)
* [updateFlashloanPremiumToProtocol()](/developers/smart-contracts/pool-configurator.md#updateflashloanpremiumtoprotocol)
* [setAssetBorrowableInEMode()](/developers/smart-contracts/pool-configurator.md#setassetborrowableinemode)
* [setReserveInterestRateData()](/developers/smart-contracts/pool-configurator.md#setreserveinterestratedata)
* [setReserveInterestRateStrategyAddress()](/developers/smart-contracts/pool-configurator.md#setreserveinterestratestrategyaddress)

[**PriceOracleSentinel**](/developers/smart-contracts/oracles.md):

* [setSequencerOracle()](/developers/smart-contracts/oracles.md#setsequenceroracle)

### Write Methods

#### setRoleAdmin

```
function setRoleAdmin(bytes32 role, bytes32 adminRole) external override onlyRole(DEFAULT_ADMIN_ROLE)
```

Sets the role as admin of a specific role. By default, the adminRole for all roles is [DEFAULT\_ADMIN\_ROLE](/developers/smart-contracts/aclmanager.md#acl_admin).

This method can only be called by an address with [DEFAULT\_ADMIN\_ROLE](/developers/smart-contracts/aclmanager.md#acl_admin).

**Input Parameters:**

| Name      | Type    | Description                                                                                                                                                                   |
| --------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| role      | bytes32 | The role to be managed by the admin role - keccak256 hash of one of the following: POOL\_ADMIN, EMERGENCY\_ADMIN, RISK\_ADMIN, FLASH\_BORROWER, BRIDGE, ASSET\_LISTING\_ADMIN |
| adminRole | bytes32 | The admin role. 0x00 is reserved for the DEFAULT\_ADMIN\_ROLE                                                                                                                 |

#### addPoolAdmin

```
function addPoolAdmin(address admin) external override
```

Adds a new admin as *Pool Admin*. The address is added to the list of members with the [POOL\_ADMIN](/developers/smart-contracts/aclmanager.md#acl_admin) role. Holders of this role can update token implementations, drop, (un)pause and (de)activate reserves, update premiums and do everything the [ASSET\_LISTING\_ADMIN](/developers/smart-contracts/aclmanager.md#asset_listing_admin) and [RISK\_ADMIN](/developers/smart-contracts/aclmanager.md#risk_admin) can do.

This method can only be called by the *Role Admin*, specified by Tydro, responsible for managing the [POOL\_ADMIN](/developers/smart-contracts/aclmanager.md#pool_admin) role.

**Input Parameters:**

| Name  | Type    | Description                                            |
| ----- | ------- | ------------------------------------------------------ |
| admin | address | The address which will be granted the POOL\_ADMIN role |

#### removePoolAdmin

```
function removePoolAdmin(address admin) external override
```

Removes an admin as *Pool Admin*. The given address is removed from the list of members with the [POOL\_ADMIN](/developers/smart-contracts/aclmanager.md#pool_admin) role.

This method can only be called by the *Role Admin*, specified by Tydro, responsible for managing the [POOL\_ADMIN](/developers/smart-contracts/aclmanager.md#pool_admin) role.

**Input Parameters:**

| Name  | Type    | Description                                                            |
| ----- | ------- | ---------------------------------------------------------------------- |
| admin | address | The address for which the POOL\_ADMIN role permissions will be removed |

#### addEmergencyAdmin

```
function addEmergencyAdmin(address admin) external override
```

Adds a new admin as an *Emergency Admin*. The address is added to the list of members with the [EMERGENCY\_ADMIN](/developers/smart-contracts/aclmanager.md#emergency_admin) role. Holders of this role can pause and unpause the pool or an individual reserve.

This method can only be called by the *Role Admin*, specified by Tydro, responsible for managing the [EMERGENCY\_ADMIN](/developers/smart-contracts/aclmanager.md#emergency_admin) role.

**Input Parameters:**

| Name  | Type    | Description                                                 |
| ----- | ------- | ----------------------------------------------------------- |
| admin | address | The address which will be granted the EMERGENCY\_ADMIN role |

#### removeEmergencyAdmin

```
function removeEmergencyAdmin(address admin) external override
```

Removes an admin as *Emergency Admin*. The given address is removed from the list of members with the [EMERGENCY\_ADMIN](/developers/smart-contracts/aclmanager.md#emergency_admin) role.

This method can only be called by the *Role Admin*, specified by Tydro, responsible for managing the [EMERGENCY\_ADMIN](/developers/smart-contracts/aclmanager.md#emergency_admin) role.

**Input Parameters:**

| Name  | Type    | Description                                                                 |
| ----- | ------- | --------------------------------------------------------------------------- |
| admin | address | The address for which the EMERGENCY\_ADMIN role permissions will be removed |

#### addRiskAdmin

```
function addRiskAdmin(address admin) external override
```

Adds a new admin as a *Risk Admin*. The address is added to the list of members with the [RISK\_ADMIN](/developers/smart-contracts/aclmanager.md#risk_admin) role. Holders of this role can update grace period of Oracle Sentinels, reserve params, unbacked mint cap, liquidation fee and eMode categories.

**Input Parameters:**

| Name  | Type    | Description                                            |
| ----- | ------- | ------------------------------------------------------ |
| admin | address | The address which will be granted the RISK\_ADMIN role |

#### removeRiskAdmin

```
function removeRiskAdmin(address admin) external override
```

Removes an admin as *Risk Admin*. The given address is removed from the list of members with the [RISK\_ADMIN](/developers/smart-contracts/aclmanager.md#risk_admin) role.

**Input Parameters:**

| Name  | Type    | Description                                                            |
| ----- | ------- | ---------------------------------------------------------------------- |
| admin | address | The address for which the RISK\_ADMIN role permissions will be removed |

#### addFlashBorrower

```
function addFlashBorrower(address borrower) external override
```

Adds a new borrower address as *Flash Borrower*. The address is added to the list of members with the [FLASH\_BORROWER](/developers/smart-contracts/aclmanager.md#flash_borrower) role. Holders of this role do not pay premium for flash loan (does not apply to flashLoanSimple).

**Input Parameters:**

| Name     | Type    | Description                                                |
| -------- | ------- | ---------------------------------------------------------- |
| borrower | address | The address which will be granted the FLASH\_BORROWER role |

#### removeFlashBorrower

```
function removeFlashBorrower(address borrower) external override
```

Removes an admin as *Flash Borrower*. The given borrower address is removed from the list of members with the [FLASH\_BORROWER](/developers/smart-contracts/aclmanager.md#flash_borrower) role.

**Input Parameters:**

| Name     | Type    | Description                                                                |
| -------- | ------- | -------------------------------------------------------------------------- |
| borrower | address | The address for which the FLASH\_BORROWER role permissions will be removed |

**Input Parameters:**

| Name   | Type    | Description                                   |
| ------ | ------- | --------------------------------------------- |
| bridge | address | The address which will be granted BRIDGE role |

#### addAssetListingAdmin

```
function addAssetListingAdmin(address admin) external override
```

Adds a new admin as *Asset Listing Admin*. The address is added to the list of members with the [ASSET\_LISTING\_ADMIN](/developers/smart-contracts/aclmanager.md#asset_listing_admin) role. Holder of this role can update oracles and add new assets to the Aave market.

**Input Parameters:**

| Name  | Type    | Description                                                  |
| ----- | ------- | ------------------------------------------------------------ |
| admin | address | The address which will be granted ASSET\_LISTING\_ADMIN role |

#### removeAssetListingAdmin

```
function removeAssetListingAdmin(address admin) external override
```

Removes an admin as *Asset Listing Admin*. The given address is removed from the list of members with the [ASSET\_LISTING\_ADMIN](/developers/smart-contracts/aclmanager.md#asset_listing_admin) role.

**Input Parameters:**

| Name  | Type    | Description                                                                  |
| ----- | ------- | ---------------------------------------------------------------------------- |
| admin | address | The address for which ASSET\_LISTING\_ADMIN role permissions will be removed |

### View Methods

#### isPoolAdmin

```
function isPoolAdmin(address admin) external view override returns (bool)
```

Returns true if the address has the [POOL\_ADMIN](/developers/smart-contracts/aclmanager.md#pool_admin) role, false otherwise.

**Input Parameters:**

| Name  | Type    | Description          |
| ----- | ------- | -------------------- |
| admin | address | The address to check |

**Return Values:**

| Type | Description                                               |
| ---- | --------------------------------------------------------- |
| bool | true if the given address is POOL\_ADMIN, false otherwise |

#### isEmergencyAdmin

```
function isEmergencyAdmin(address admin) external view override returns (bool)
```

Returns true if the address has the [EMERGENCY\_ADMIN](/developers/smart-contracts/aclmanager.md#emergency_admin) role, false otherwise.

**Input Parameters:**

| Name  | Type    | Description          |
| ----- | ------- | -------------------- |
| admin | address | The address to check |

**Return Values:**

| Type | Description                                                    |
| ---- | -------------------------------------------------------------- |
| bool | true if the given address is EMERGENCY\_ADMIN, false otherwise |

#### isRiskAdmin

```
function isRiskAdmin(address admin) external view override returns (bool)
```

Returns true if the address has the [RISK\_ADMIN](/developers/smart-contracts/aclmanager.md#risk_admin) role, false otherwise.

**Input Parameters:**

| Name  | Type    | Description          |
| ----- | ------- | -------------------- |
| admin | address | The address to check |

**Return Values:**

| Type | Description                                               |
| ---- | --------------------------------------------------------- |
| bool | true if the given address is RISK\_ADMIN, false otherwise |

#### isFlashBorrower

```
function isFlashBorrower(address borrower) external view override returns (bool)
```

Returns true if the address has the [FLASH\_BORROWER](/developers/smart-contracts/aclmanager.md#flash_borrower) role, false otherwise.

**Input Parameters:**

| Name     | Type    | Description          |
| -------- | ------- | -------------------- |
| borrower | address | The address to check |

**Return Values:**

| Type | Description                                                   |
| ---- | ------------------------------------------------------------- |
| bool | true if the given address is FLASH\_BORROWER, false otherwise |

#### isBridge

```
function isBridge(address bridge) external view override returns (bool)
```

Returns true if the address has [BRIDGE](/developers/smart-contracts/aclmanager.md#isbridge) role, false otherwise.

**Input Parameters:**

| Name   | Type    | Description          |
| ------ | ------- | -------------------- |
| bridge | address | The address to check |

**Return Values:**

| Type | Description                                          |
| ---- | ---------------------------------------------------- |
| bool | true if the given address is BRIDGE, false otherwise |

#### isAssetListingAdmin

```
function isAssetListingAdmin(address admin) external view override returns (bool)
```

Returns true if the address has the [ASSET\_LISTING\_ADMIN](/developers/smart-contracts/aclmanager.md#asset_listing_admin) role, false otherwise.

**Input Parameters:**

| Name  | Type    | Description          |
| ----- | ------- | -------------------- |
| admin | address | The address to check |

**Return Values:**

| Type | Description                                                         |
| ---- | ------------------------------------------------------------------- |
| bool | true if the given address is ASSET\_LISTING\_ADMIN, false otherwise |


---

# 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.tydro.com/developers/smart-contracts/aclmanager.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.
