Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Raw diff

```json
{
"poolConfig": {
"priceOracleSentinel": {
"from": "0x0000000000000000000000000000000000000000",
"to": "0x06C5c197EdFDF2Ed0A3757880242B2264EF7c3C2"
}
},
"raw": {
"0x9f7cf9417d5251c59fe94fb9147feee1aad9cea5": {
"label": "AaveV3Celo.POOL_ADDRESSES_PROVIDER",
"contract": "lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy",
"balanceDiff": null,
"nonceDiff": null,
"stateDiff": {
"0x0d2c1bcee56447b4f46248272f34207a580a5c40f666a31f4e2fbb470ea53ab8": {
"previousValue": "0x0000000000000000000000000000000000000000000000000000000000000000",
"newValue": "0x00000000000000000000000006c5c197edfdf2ed0a3757880242b2264ef7c3c2"
}
}
},
"0xe48e10834c04e394a04bf22a565d063d40b9fa42": {
"label": "GovernanceV3Celo.PAYLOADS_CONTROLLER",
"contract": "lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy",
"balanceDiff": null,
"nonceDiff": null,
"stateDiff": {
"0x8a8dc4e5242ea8b1ab1d60606dae757e6c2cca9f92a2cced9f72c19960bcb458": {
"previousValue": "0x0068db8b79000000000002000000000000000000000000000000000000000000",
"newValue": "0x0068db8b79000000000003000000000000000000000000000000000000000000"
},
"0x8a8dc4e5242ea8b1ab1d60606dae757e6c2cca9f92a2cced9f72c19960bcb459": {
"previousValue": "0x000000000000000000093a800000000000006909affa00000000000000000000",
"newValue": "0x000000000000000000093a800000000000006909affa00000000000068db8b7a"
}
}
}
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Raw diff

```json
{
"poolConfig": {
"priceOracleSentinel": {
"from": "0x0000000000000000000000000000000000000000",
"to": "0xbB57EAAEFE94Fb6850941E360cf0939189f73cE5"
}
},
"raw": {
"0x2a3948bb219d6b2fa83d64100006391a96be6cb7": {
"label": "AaveV3ZkSync.POOL_ADDRESSES_PROVIDER",
"contract": null,
"balanceDiff": null,
"nonceDiff": null,
"stateDiff": {
"0x0d2c1bcee56447b4f46248272f34207a580a5c40f666a31f4e2fbb470ea53ab8": {
"previousValue": "0x0000000000000000000000000000000000000000000000000000000000000000",
"newValue": "0x000000000000000000000000bb57eaaefe94fb6850941e360cf0939189f73ce5"
}
}
},
"0x2e79349c3f5e4751e87b966812c9e65e805996f1": {
"label": "GovernanceV3ZkSync.PAYLOADS_CONTROLLER",
"contract": null,
"balanceDiff": null,
"nonceDiff": null,
"stateDiff": {
"0xbb7ea1d025e27e153f156855239b4b128e9da3a64a6f0a0270f8920989588142": {
"previousValue": "0x0068db8b74000000000002000000000000000000000000000000000000000000",
"newValue": "0x0068db8b74000000000003000000000000000000000000000000000000000000"
},
"0xbb7ea1d025e27e153f156855239b4b128e9da3a64a6f0a0270f8920989588143": {
"previousValue": "0x000000000000000000093a800000000000006909aff500000000000000000000",
"newValue": "0x000000000000000000093a800000000000006909aff500000000000068db8b75"
}
}
}
}
}
```
4 changes: 2 additions & 2 deletions foundry.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"lib/aave-helpers": {
"branch": {
"name": "main",
"rev": "9b4186648a6e6606e41b2842a857dbbd67cc1067"
"rev": "d29a6ee3b020cbf4a79d1b973d79b37f6843dbd9"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol';
import {AaveV3Celo} from 'aave-address-book/AaveV3Celo.sol';

/**
* @title Enable Price Oracle Sentinel on Aave V3 Celo, ZkSync
* @author BGD Labs (@bgdlabs)
* - Discussion: TODO
*/
contract AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930 is
IProposalGenericExecutor
{
address public constant PRICE_ORACLE_SENTINEL = 0x06C5c197EdFDF2Ed0A3757880242B2264EF7c3C2;

function execute() external {
AaveV3Celo.POOL_ADDRESSES_PROVIDER.setPriceOracleSentinel(PRICE_ORACLE_SENTINEL);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Celo} from 'aave-address-book/AaveV3Celo.sol';
import {ProtocolV3TestBase} from 'aave-helpers/src/ProtocolV3TestBase.sol';
import {AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930} from './AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.sol';

/**
* @dev Test for AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930
* command: FOUNDRY_PROFILE=test forge test --match-path=src/20250930_Multi_EnablePriceOracleSentinelOnAaveV3CeloZkSync/AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.t.sol -vv
*/
contract AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930_Test is
ProtocolV3TestBase
{
AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('celo'), 47317796);
proposal = new AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930',
AaveV3Celo.POOL,
address(proposal)
);
}

function test_sentinelConfigured() public {
executePayload(vm, address(proposal));

assertEq(
AaveV3Celo.POOL_ADDRESSES_PROVIDER.getPriceOracleSentinel(),
proposal.PRICE_ORACLE_SENTINEL()
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "Enable Price Oracle Sentinel on Aave V3 Celo, ZkSync"
author: "BGD Labs (@bgdlabs)"
discussions: TODO
---

## Simple Summary

Maintenance proposal to activate Price Oracle Sentinel functionality on Aave V3 ZkSync and Celo instances.

## Motivation

Aave v3 has a mechanism called “Price Oracle Sentinel” by which if the network infrastructure is down (mainly the sequencer on rollups), new borrowings and liquidations are not processed, and a grace period is given to the user to refill their positions and avoid liquidation.
This mechanism is part of Aave v3, but its activation depends on having an underlying oracle providing the “health check” of the network infrastructure.
Aave uses the [L2 Sequencer Uptime Feeds](https://docs.chain.link/data-feeds/l2-sequencer-feeds) for various networks since day 0, but at that point, Celo, ZkSync was not available.
Following its introduction on Celo, ZkSync network, this proposal will activate its Price Oracle Sentinel on those networks.

## Specification

To configure the PriceOracleSentinel, `POOL_ADDRESSES_PROVIDER.setPriceOracleSentinel()` method will be called to set the price oracle sentinel on the pool addresses provider.

| Network | PriceOracleSentinel |
| ------- | --------------------------------------------------------------------------------------------------------------------------- |
| Celo | [0x06c5c197edfdf2ed0a3757880242b2264ef7c3c2](https://celoscan.io/address/0x06c5c197edfdf2ed0a3757880242b2264ef7c3c2) |
| ZkSync | [0xbb57eaaefe94fb6850941e360cf0939189f73ce5](https://era.zksync.network/address/0xbb57eaaefe94fb6850941e360cf0939189f73ce5) |

## References

- Implementation: [AaveV3ZkSync](https://github.com/bgd-labs/aave-proposals-v3/blob/main/zksync/src/20250930_Multi_EnablePriceOracleSentinelOnAaveV3CeloZkSync/AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.sol), [AaveV3Celo](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20250930_Multi_EnablePriceOracleSentinelOnAaveV3CeloZkSync/AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.sol)
- Tests: [AaveV3ZkSync](https://github.com/bgd-labs/aave-proposals-v3/blob/main/zksync/src/20250930_Multi_EnablePriceOracleSentinelOnAaveV3CeloZkSync/AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.t.sol), [AaveV3Celo](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20250930_Multi_EnablePriceOracleSentinelOnAaveV3CeloZkSync/AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.t.sol)
- [Discussion](TODO)

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/src/GovV3Helpers.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {EthereumScript, CeloScript, ChainIds} from 'solidity-utils/contracts/utils/ScriptUtils.sol';
import {GovernanceV3ZkSync} from 'aave-address-book/GovernanceV3ZkSync.sol';

import {AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930} from './AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.sol';

/**
* @dev Deploy Celo
* deploy-command: make deploy-ledger contract=src/20250930_Multi_EnablePriceOracleSentinelOnAaveV3CeloZkSync/EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.s.sol:DeployCelo chain=celo
* verify-command: FOUNDRY_PROFILE=deploy npx catapulta-verify -b broadcast/EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.s.sol/42220/run-latest.json
*/
contract DeployCelo is CeloScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930).creationCode
);

// compose action
IPayloadsControllerCore.ExecutionAction[]
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
actions[0] = GovV3Helpers.buildAction(payload0);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
}
}

/**
* @dev Create Proposal
* command: make deploy-ledger contract=src/20250930_Multi_EnablePriceOracleSentinelOnAaveV3CeloZkSync/EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.s.sol:CreateProposal chain=mainnet
*/
contract CreateProposal is EthereumScript {
function run() external {
// create payloads
PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](2);

// compose actions for validation
{
payloads[0] = PayloadsControllerUtils.Payload({
chain: ChainIds.ZKSYNC,
accessLevel: PayloadsControllerUtils.AccessControl.Level_1,
payloadsController: address(GovernanceV3ZkSync.PAYLOADS_CONTROLLER),
payloadId: 0 // TODO
});
}

{
IPayloadsControllerCore.ExecutionAction[]
memory actionsCelo = new IPayloadsControllerCore.ExecutionAction[](1);
actionsCelo[0] = GovV3Helpers.buildAction(
type(AaveV3Celo_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930).creationCode
);
payloads[1] = GovV3Helpers.buildCeloPayload(vm, actionsCelo);
}

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovernanceV3Ethereum.VOTING_PORTAL_ETH_AVAX,
GovV3Helpers.ipfsHashFile(
vm,
'src/20250930_Multi_EnablePriceOracleSentinelOnAaveV3CeloZkSync/EnablePriceOracleSentinelOnAaveV3CeloZkSync.md'
)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {ConfigFile} from '../../generator/types';
export const config: ConfigFile = {
rootOptions: {
pools: ['AaveV3ZkSync', 'AaveV3Celo'],
title: 'Enable Price Oracle Sentinel on Aave V3 Celo, ZkSync',
shortName: 'EnablePriceOracleSentinelOnAaveV3CeloZkSync',
date: '20250930',
author: 'BGD Labs (@bgdlabs)',
discussion: '',
snapshot: '',
votingNetwork: 'AVALANCHE',
},
poolOptions: {
AaveV3ZkSync: {configs: {OTHERS: {}}, cache: {blockNumber: 64967448}},
AaveV3Celo: {configs: {OTHERS: {}}, cache: {blockNumber: 47317796}},
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol';
import {AaveV3ZkSync} from 'aave-address-book/AaveV3ZkSync.sol';

/**
* @title Enable Price Oracle Sentinel on Aave V3 Celo, ZkSync
* @author BGD Labs (@bgdlabs)
* - Discussion: TODO
*/
contract AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930 is
IProposalGenericExecutor
{
address public constant PRICE_ORACLE_SENTINEL = 0xbB57EAAEFE94Fb6850941E360cf0939189f73cE5;

function execute() external {
AaveV3ZkSync.POOL_ADDRESSES_PROVIDER.setPriceOracleSentinel(PRICE_ORACLE_SENTINEL);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3ZkSync} from 'aave-address-book/AaveV3ZkSync.sol';
import {ProtocolV3TestBase} from 'aave-helpers/zksync/src/ProtocolV3TestBase.sol';
import {AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930} from './AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.sol';

/**
* @dev Test for AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930
* command: FOUNDRY_PROFILE=zksync forge test --zksync --match-path=zksync/src/20250930_Multi_EnablePriceOracleSentinelOnAaveV3CeloZkSync/AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.t.sol -vv
*/
contract AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930_Test is
ProtocolV3TestBase
{
AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930 internal proposal;

function setUp() public override {
vm.createSelectFork(vm.rpcUrl('zksync'), 64967448);
proposal = new AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930();

super.setUp();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930',
AaveV3ZkSync.POOL,
address(proposal)
);
}

function test_sentinelConfigured() public {
executePayload(vm, address(proposal));

assertEq(
AaveV3ZkSync.POOL_ADDRESSES_PROVIDER.getPriceOracleSentinel(),
proposal.PRICE_ORACLE_SENTINEL()
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore} from 'aave-helpers/src/GovV3Helpers.sol';

import {ZkSyncScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol';
import {AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930} from './AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.sol';

/**
* @dev Deploy ZkSync
* deploy-command: make deploy-ledger-zk contract=zksync/src/20250930_Multi_EnablePriceOracleSentinelOnAaveV3CeloZkSync/EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930.s.sol:DeployZkSync chain=zksync
*/
contract DeployZkSync is ZkSyncScript {
function run() external broadcast {
// deploy payloads
address payload0 = address(
new AaveV3ZkSync_EnablePriceOracleSentinelOnAaveV3CeloZkSync_20250930{salt: 'aave'}()
);

// compose action
IPayloadsControllerCore.ExecutionAction[]
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
actions[0] = GovV3Helpers.buildAction(payload0);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
}
}
Loading