You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository will be subjected to [this bug bounty](https://immunefi.com/bounty/aave/) once the Aave Governance upgrades the smart contracts in the applicable production instances.
Copy file name to clipboardExpand all lines: docs/Horizon/Horizon-overview.md
+30-20Lines changed: 30 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,12 +26,12 @@ RWA assets can be listed by utilizing a newly developed aToken contract, `RwaATo
26
26
27
27
- RwaAToken transfers
28
28
- users cannot transfer their own RwaATokens (transfer, allowance, and permit related methods will revert).
29
-
- new `ATOKEN_ADMIN` role, which can forcibly transfer any RwaAToken without needing approval (but can still only transfer an RwaAToken amount up to a healthy collateralization/health factor). This role is expected to be given to the `RwaATokenManager` contract, which will granularly delegate authorization to individual accounts on a per-RwaAToken basis.
29
+
- new `ATOKEN_ADMIN` role, which can forcibly transfer any RwaAToken without needing approval (but can still only transfer an RwaAToken amount up to a healthy collateralization/health factor). This role is expected to be given to the `RwaATokenManager` contract, which will granularly delegate authorization to individual accounts on a per-RwaAToken basis.
30
30
- note that `ATOKEN_ADMIN` can also forcibly transfer RwaATokens away from the treasury address. While the treasury address currently does not receive RwaATokens of any sort through Reserve Factor or Liquidation Bonus, if this changes in the future there must be restrictions in place to protect RwaATokens earned by treasury.
31
31
-`RwaATokenManager` contract
32
32
- external RwaAToken manager smart contract which encodes granular authorized RwaAToken transfer permissions (by granting `AUTHORIZED_TRANSFER_ROLE` for specific RwaATokens).
33
33
- it is expected that only trusted parties (such as token Issuers) will be granted `AUTHORIZED_TRANSFER_ROLE`, and that RwaAToken authorized transfers will only occur in emergency situations (such as resolving [specific edge cases](#edge-cases-of-note)), rather than within the typical flow of operations.
34
-
- it is left to Authorized Transfer Admin to execute authorized transfers that ensure compliance (for example, ensuring that Authorized Transfer RwaAToken recipients are allowlisted to hold the corresponding RWA Token). This scenario is described [here](#non-allowlisted-account-can-receive-rwaatokens).
34
+
- it is left to Authorized Transfer Admin to execute authorized transfers that ensure compliance (for example, ensuring that Authorized Transfer RwaAToken recipients are allowlisted to hold the corresponding RWA Token). This scenario is described [here](#non-allowlisted-account-can-receive-rwaatokens).
35
35
- Supply
36
36
- can only be supplied by permissioned users allowlisted to hold RWA Token (will rely on underlying RWA asset-level permissioning).
37
37
- can be supplied as collateral, through proper risk configuration (non-zero LTV and Liquidation Threshold).
@@ -55,7 +55,7 @@ RWA assets can be listed by utilizing a newly developed aToken contract, `RwaATo
55
55
- RwaATokenManager contract address granted the RwaAToken admin role in the ACL Manager.
56
56
- further granular RwaAToken admin permissions will be configured in the RwaATokenManager contract itself.
57
57
- Token Issuers or relevant admin can be granted admin permissions on the RwaAToken corresponding to their specific RWA asset.
58
-
- No bridges/portals will be configured, hence no unbacked RwaATokens can be minted.
58
+
- No bridges/portals will be configured, hence no unbacked RwaATokens can be minted.
59
59
60
60
#### Reserve Configuration
61
61
@@ -76,15 +76,15 @@ RWA assets can be listed by utilizing a newly developed aToken contract, `RwaATo
Stablecoins, or other non-RWA assets, can be supplied permissionlessly to earn yield. However, they will only be able to be borrowed, but disabled as collateral assets (via asset configuration, by setting Liquidation Threshold to 0). Borrowing will be implicitly permissioned because only users that have supplied RWA assets can borrow stablecoins or other permissionless non-RWA assets (except in a potential edge case described [here](#non-allowlisted-account-can-receive-rwaatokens)).
79
+
Stablecoins, or other non-RWA assets, can be supplied permissionlessly to earn yield. However, they will only be able to be borrowed, but disabled as collateral assets (via asset configuration, by setting Liquidation Threshold to 0). Borrowing will be implicitly permissioned because only users that have supplied RWA assets can borrow stablecoins or other permissionless non-RWA assets (except in a potential edge case described [here](#non-allowlisted-account-can-receive-rwaatokens)).
80
80
81
81
All other existing functionality remains unchanged from v3.3. Stablecoins, or other non-RWA assets, will be listed and operate as usual, following the standard process.
82
82
83
83
#### Reserve Configuration
84
84
85
85
- priceFeed: different per asset, Chainlink-compatible
86
-
- rateStrategyParams: different per asset
87
-
- borrowingEnabled: true
86
+
- rateStrategyParams: different per asset
87
+
- borrowingEnabled: true
88
88
- borrowableInIsolation: true
89
89
- withSiloedBorrowing: false
90
90
- flashloanable: true (authorized flashborrowers can be configured)
@@ -121,13 +121,13 @@ If a user has a borrow position but loses private keys to their wallet, this pos
121
121
122
122
#### Resolution
123
123
124
-
1.`ALICE` creates a new wallet, `ALICE2`.
124
+
1.`ALICE` creates a new wallet, `ALICE2`.
125
125
2.`RWA_1_ISSUER` creates a new multisig wallet controlled by `RWA_1_ISSUER` and `ALICE2` with 1 of 2 signers (`NEW_ALICE_WALLET`) which will eventually be fully transferred to `ALICE2`.
126
126
3.`RWA_1_ISSUER` executes a "complex" flashloan for `50 USDC` by calling `Pool.flashLoan(...)`. In the flashloan callback, `RWA_1_ISSUER`:
127
-
- repays the `50 USDC` debt `onBehalfOf``ALICE`.
128
-
- executes `RwaATokenManager.transferRwaAToken` to transfer `100 aRWA_1` to `NEW_ALICE_WALLET`.
129
-
-`RWA_1_ISSUER` opens a new borrow position from `NEW_ALICE_WALLET` for `50 USDC`.
130
-
-`RWA_1_ISSUER` repays flashloan using newly borrowed `50 USDC`.
127
+
- repays the `50 USDC` debt `onBehalfOf``ALICE`.
128
+
- executes `RwaATokenManager.transferRwaAToken` to transfer `100 aRWA_1` to `NEW_ALICE_WALLET`.
129
+
-`RWA_1_ISSUER` opens a new borrow position from `NEW_ALICE_WALLET` for `50 USDC`.
130
+
-`RWA_1_ISSUER` repays flashloan using newly borrowed `50 USDC`.
131
131
4.`RWA_1_ISSUER` revokes its signing role from `NEW_ALICE_WALLET`, fully transferring ownership to `ALICE2`.
132
132
133
133
At the conclusion, `RWA_1_ISSUER` will have migrated both `ALICE`'s initial debt and collateral positions to `NEW_ALICE_WALLET`, which will be fully controlled by `ALICE2`. It is not strictly necessary for `RWA_1_ISSUER` to be granted the `FLASH_BORROWER_ROLE`, but this will be helpful in cases where the position to migrate is large, ensuring that `RWA_1_ISSUER` will not be required to consistently maintain a liquidity buffer on hand to resolve this situation. This also allows for the position to be migrated without paying a premium for the flashloaned amount.
@@ -156,7 +156,7 @@ If a user creates a debt position but then becomes sanctioned, their actions may
156
156
-`RWA_1_ISSUER` calls `RwaAToken.authorizedTransfer` to move all `1000 aRWA_1` collateral to a separate trusted address (`RWA_1_TRUSTED`) to be custodied until the sanction case is resolved.
157
157
-`RWA_1_ISSUER` retains off-chain agreement with `ALICE` to recoup `100 USDC` repaid debt.
158
158
159
-
At the conclusion, `aRWA_1` custodied by `RWA_1_TRUSTED` can be returned or moved elsewhere to ensure legal compliance. It is left to `RWA_1_ISSUER` to adjudicate as required.
159
+
At the conclusion, `aRWA_1` custodied by `RWA_1_TRUSTED` can be returned or moved elsewhere to ensure legal compliance. It is left to `RWA_1_ISSUER` to adjudicate as required.
160
160
161
161
#### Limitations
162
162
@@ -169,11 +169,12 @@ Consider the following scenarios involving the example permissioned `RWA_1` toke
169
169
170
170
### Non Allowlisted Account Can Receive RwaATokens
171
171
172
-
`authorizedTransfer` of RwaATokens do not validate that recipient addresses belong to the allowlist of the underlying RWA Token. It is left to Authorized Transfer Admin to execute authorized transfers that adhere to the proper underlying RWA Token mechanics and ensure legal compliance.
172
+
`authorizedTransfer` of RwaATokens do not validate that recipient addresses belong to the allowlist of the underlying RWA Token. It is left to Authorized Transfer Admin to execute authorized transfers that adhere to the proper underlying RWA Token mechanics and ensure legal compliance.
173
173
174
-
This theoretically allows recipients to open stablecoin debt positions without owning underlying RWA Tokens. Consider the following scenario.
174
+
This theoretically allows recipients to open stablecoin debt positions without owning underlying RWA Tokens. Consider the following scenario.
175
175
176
176
Assumptions:
177
+
177
178
-`RWA_1_ISSUER` has been granted `AUTHORIZED_TRANSFER_ROLE` in the RwaATokenManager contract for `aRWA_1`..
178
179
-`ALICE` is allowlisted to hold `RWA_1` and has supplied `100 RWA_1` to Horizon, receiving `100 aRWA_1`.
179
180
-`BOB` is not allowlisted to hold `RWA_1`.
@@ -186,9 +187,10 @@ Assumptions:
186
187
187
188
### `Withdraw` as a Transfer of Underlying RWA Token
188
189
189
-
By specifying an arbitrary `to` address argument in the `withdraw` function, users who have supplied RWA Tokens can withdraw them to any other allowlisted account. This should be considered a standard ERC20 transfer and will adhere to the same restrictions imposed by the underlying RWA Token.
190
+
By specifying an arbitrary `to` address argument in the `withdraw` function, users who have supplied RWA Tokens can withdraw them to any other allowlisted account. This should be considered a standard ERC20 transfer and will adhere to the same restrictions imposed by the underlying RWA Token.
@@ -240,17 +245,19 @@ The `RWA_1` Transfer Agent must properly record this action officially as a tran
240
245
241
246
### `Liquidation` as a Transfer of Underlying RWA Token
242
247
243
-
During a liquidation, collateral seized from the user being liquidated will be transferred to the liquidator. This should also be considered a standard ERC20 transfer.
248
+
During a liquidation, collateral seized from the user being liquidated will be transferred to the liquidator. This should also be considered a standard ERC20 transfer.
244
249
245
250
Assumptions:
251
+
246
252
-`BOB` and `ALICE` are allowlisted to hold `RWA_1`.
247
253
-`ALICE` has an off-chain legal agreement with `RWA_1_ISSUER` to be able to be a liquidator.
248
254
-`LTV` of `RWA_1` is `>80%` in Horizon.
249
255
-`RWA_1` and `aRWA_1` have decimals of 8.
250
256
251
257
Consider the following scenario:
258
+
252
259
-`BOB` supplies `100 RWA_1`, and borrows `80 USDC`.
253
-
- time flies and `Bob`'s `USDC` debt grows to `120 USDC` through accumulation of interest. His position is no longer healthy and it becomes eligible for liquidation.
260
+
- time flies and `Bob`'s `USDC` debt grows to `120 USDC` through accumulation of interest. His position is no longer healthy and it becomes eligible for liquidation.
254
261
-`ALICE` executes a `liquidationCall` on `BOB`'s position, and receives all of `BOB`'s `100 RWA_1` collateral (which includes the liquidation bonus) by repaying `BOB`'s `120 USDC` debt.
0 commit comments