Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
ee65afb
current dev
MishaShWoof Jul 25, 2025
7e08ec9
fix: working dev
MishaShWoof Jul 25, 2025
2bb3587
fix: scenarios
MishaShWoof Jul 28, 2025
9f5564c
fix
MishaShWoof Jul 28, 2025
88fe803
fix
MishaShWoof Jul 28, 2025
8b5ee76
Update index.ts
MishaShWoof Jul 28, 2025
700a4c6
Update DeploymentManager.ts
MishaShWoof Jul 29, 2025
4cbf863
fix: unit tests
MishaShWoof Aug 14, 2025
2bc2dbf
fix: working linea scenarios and prepare workflow fix
MishaShWoof Aug 20, 2025
0313418
Merge branch 'main' of github.com:woof-software/comet into develop
MishaShWoof Sep 16, 2025
688d515
fix: remove linea markets from dev
MishaShWoof Sep 16, 2025
df8d724
fix: remove localhost deployment
MishaShWoof Sep 19, 2025
0001bd6
fix: unify import
MishaShWoof Sep 22, 2025
d04a40d
Merge branch 'main' of github.com:woof-software/comet into develop
MishaShWoof Sep 25, 2025
2621df6
Merge branch 'main' of github.com:woof-software/comet into develop
MishaShWoof Nov 11, 2025
aceaf43
fixes from recent prs
MishaShWoof Nov 11, 2025
3f9caef
fix: change base rpc
MishaShWoof Nov 12, 2025
68f6aab
fix: change rpc
MishaShWoof Nov 14, 2025
d2801ea
fix: replace ankr with quicknode
MishaShWoof Nov 17, 2025
001b60c
Merge branch 'main' of github.com:woof-software/comet into develop
MishaShWoof Nov 24, 2025
38a9d9e
fix: working tests
MishaShWoof Nov 24, 2025
525e5a8
fix: working forge test
MishaShWoof Nov 24, 2025
d73df39
Update run-forge-tests.yaml
MishaShWoof Nov 24, 2025
640d956
Update run-forge-tests.yaml
MishaShWoof Nov 24, 2025
49ac136
Update run-scenarios.yaml
MishaShWoof Nov 27, 2025
a16813a
fix: env in scenario
MishaShWoof Nov 27, 2025
0407aa6
fix: use different keys for etherscan
MishaShWoof Nov 27, 2025
1a368d4
fix: strict order
MishaShWoof Nov 27, 2025
a34434f
fix: pass the prepared state
MishaShWoof Nov 27, 2025
9d6c077
fix: remove matrix
MishaShWoof Nov 27, 2025
58ed478
fix: pass node modules
MishaShWoof Nov 27, 2025
0e67e92
fix: add contracts to cache before scenario run
MishaShWoof Nov 28, 2025
bc0871e
fix: cache path fix
MishaShWoof Nov 28, 2025
5f4fc6f
fix: use hidden files
MishaShWoof Nov 28, 2025
5a77147
fix: fuji
MishaShWoof Nov 28, 2025
b287ff2
feat: rotate apikeys and some arbitrum fixes
MishaShWoof Dec 2, 2025
070fda2
Merge pull request #279 from woof-software/speed-up-scenarios
MishaShWoof Dec 3, 2025
98e6783
fix: working arbitrum scenarios
MishaShWoof Dec 3, 2025
b2b05a2
fix: teth symbol fix
MishaShWoof Dec 3, 2025
a0fdad7
fix: add debug for spider
MishaShWoof Dec 3, 2025
0cf69cd
Merge branch 'main' of github.com:woof-software/comet into develop
MishaShWoof Dec 22, 2025
e7f8ce6
fix: ronin and forge test fixes
MishaShWoof Dec 22, 2025
b3456da
fix: working arbitrum scenarios
MishaShWoof Dec 24, 2025
8e6211e
feat: migration
MishaShWoof Dec 25, 2025
8b2ea24
new fixes
MishaShWoof Feb 23, 2026
73cb01d
fix
MishaShWoof Feb 23, 2026
7d4a913
fix: precision fix
MishaShWoof Feb 23, 2026
f3ebdba
fix: change scroll rpc
MishaShWoof Apr 9, 2026
6b9f22c
fix(arbitrum/usdc.e): update SVR fee recipient address to correct mul…
vlad-woof-software Apr 21, 2026
a520c26
Merge remote-tracking branch 'origin/develop' into woof-software/add-…
vlad-woof-software Apr 22, 2026
518daad
refactor: fix typo WEth -> WETH in price feed calldata variable name
vlad-woof-software Apr 22, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy-market.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"linea\":\"${LINEA_QUICKNODE_LINK}\",\"ronin\":\"${RONIN_QUICKNODE_LINK}\",\"unichain\":\"${UNICHAIN_QUICKNODE_LINK}\",\"mantle\":\"${MANTLE_QUICKNODE_LINK}\",\"optimism\":\"${OPTIMISM_QUICKNODE_LINK}\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"${MAINNET_QUICKNODE_LINK}\",\"sepolia\":\"${SEPOLIA_QUICKNODE_LINK}\",\"polygon\":\"${POLYGON_QUICKNODE_LINK}\",\"arbitrum\":\"${ARBITRUM_QUICKNODE_LINK}\",\"base\":\"${BASE_QUICKNODE_LINK}\",\"scroll\":\"https://rpc.scroll.io\"}')[github.event.inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"linea\":\"${LINEA_QUICKNODE_LINK}\",\"ronin\":\"${RONIN_QUICKNODE_LINK}\",\"unichain\":\"${UNICHAIN_QUICKNODE_LINK}\",\"mantle\":\"${MANTLE_QUICKNODE_LINK}\",\"optimism\":\"${OPTIMISM_QUICKNODE_LINK}\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"${MAINNET_QUICKNODE_LINK}\",\"sepolia\":\"${SEPOLIA_QUICKNODE_LINK}\",\"polygon\":\"${POLYGON_QUICKNODE_LINK}\",\"arbitrum\":\"${ARBITRUM_QUICKNODE_LINK}\",\"base\":\"${BASE_QUICKNODE_LINK}\",\"scroll\":\"https://scroll.drpc.org\"}')[github.event.inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enact-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"linea\":\"${LINEA_QUICKNODE_LINK}\",\"ronin\":\"${RONIN_QUICKNODE_LINK}\",\"unichain\":\"${UNICHAIN_QUICKNODE_LINK}\",\"mantle\":\"${MANTLE_QUICKNODE_LINK}\",\"optimism\":\"${OPTIMISM_QUICKNODE_LINK}\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"${MAINNET_QUICKNODE_LINK}\",\"sepolia\":\"${SEPOLIA_QUICKNODE_LINK}\",\"polygon\":\"${POLYGON_QUICKNODE_LINK}\",\"arbitrum\":\"${ARBITRUM_QUICKNODE_LINK}\",\"base\":\"${BASE_QUICKNODE_LINK}\",\"scroll\":\"https://rpc.scroll.io\"}')[github.event.inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"linea\":\"${LINEA_QUICKNODE_LINK}\",\"ronin\":\"${RONIN_QUICKNODE_LINK}\",\"unichain\":\"${UNICHAIN_QUICKNODE_LINK}\",\"mantle\":\"${MANTLE_QUICKNODE_LINK}\",\"optimism\":\"${OPTIMISM_QUICKNODE_LINK}\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"${MAINNET_QUICKNODE_LINK}\",\"sepolia\":\"${SEPOLIA_QUICKNODE_LINK}\",\"polygon\":\"${POLYGON_QUICKNODE_LINK}\",\"arbitrum\":\"${ARBITRUM_QUICKNODE_LINK}\",\"base\":\"${BASE_QUICKNODE_LINK}\",\"scroll\":\"https://scroll.drpc.org\"}')[github.event.inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"linea\":\"${LINEA_QUICKNODE_LINK}\",\"ronin\":\"${RONIN_QUICKNODE_LINK}\",\"unichain\":\"${UNICHAIN_QUICKNODE_LINK}\",\"mantle\":\"${MANTLE_QUICKNODE_LINK}\",\"optimism\":\"${OPTIMISM_QUICKNODE_LINK}\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"${MAINNET_QUICKNODE_LINK}\",\"sepolia\":\"${SEPOLIA_QUICKNODE_LINK}\",\"polygon\":\"${POLYGON_QUICKNODE_LINK}\",\"arbitrum\":\"${ARBITRUM_QUICKNODE_LINK}\",\"base\":\"${BASE_QUICKNODE_LINK}\",\"scroll\":\"https://rpc.scroll.io\"}')[github.event.inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"linea\":\"${LINEA_QUICKNODE_LINK}\",\"ronin\":\"${RONIN_QUICKNODE_LINK}\",\"unichain\":\"${UNICHAIN_QUICKNODE_LINK}\",\"mantle\":\"${MANTLE_QUICKNODE_LINK}\",\"optimism\":\"${OPTIMISM_QUICKNODE_LINK}\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"${MAINNET_QUICKNODE_LINK}\",\"sepolia\":\"${SEPOLIA_QUICKNODE_LINK}\",\"polygon\":\"${POLYGON_QUICKNODE_LINK}\",\"arbitrum\":\"${ARBITRUM_QUICKNODE_LINK}\",\"base\":\"${BASE_QUICKNODE_LINK}\",\"scroll\":\"https://scroll.drpc.org\"}')[github.event.inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
import { expect } from 'chai';
import { DeploymentManager } from '../../../../plugins/deployment_manager/DeploymentManager';
import { migration } from '../../../../plugins/deployment_manager/Migration';
import { calldata, proposal } from '../../../../src/deploy';
import { utils } from 'ethers';
import { applyL1ToL2Alias, estimateL2Transaction } from '../../../../scenario/utils/arbitrumUtils';

