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.

ParamType

admins

address[]

Addresses to be added as market's PermissionAdmin aka whitelisters

removePermissionAdmins

Removes an existing whitelister of the permission-ed market.

msg.sender must be the owner of the contract.

ParamType

admins

address[]

Addresses to be removed as market's PermissionAdmin aka whitelisters

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

ParamType

roles

uint256[]

List of permissioned roles to be added for corresponding user addresses

users

address[]

User addresses to be whitelisted. This needs to contain the same number of elements as roles

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

ParamType

roles

uint256[]

List of permissioned roles to be removed for corresponding user addresses

users

address[]

User addresses to be removed from whitelisted roles. This needs to contain the same number of elements as roles

View Methods

getUserPermissions

Returns the permissions configuration for a specific account.

Call Params

ParamType

user

address

address of the user

Return Values

ParamType

roles

uint256[]

List of roles for which user address has permission

rolesCount

uint256

Total number of roles for which user address has permission

isInRole

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

Call Params

ParamType

user

address

address of the user

role

uint256

whitelisted role

0: Depositor

1: Borrower

2: Liquidator

3: Stable Rate Manager

Return Values

ParamType

inRole

bool

true if account has permissions for the specified role, else false

isInAllRoles

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

Call Params

ParamType

user

address

address of the user

roles

uint256[]

set of whitelisted roles

0: Depositor

1: Borrower

2: Liquidator

3: Stable Rate Manager

Return Values

ParamType

inRole

bool

true if account has permissions for all the specified roles, else false

isInAnyRole

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

Call Params

ParamType

user

address

address of the user

roles

uint256[]

set of whitelisted roles

0: Depositor

1: Borrower

2: Liquidator

3: Stable Rate Manager

Return Values

ParamType

inRole

bool

true if account has permissions for any of the specified roles, else false

isPermissionsAdmin

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

Call Params

ParamType

admin

address

address to be verified

Return Values

ParamType

isPermissionAdmin

bool

true if the account is a PermissionAdmin aka whitelister, else false

getUserPermissionAdmin

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

Call Params

ParamType

user

address

address of the user

Return Values

ParamType

permissionAdmin

address

address of the whitelister aka PermissionAdmin

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

ParamType

user

address

address of the user whose PermissionAdmin is being validated

Return Values

ParamType

isValidPermissionAdmin

bool

true if PermissionAdmin associated with the user address is valid, else false

Last updated