Skip to content

Commit 9a8078d

Browse files
committed
clean up + lint
1 parent acbddd8 commit 9a8078d

File tree

8 files changed

+146
-97
lines changed

8 files changed

+146
-97
lines changed

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
- Always set the id in @proposals/mips/mips.json to 0 when creating new proposals
1+
- Always set the id in @proposals/mips/mips.json to 0 when creating new
2+
proposals

chains/10.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@
719719
"isContract": true,
720720
"name": "CHAINLINK_wrsETH_ETH_EXCHANGE_RATE"
721721
},
722-
{
722+
{
723723
"addr": "0x5fddda4866db63685018faa1bfc9bfce7072014c",
724724
"isContract": true,
725725
"name": "CHAINLINK_wrsETH_COMPOSITE_ORACLE"

chains/8453.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,6 @@
12421242
{
12431243
"addr": "0x9917Ea34179D87F06C8b9D4AfB8BD78248B434ef",
12441244
"isContract": false,
1245-
"name": "ANA_EOA"
1245+
"name": "BAD_DEBT_REPAYER_EOA"
12461246
}
12471247
]

proposals/mips/mip-x35/x35.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
A proposal to adjust the following risk parameters:
1010

11-
| Parameters | Current Value | Recommended Value |
12-
| --- | --- | --- |
13-
| MAMO Borrow Cap | 12M | 3M |
14-
| tBTC Collateral Factor | 85% | 84% |
15-
| LBTC Collateral Factor | 85% | 84% |
11+
| Parameters | Current Value | Recommended Value |
12+
| ---------------------- | ------------- | ----------------- |
13+
| MAMO Borrow Cap | 12M | 3M |
14+
| tBTC Collateral Factor | 85% | 84% |
15+
| LBTC Collateral Factor | 85% | 84% |
1616

1717
<sub> \*Cap changes will be implemented via Cap Guardian </sub>
1818

@@ -21,11 +21,11 @@ A proposal to adjust the following risk parameters:
2121
A proposal to adjust the IR Parameters for USDC:
2222

2323
| **USDC IR Parameters** | Current Value | Recommended Value |
24-
| --- | --- | --- |
25-
| Base | 0 | 0 |
26-
| Kink | 0.9 | 0.9 |
27-
| Multiplier | **0.072** | **0.08** |
28-
| Jump Multiplier | 9 | 9 |
24+
| ---------------------- | ------------- | ----------------- |
25+
| Base | 0 | 0 |
26+
| Kink | 0.9 | 0.9 |
27+
| Multiplier | **0.072** | **0.08** |
28+
| Jump Multiplier | 9 | 9 |
2929

3030
## OP Mainnet
3131

@@ -36,18 +36,18 @@ A proposal to adjust the IR Parameters for USDC:
3636
A proposal to adjust the IR Parameters for USDT0 and DAI:
3737

3838
| **USDT0 IR Parameters** | Current Value | Recommended Value |
39-
| --- | --- | --- |
40-
| Base | 0 | 0 |
41-
| Kink | 0.9 | 0.9 |
42-
| Multiplier | **0.061** | **0.067** |
43-
| Jump Multiplier | 9 | 9 |
39+
| ----------------------- | ------------- | ----------------- |
40+
| Base | 0 | 0 |
41+
| Kink | 0.9 | 0.9 |
42+
| Multiplier | **0.061** | **0.067** |
43+
| Jump Multiplier | 9 | 9 |
4444

4545
| **DAI IR Parameters** | Current Value | Recommended Value |
46-
| --- | --- | --- |
47-
| Base | 0 | 0 |
48-
| Kink | 0.9 | 0.9 |
49-
| Multiplier | **0.061** | **0.067** |
50-
| Jump Multiplier | 9 | 9 |
46+
| --------------------- | ------------- | ----------------- |
47+
| Base | 0 | 0 |
48+
| Kink | 0.9 | 0.9 |
49+
| Multiplier | **0.061** | **0.067** |
50+
| Jump Multiplier | 9 | 9 |
5151

5252
For more information refer to our forum post:
5353
[link](https://forum.moonwell.fi/t/anthias-labs-risk-parameter-recommendations/1759/6).

proposals/mips/mip-x36/mip-x36.sol

Lines changed: 63 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ contract mipx36 is HybridProposal {
4242
_setProposalDescription(proposalDescription);
4343
}
4444

45-
function run() public override {
45+
function run() public override {
4646
primaryForkId().createForksAndSelect();
4747

4848
Addresses addresses = new Addresses();
@@ -72,7 +72,6 @@ contract mipx36 is HybridProposal {
7272
}
7373
}
7474

75-
7675
function primaryForkId() public pure override returns (uint256) {
7776
return BASE_FORK_ID;
7877
}
@@ -81,45 +80,61 @@ contract mipx36 is HybridProposal {
8180
// Deploy new ChainlinkCompositeOracle for Base wrsETH
8281
vm.selectFork(BASE_FORK_ID);
8382

84-
if(!addresses.isAddressSet("CHAINLINK_wrsETH_COMPOSITE_ORACLE")) {
85-
vm.startBroadcast();
83+
if (!addresses.isAddressSet("CHAINLINK_wrsETH_COMPOSITE_ORACLE")) {
84+
vm.startBroadcast();
8685

87-
address baseEthUsdFeed = addresses.getAddress("CHAINLINK_ETH_USD");
88-
address baseWrsethEthExchangeRateFeed = addresses.getAddress("CHAINLINK_wrsETH_ETH_EXCHANGE_RATE");
86+
address baseEthUsdFeed = addresses.getAddress("CHAINLINK_ETH_USD");
87+
address baseWrsethEthExchangeRateFeed = addresses.getAddress(
88+
"CHAINLINK_wrsETH_ETH_EXCHANGE_RATE"
89+
);
8990

90-
baseWrsethOracle = new ChainlinkCompositeOracle(
91-
baseEthUsdFeed,
92-
baseWrsethEthExchangeRateFeed,
93-
address(0)
94-
);
91+
baseWrsethOracle = new ChainlinkCompositeOracle(
92+
baseEthUsdFeed,
93+
baseWrsethEthExchangeRateFeed,
94+
address(0)
95+
);
9596

96-
vm.stopBroadcast();
97+
vm.stopBroadcast();
9798

98-
addresses.addAddress("CHAINLINK_wrsETH_COMPOSITE_ORACLE", address(baseWrsethOracle));
99+
addresses.addAddress(
100+
"CHAINLINK_wrsETH_COMPOSITE_ORACLE",
101+
address(baseWrsethOracle)
102+
);
99103
} else {
100-
baseWrsethOracle = ChainlinkCompositeOracle(addresses.getAddress("CHAINLINK_wrsETH_COMPOSITE_ORACLE"));
104+
baseWrsethOracle = ChainlinkCompositeOracle(
105+
addresses.getAddress("CHAINLINK_wrsETH_COMPOSITE_ORACLE")
106+
);
101107
}
102108

103109
// Deploy new ChainlinkCompositeOracle for Optimism wrsETH
104110
vm.selectFork(OPTIMISM_FORK_ID);
105111

106-
if(!addresses.isAddressSet("CHAINLINK_wrsETH_COMPOSITE_ORACLE")) {
107-
vm.startBroadcast();
112+
if (!addresses.isAddressSet("CHAINLINK_wrsETH_COMPOSITE_ORACLE")) {
113+
vm.startBroadcast();
108114

109-
address optimismEthUsdFeed = addresses.getAddress("CHAINLINK_ETH_USD");
110-
address optimismWrsethEthExchangeRateFeed = addresses.getAddress("CHAINLINK_wrsETH_ETH_EXCHANGE_RATE");
115+
address optimismEthUsdFeed = addresses.getAddress(
116+
"CHAINLINK_ETH_USD"
117+
);
118+
address optimismWrsethEthExchangeRateFeed = addresses.getAddress(
119+
"CHAINLINK_wrsETH_ETH_EXCHANGE_RATE"
120+
);
111121

112-
optimismWrsethOracle = new ChainlinkCompositeOracle(
113-
optimismEthUsdFeed,
114-
optimismWrsethEthExchangeRateFeed,
115-
address(0)
116-
);
122+
optimismWrsethOracle = new ChainlinkCompositeOracle(
123+
optimismEthUsdFeed,
124+
optimismWrsethEthExchangeRateFeed,
125+
address(0)
126+
);
117127

118-
vm.stopBroadcast();
128+
vm.stopBroadcast();
119129

120-
addresses.addAddress("CHAINLINK_wrsETH_COMPOSITE_ORACLE", address(optimismWrsethOracle));
130+
addresses.addAddress(
131+
"CHAINLINK_wrsETH_COMPOSITE_ORACLE",
132+
address(optimismWrsethOracle)
133+
);
121134
} else {
122-
optimismWrsethOracle = ChainlinkCompositeOracle(addresses.getAddress("CHAINLINK_wrsETH_COMPOSITE_ORACLE"));
135+
optimismWrsethOracle = ChainlinkCompositeOracle(
136+
addresses.getAddress("CHAINLINK_wrsETH_COMPOSITE_ORACLE")
137+
);
123138
}
124139
}
125140

@@ -198,7 +213,9 @@ contract mipx36 is HybridProposal {
198213
);
199214

200215
// Update oracle price feed on Optimism
201-
address optimismChainlinkOracle = addresses.getAddress("CHAINLINK_ORACLE");
216+
address optimismChainlinkOracle = addresses.getAddress(
217+
"CHAINLINK_ORACLE"
218+
);
202219
_pushAction(
203220
optimismChainlinkOracle,
204221
abi.encodeWithSignature(
@@ -213,10 +230,7 @@ contract mipx36 is HybridProposal {
213230

214231
function teardown(Addresses addresses, address) public pure override {}
215232

216-
function _testMintPaused(
217-
address mToken,
218-
address underlying
219-
) internal {
233+
function _testMintPaused(address mToken, address underlying) internal {
220234
MErc20Delegator mTokenDelegator = MErc20Delegator(payable(mToken));
221235

222236
uint256 mintAmount = 1e18;
@@ -233,7 +247,9 @@ contract mipx36 is HybridProposal {
233247
// ============ VALIDATE BASE CHAIN ============
234248
vm.selectFork(BASE_FORK_ID);
235249

236-
Comptroller baseComptroller = Comptroller(addresses.getAddress("UNITROLLER"));
250+
Comptroller baseComptroller = Comptroller(
251+
addresses.getAddress("UNITROLLER")
252+
);
237253
address baseWrsethMToken = addresses.getAddress("MOONWELL_wrsETH");
238254

239255
// Validate minting is paused
@@ -265,15 +281,14 @@ contract mipx36 is HybridProposal {
265281

266282
// Test that minting is actually paused
267283
address baseWrsethUnderlying = MErc20(baseWrsethMToken).underlying();
268-
_testMintPaused(
269-
baseWrsethMToken,
270-
baseWrsethUnderlying
271-
);
284+
_testMintPaused(baseWrsethMToken, baseWrsethUnderlying);
272285

273286
// ============ VALIDATE OPTIMISM CHAIN ============
274287
vm.selectFork(OPTIMISM_FORK_ID);
275288

276-
Comptroller optimismComptroller = Comptroller(addresses.getAddress("UNITROLLER"));
289+
Comptroller optimismComptroller = Comptroller(
290+
addresses.getAddress("UNITROLLER")
291+
);
277292
address optimismWrsethMToken = addresses.getAddress("MOONWELL_wrsETH");
278293

279294
// Validate minting is paused
@@ -292,7 +307,9 @@ contract mipx36 is HybridProposal {
292307
ChainlinkOracle optimismChainlinkOracle = ChainlinkOracle(
293308
addresses.getAddress("CHAINLINK_ORACLE")
294309
);
295-
AggregatorV3Interface optimismFeed = optimismChainlinkOracle.getFeed("wrsETH");
310+
AggregatorV3Interface optimismFeed = optimismChainlinkOracle.getFeed(
311+
"wrsETH"
312+
);
296313
assertEq(
297314
address(optimismFeed),
298315
address(optimismWrsethOracle),
@@ -301,13 +318,15 @@ contract mipx36 is HybridProposal {
301318

302319
// Validate price can be fetched
303320
(, int256 optimismPrice, , , ) = optimismFeed.latestRoundData();
304-
assertGt(uint256(optimismPrice), 0, "Optimism wrsETH price check failed");
321+
assertGt(
322+
uint256(optimismPrice),
323+
0,
324+
"Optimism wrsETH price check failed"
325+
);
305326

306327
// Test that minting is actually paused
307-
address optimismWrsethUnderlying = MErc20(optimismWrsethMToken).underlying();
308-
_testMintPaused(
309-
optimismWrsethMToken,
310-
optimismWrsethUnderlying
311-
);
328+
address optimismWrsethUnderlying = MErc20(optimismWrsethMToken)
329+
.underlying();
330+
_testMintPaused(optimismWrsethMToken, optimismWrsethUnderlying);
312331
}
313332
}

proposals/mips/mip-x36/x36.md

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,81 @@
22

33
### **Summary**
44

5-
Following the oracle malfunction involving the wrsETH/ETH feed on November 4, 2025, this proposal seeks to formally disable minting and borrowing in the wrsETH markets on both Base and OP Mainnet and transition these markets to use an exchange-rate feed rather than a market price oracle.
5+
Following the oracle malfunction involving the wrsETH/ETH feed on November 4,
6+
2025, this proposal seeks to formally disable minting and borrowing in the
7+
wrsETH markets on both Base and OP Mainnet and transition these markets to use
8+
an exchange-rate feed rather than a market price oracle.
69

7-
These steps reduce further risk exposure and set the foundation for a gradual, orderly deprecation of the wrsETH markets.
10+
These steps reduce further risk exposure and set the foundation for a gradual,
11+
orderly deprecation of the wrsETH markets.
812

913
### **Background**
1014

11-
At approximately **5:44 AM UTC on November 4**, an oracle malfunction caused the **wrsETH/ETH feed** to report a faulty value, drastically overpricing wrsETH and enabling an attacker to borrow multiple assets using minimal collateral.
15+
At approximately **5:44 AM UTC on November 4**, an oracle malfunction caused the
16+
**wrsETH/ETH feed** to report a faulty value, drastically overpricing wrsETH and
17+
enabling an attacker to borrow multiple assets using minimal collateral.
1218

13-
The wrsETH/USD price is derived by multiplying the Chainlink ETH/USD oracle with the wrsETH/ETH oracle. The wrsETH/ETH oracle erroneously reported **1 wrsETH = 1,649,934.6 ETH**, valuing each token at roughly **$5.8 billion**. This led to approximately **$3.7 million** in bad debt across the Moonwell protocol.
19+
The wrsETH/USD price is derived by multiplying the Chainlink ETH/USD oracle with
20+
the wrsETH/ETH oracle. The wrsETH/ETH oracle erroneously reported **1 wrsETH =
21+
1,649,934.6 ETH**, valuing each token at roughly **$5.8 billion**. This led to
22+
approximately **$3.7 million** in bad debt across the Moonwell protocol.
1423

1524
Immediately following the mispricing event:
1625

17-
* Supply and borrow caps for wrsETH were set to effectively zero.
26+
- Supply and borrow caps for wrsETH were set to effectively zero.
1827

19-
* Borrow caps for all Core Markets on Base and Optimism were temporarily reduced to **0.1** to prevent additional over-borrowing.
28+
- Borrow caps for all Core Markets on Base and Optimism were temporarily reduced
29+
to **0.1** to prevent additional over-borrowing.
2030

21-
* All deposits and withdrawals remained open, allowing suppliers to withdraw funds where liquidity was available.
31+
- All deposits and withdrawals remained open, allowing suppliers to withdraw
32+
funds where liquidity was available.
2233

2334
### **Proposal**
2435

25-
To maintain a risk-off stance and begin the safe wind-down of wrsETH exposure, this proposal will:
36+
To maintain a risk-off stance and begin the safe wind-down of wrsETH exposure,
37+
this proposal will:
2638

2739
#### 1. Disable minting and borrowing in wrsETH markets on Base and OP Mainnet.
2840

29-
No new wrsETH can be supplied or borrowed. Supply and borrow caps will be set to a near-zero value (as setting caps to zero represents infinity at a contract level). Repayments and withdrawals will remain enabled for existing users.
41+
No new wrsETH can be supplied or borrowed. Supply and borrow caps will be set to
42+
a near-zero value (as setting caps to zero represents infinity at a contract
43+
level). Repayments and withdrawals will remain enabled for existing users.
3044

3145
#### 2. Transition to exchange-rate feeds, replacing the existing oracle.
3246

33-
This ensures accurate value representation based on wrsETH's exchange-rate mechanics rather than rely on market rate pricing.
47+
This ensures accurate value representation based on wrsETH's exchange-rate
48+
mechanics rather than rely on market rate pricing.
3449

3550
The exchange-rate feeds can be found here:
3651

3752
**Base**
53+
3854
- [Chainlink Exchange-Rate Feed](https://data.chain.link/feeds/base/base/wrseth-eth-exchange-rate)
3955
- [wrsETH Contract (BaseScan)](https://basescan.org/address/0xe8dD07CCf5BC4922424140E44Eb970F5950725ef)
4056

4157
**OP Mainnet**
58+
4259
- [Chainlink Exchange-Rate Feed](https://data.chain.link/feeds/optimism/mainnet/wrseth-eth-exchange-rate)
4360
- [wrsETH Contract (Optimism Etherscan)](https://optimistic.etherscan.io/address/0x73b8BE3b653c5896BC34fC87cEBC8AcF4Fb7A545)
4461

4562
#### 3. **Prepare the markets for deprecation.**
4663

47-
Once minting and borrowing are disabled and the oracle is transitioned, the community can proceed with a gradual deprecation of wrsETH markets on Base and OP Mainnet. Users will receive advance notice and be encouraged to repay outstanding loans and withdraw wrsETH to avoid liquidation risk during the wind-down process.
64+
Once minting and borrowing are disabled and the oracle is transitioned, the
65+
community can proceed with a gradual deprecation of wrsETH markets on Base and
66+
OP Mainnet. Users will receive advance notice and be encouraged to repay
67+
outstanding loans and withdraw wrsETH to avoid liquidation risk during the
68+
wind-down process.
4869

4970
### **Rationale**
5071

51-
* Disabling mint and borrow eliminates the primary vectors for further exploitation.
52-
* Transitioning to exchange-rate feeds ensures stable and accurate valuation until the market can be fully deprecated.
53-
* The measured approach, risk-off first, gradual deprecation later, balances user protection with operational continuity.
72+
- Disabling mint and borrow eliminates the primary vectors for further
73+
exploitation.
74+
- Transitioning to exchange-rate feeds ensures stable and accurate valuation
75+
until the market can be fully deprecated.
76+
- The measured approach, risk-off first, gradual deprecation later, balances
77+
user protection with operational continuity.
5478

5579
### **Voting Options**
5680

57-
Yes: Disable mint/borrow for wrsETH on Base and OP Mainnet and transition to exchange-rate feeds
58-
No: Maintain the status quo.
59-
Abstain: No preference
81+
Yes: Disable mint/borrow for wrsETH on Base and OP Mainnet and transition to
82+
exchange-rate feeds No: Maintain the status quo. Abstain: No preference

0 commit comments

Comments
 (0)