Skip to content

Commit cb2a279

Browse files
committed
fix: constants on token addresses; update docs
1 parent fa7f769 commit cb2a279

File tree

3 files changed

+40
-24
lines changed

3 files changed

+40
-24
lines changed

docs/Horizon/Horizon-overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ All other existing functionality remains unchanged from v3.3. Stablecoins, or ot
8787
- borrowingEnabled: true
8888
- borrowableInIsolation: true
8989
- withSiloedBorrowing: false
90-
- flashloanable: true (authorized flashborrowers can be configured)
90+
- flashloanable: false
9191
- LTV: 0
9292
- liquidationThreshold: 0 (to disable its use as collateral)
9393
- liquidationBonus: N/A (can be 0)
@@ -97,11 +97,11 @@ All other existing functionality remains unchanged from v3.3. Stablecoins, or ot
9797
- debtCeiling: 0 (only applies to isolated asset)
9898
- liquidationProtocolFee: 0 (as it won't apply for a non-collateral asset)
9999

100-
Stablecoins, or other non-RWA permissionless assets, may also be configured as collateral in the future, by setting `liquidationThreshold` above `0`. In such case, natively permissionless borrowing would therefore be enabled within the instance.
100+
Stablecoins, or other non-RWA permissionless assets, may also be configured as collateral in the future, by setting `liquidationThreshold` above `0`. In such case, natively permissionless borrowing would therefore be enabled within the instance. Flashloans and authorized flashborrowers may be configured in the future.
101101

102102
## Edge Cases of Note
103103

104-
Consider the following scenarios involving the example permissioned `RWA_1` token.
104+
Consider the following scenarios involving the example permissioned `RWA_1` token. Flashloans may be utilized from other protocols if disabled in Horizon.
105105

106106
### RWA Holder Loses Private Keys to Wallet
107107

src/deployments/inputs/HorizonPhaseOneUpdate.sol

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,16 @@ import {EngineFlags} from '../../contracts/extensions/v3-config-engine/EngineFla
66
import {AaveV3Payload} from '../../contracts/extensions/v3-config-engine/AaveV3Payload.sol';
77

88
contract HorizonPhaseOneUpdate is AaveV3Payload {
9-
address public immutable GHO_ADDRESS;
10-
address public immutable USDC_ADDRESS;
11-
address public immutable RLUSD_ADDRESS;
12-
address public immutable USTB_ADDRESS;
13-
address public immutable USCC_ADDRESS;
14-
address public immutable USYC_ADDRESS;
15-
address public immutable JTRSY_ADDRESS;
16-
address public immutable JAAA_ADDRESS;
17-
18-
constructor(address configEngine) AaveV3Payload(IEngine(configEngine)) {
19-
GHO_ADDRESS = 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f;
20-
USDC_ADDRESS = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
21-
RLUSD_ADDRESS = 0x8292Bb45bf1Ee4d140127049757C2E0fF06317eD;
22-
USTB_ADDRESS = 0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e;
23-
USCC_ADDRESS = 0x14d60E7FDC0D71d8611742720E4C50E7a974020c;
24-
USYC_ADDRESS = 0x136471a34f6ef19fE571EFFC1CA711fdb8E49f2b;
25-
JTRSY_ADDRESS = 0x8c213ee79581Ff4984583C6a801e5263418C4b86;
26-
JAAA_ADDRESS = 0x5a0F93D040De44e78F251b03c43be9CF317Dcf64;
27-
}
9+
address public constant GHO_ADDRESS = 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f;
10+
address public constant USDC_ADDRESS = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
11+
address public constant RLUSD_ADDRESS = 0x8292Bb45bf1Ee4d140127049757C2E0fF06317eD;
12+
address public constant USTB_ADDRESS = 0x43415eB6ff9DB7E26A15b704e7A3eDCe97d31C4e;
13+
address public constant USCC_ADDRESS = 0x14d60E7FDC0D71d8611742720E4C50E7a974020c;
14+
address public constant USYC_ADDRESS = 0x136471a34f6ef19fE571EFFC1CA711fdb8E49f2b;
15+
address public constant JTRSY_ADDRESS = 0x8c213ee79581Ff4984583C6a801e5263418C4b86;
16+
address public constant JAAA_ADDRESS = 0x5a0F93D040De44e78F251b03c43be9CF317Dcf64;
17+
18+
constructor(address configEngine) AaveV3Payload(IEngine(configEngine)) {}
2819

2920
function capsUpdates() public view override returns (IEngine.CapsUpdate[] memory) {
3021
IEngine.CapsUpdate[] memory caps = new IEngine.CapsUpdate[](8);

tests/deployments/HorizonPhaseOneUpdate.t.sol

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,38 @@ contract HorizonPhaseOneUpdateTest is HorizonPhaseOneListingTest {
274274
}
275275
}
276276

277-
contract HorizonPhaseOneUpdateForkTest is HorizonPhaseOneUpdateTest {
277+
contract HorizonPhaseOneUpdatePostDeploymentForkTest is HorizonPhaseOneUpdateTest {
278278
function setUp() public override {
279-
vm.skip(true, 'post-payload execution');
279+
vm.skip(true, 'post-payload deployment');
280280
super.setUp();
281281
}
282282

283283
function loadDeployment() internal override returns (DeploymentInfo memory) {
284+
address horizonPhaseOneUpdate; // TODO: deployed payload address
285+
vm.prank(EMERGENCY_MULTISIG);
286+
(bool success, ) = LISTING_EXECUTOR_ADDRESS.call(
287+
abi.encodeWithSignature(
288+
'executeTransaction(address,uint256,string,bytes,bool)',
289+
address(horizonPhaseOneUpdate), // target
290+
0, // value
291+
'execute()', // signature
292+
'', // data
293+
true // withDelegatecall
294+
)
295+
);
296+
require(success, 'Failed to execute transaction');
297+
298+
return deploymentInfo;
299+
}
300+
}
301+
302+
contract HorizonPhaseOneUpdatePostExecutionForkTest is HorizonPhaseOneUpdateTest {
303+
function setUp() public override {
304+
vm.skip(true, 'post-payload execution');
305+
super.setUp();
306+
}
307+
308+
function loadDeployment() internal view override returns (DeploymentInfo memory) {
284309
return deploymentInfo;
285310
}
286311
}

0 commit comments

Comments
 (0)