PermissionManager

PermissionManager

The PermissionManager contract implements the basic whitelisting functions for the actors in the permissioned market aka Aave Arc.

The source code can be found on Github here.

Protocol Actors

Whitelister

Only certain entities have permission to 'whitelist' wallet addresses. These are the permissionAdmins that can add/remove permission to wallet address to participate in Aave Arc. Whitelisters are responsible for conducting KYC/AML diligence on the entities or individuals associated with the wallet addresses seeking to interact with the Aave Arc market.

A new whitelister can be added only by the Owner of the PermissionManager contract i.e. Aave Governance executor.

Users

Only those individuals/entities with Ethereum wallet addresses that have been “whitelisted” to act in one or more valid role (enumerated👇🏻) have permission to participate in Aave Arc pool.

Permission-ed Roles

  • 0: Depositor

  • 1: Borrower

  • 2: Liquidator

  • 3: Stable Rate Manager


Methods

Write Methods

addPermissionAdmins

Adds a new whitelister for the permission-ed market.

msg.sender must be the owner of the contract.

removePermissionAdmins

Removes an existing whitelister of the permission-ed market.

msg.sender must be the owner of the contract.

addPermissions

Allows permission admins to whitelist a set of addresses for various permission-ed roles.

Few conditions for whitelister:

  • msg.sender must be a PermissionAdmin aka whitelister

  • user must not be already whitelisted by some other PermssionAdmin

  • roles.length must be same as users.length

removePermissions

Allows owner to remove permissions on a set of addresses for varous permission-ed roles.

Few conditions for whitelister:

  • msg.sender must be a PermissionAdmin aka whitelister

  • user must have beed whitelisted by same PermssionAdmin

  • roles.length must be same as users.length

View Methods

getUserPermissions

Returns the permissions configuration for a specific account.

Call Params

Return Values

isInRole

Used to query if a certain account has permission for the given role.

Call Params

Return Values

isInAllRoles

Used to query if a certain account has permission for all of the roles passed as parameter.

Call Params

Return Values

isInAnyRole

Used to query if a certain account has permission for any of the roles passed as parameter.

Call Params

Return Values

isPermissionsAdmin

Returns true if the the account has permission to whitelist ie. account is PermissionAdmin.

Call Params

Return Values

getUserPermissionAdmin

Returns address of the PermissionAdmin that whitelisted (added role for) the given user.

Call Params

Return Values

isUserPermissionAdminValid

Used to query if PermissionAdmin that whitelisted given user is still valid and has not been removed from the list of whitelister.

Call Params

Return Values

Last updated