# Permissioned Debt Tokens

## Permissioned Debt Tokens

## Debt Tokens

Aave Arc  uses "permissioned" debt tokens — electronic receipts of borrow transactions — so that only the addresses added for the `BORROWER` role in Aave ARC Market are allowed to participate as borrower whether borrowing against their own collateral or using the credit delegation feature. Each asset for which borrowing is enabled (variable or stable or both) have either or both of the below mentioned debt token deployed.

The source code can be found on Github [here](https://github.com/aave/protocol-v2/tree/feat/permissioned-market/contracts/protocol/tokenization).

### PermissionedStableDebtToken

Implements a stable debt token to track borrowing positions of users with positions of a stable rate. It also allows permissioned roles on credit delegations.

### PermissionedVariableDebtToken

Implements a variable debt token to track borrowing positions of users with positions of variable rates. It also allows permissioned roles on credit delegations.&#x20;

## Approving delegation

The approveDelegation() method must be called by the depositor (delegator), approving the borrower (delegatee) a certain amount.

This is done for each debt token that needs to be delegated.

The depositor (delegator) does not need to already have deposited funds in the protocol to `approveDelegation()`. However, **before** the borrower (delegatee) executes `borrow()`, there must be sufficient collateral assigned to the depositor (delegator) in the protocol.

{% hint style="info" %}
`msg.sender` must be whitelisted for [BORROWER](https://aave-arc.gitbook.io/docs/permissionmanager#users) role.
{% endhint %}

## Borrowing the credit

The borrower (delegatee) calls the [`borrow`](https://aave-arc.gitbook.io/docs/permissionedlendingpool#write-methods)`()` method on the `LendingPool`, using the depositor's (delegator's) address in final parameter `onBehalfOf`.

{% hint style="info" %}
`msg.sender` and `onBehalfOf` must be whitelisted for [BORROWER](https://aave-arc.gitbook.io/docs/permissionmanager#users) role. `permissionAdmin` that whitelisted `onBehalfOf` must be still valid.
{% endhint %}