// scaling price feeds
const WETH_TO_USD_SVR_PRICE_FEED_ADDRESS = '0xb2988bDAdc45c43e3fE1A728F715E94bee4DB406';
const USDC_TO_USD_SVR_PRICE_FEED_ADDRESS = '0x880D36763Bb470cd395B7d6c76b50446FA70ACe5';
const ARB_TO_USD_SVR_PRICE_FEED_ADDRESS = '0x5998a5C516bD5E479E0B6aa6F243d372730B68d2';
const WBTC_TO_USD_SVR_PRICE_FEED_ADDRESS = '0xcc392d2c3b37520e01712320bE331D41F7661013';


let oldWETHPriceFeed: string;
let oldUSDCPriceFeed: string;
let oldARBPriceFeed: string;
let oldWBTCPriceFeed: string;

export default migration('1766644670_change_price_feeds_to_svr', {
async prepare() {

return {};
},

enact: async (deploymentManager: DeploymentManager, govDeploymentManager: DeploymentManager) => {
const trace = deploymentManager.tracer();

const {
bridgeReceiver,
timelock: l2Timelock,
comet,
cometAdmin,
configurator,
WETH,
ARB,
WBTC
} = await deploymentManager.getContracts();

const { governor, timelock, arbitrumInbox } = await govDeploymentManager.getContracts();

const updateWETHPriceFeedCalldata = await calldata(
configurator.populateTransaction.updateAssetPriceFeed(
comet.address,
WETH.address,
WETH_TO_USD_SVR_PRICE_FEED_ADDRESS
)
);
const updateUSDCPriceFeedCalldata = await calldata(
configurator.populateTransaction.setBaseTokenPriceFeed(
comet.address,
USDC_TO_USD_SVR_PRICE_FEED_ADDRESS
)
);

const updateARBPriceFeedCalldata = await calldata(
configurator.populateTransaction.updateAssetPriceFeed(
comet.address,
ARB.address,
ARB_TO_USD_SVR_PRICE_FEED_ADDRESS
)
);

const updateWBTCPriceFeedCalldata = await calldata(
configurator.populateTransaction.updateAssetPriceFeed(
comet.address,
WBTC.address,
WBTC_TO_USD_SVR_PRICE_FEED_ADDRESS
)
);

const deployAndUpgradeToCalldata = await calldata(
cometAdmin.populateTransaction.deployAndUpgradeTo(
configurator.address,
comet.address
)
);

const l2ProposalData = utils.defaultAbiCoder.encode(
['address[]', 'uint256[]', 'string[]', 'bytes[]'],
[
[
configurator.address,
configurator.address,
configurator.address,
configurator.address,
cometAdmin.address
],
[0, 0, 0, 0, 0],
[
'updateAssetPriceFeed(address,address,address)',
'setBaseTokenPriceFeed(address,address)',
'updateAssetPriceFeed(address,address,address)',
'updateAssetPriceFeed(address,address,address)',
'deployAndUpgradeTo(address,address)'
],
[
updateWETHPriceFeedCalldata,
updateUSDCPriceFeedCalldata,
updateARBPriceFeedCalldata,
updateWBTCPriceFeedCalldata,
deployAndUpgradeToCalldata],
]
);

[,, oldWETHPriceFeed] = await comet.getAssetInfoByAddress(WETH.address);
oldUSDCPriceFeed = await comet.baseTokenPriceFeed();
[,, oldARBPriceFeed] = await comet.getAssetInfoByAddress(ARB.address);
[,, oldWBTCPriceFeed] = await comet.getAssetInfoByAddress(WBTC.address);

const createRetryableTicketGasParams = await estimateL2Transaction(
{
from: applyL1ToL2Alias(timelock.address),
to: bridgeReceiver.address,
data: l2ProposalData
},
deploymentManager
);

const refundAddress = l2Timelock.address;
const mainnetActions = [
// 1. Set Comet configuration and deployAndUpgradeTo USDC Comet on Arbitrum.
{
contract: arbitrumInbox,
signature: 'createRetryableTicket(address,uint256,uint256,address,address,uint256,uint256,bytes)',
args: [
bridgeReceiver.address, // address to,
0, // uint256 l2CallValue,
createRetryableTicketGasParams.maxSubmissionCost, // uint256 maxSubmissionCost,
refundAddress, // address excessFeeRefundAddress,
refundAddress, // address callValueRefundAddress,
createRetryableTicketGasParams.gasLimit, // uint256 gasLimit,
createRetryableTicketGasParams.maxFeePerGas, // uint256 maxFeePerGas,
l2ProposalData, // bytes calldata data
],
value: createRetryableTicketGasParams.deposit
},
];

const description = `# Update price feeds in cUSDC.ev3 on Arbitrum with SVR price feeds.

## Proposal summary

This proposal updates existing price feeds for WETH, ARB, WBTC and USDC assets on the USDC.e market on Arbitrum.

Further detailed information can be found on the corresponding [proposal pull request](https://github.com/compound-finance/comet/pull/1078) and [forum discussion for SVR](https://www.comp.xyz/t/request-for-proposal-rfp-oracle-extractable-value-oev-solution-for-compound-protocol/6786).

### SVR fee recipient

SVR generates revenue from liquidators and Compound DAO will receive that revenue as part of the protocol fee. The fee recipient for SVR is set to Compound DAO multisig: 0xb3e79c7cac540ca833015e63d96d3032ba0c4129.

## Proposal actions

The first action updates WETH, ARB, WBTC and USDC price feeds to the SVR implementation. This sends the encoded 'updateAssetPriceFeed' and 'deployAndUpgradeTo' calls across the bridge to the governance receiver on Arbitrum.
`;
const txn = await govDeploymentManager.retry(async () =>
trace(
await governor.propose(...(await proposal(mainnetActions, description)))
), 0, 300_000
);

const event = txn.events.find(
(event: { event: string }) => event.event === 'ProposalCreated'
);
const [proposalId] = event.args;
trace(`Created proposal ${proposalId}.`);
},

async enacted(): Promise<boolean> {
return false;
},

async verify(deploymentManager: DeploymentManager) {
const {
comet,
configurator,
WETH,
ARB,
WBTC
} = await deploymentManager.getContracts();

// 1. WETH
const WETHIndexInComet = await configurator.getAssetIndex(
comet.address,
WETH.address
);
const WETHInCometInfo = await comet.getAssetInfoByAddress(WETH.address);
const WETHInConfiguratorInfoWETHComet = (
await configurator.getConfiguration(comet.address)
).assetConfigs[WETHIndexInComet];

expect(WETHInCometInfo.priceFeed).to.eq(WETH_TO_USD_SVR_PRICE_FEED_ADDRESS);
expect(WETHInConfiguratorInfoWETHComet.priceFeed).to.eq(WETH_TO_USD_SVR_PRICE_FEED_ADDRESS);

expect(await comet.getPrice(WETH_TO_USD_SVR_PRICE_FEED_ADDRESS)).to.be.closeTo(await comet.getPrice(oldWETHPriceFeed), 5e8); // 5$

// 2. USDC
const USDCPriceFeedFromComet = await comet.baseTokenPriceFeed();
const USDCPriceFeedFromConfigurator = (
await configurator.getConfiguration(comet.address)
).baseTokenPriceFeed;

expect(USDCPriceFeedFromComet).to.eq(USDC_TO_USD_SVR_PRICE_FEED_ADDRESS);
expect(USDCPriceFeedFromConfigurator).to.eq(USDC_TO_USD_SVR_PRICE_FEED_ADDRESS);

expect(await comet.getPrice(USDC_TO_USD_SVR_PRICE_FEED_ADDRESS)).to.be.closeTo(await comet.getPrice(oldUSDCPriceFeed), 1e8); // 1$

// 3. ARB
const ARBIndexInComet = await configurator.getAssetIndex(
comet.address,
ARB.address
);
const ARBInCometInfo = await comet.getAssetInfoByAddress(ARB.address);
const ARBInConfiguratorInfoWETHComet = (
await configurator.getConfiguration(comet.address)
).assetConfigs[ARBIndexInComet];

expect(ARBInCometInfo.priceFeed).to.eq(ARB_TO_USD_SVR_PRICE_FEED_ADDRESS);
expect(ARBInConfiguratorInfoWETHComet.priceFeed).to.eq(ARB_TO_USD_SVR_PRICE_FEED_ADDRESS);

expect(await comet.getPrice(ARB_TO_USD_SVR_PRICE_FEED_ADDRESS)).to.be.closeTo(await comet.getPrice(oldARBPriceFeed), 5e6); // 0.05$

// 4. WBTC
const WBTCIndexInComet = await configurator.getAssetIndex(
comet.address,
WBTC.address
);
const WBTCInCometInfo = await comet.getAssetInfoByAddress(WBTC.address);
const WBTCInConfiguratorInfoWETHComet = (
await configurator.getConfiguration(comet.address)
).assetConfigs[WBTCIndexInComet];

expect(WBTCInCometInfo.priceFeed).to.eq(WBTC_TO_USD_SVR_PRICE_FEED_ADDRESS);
expect(WBTCInConfiguratorInfoWETHComet.priceFeed).to.eq(WBTC_TO_USD_SVR_PRICE_FEED_ADDRESS);

expect(await comet.getPrice(WBTC_TO_USD_SVR_PRICE_FEED_ADDRESS)).to.be.closeTo(await comet.getPrice(oldWBTCPriceFeed), 250e8); // 250$
},
});
Loading