Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
270 commits
Select commit Hold shift + click to select a range
8ba8c0c
test: Add scenarios for handling paused supply and transfer condition…
VladyslavPerederWoof Oct 24, 2025
15604ec
test: Add setupFork function for mainnet forking in tests
VladyslavPerederWoof Oct 27, 2025
6b17062
test: Remove exclusive focus from extended pause functionality tests
VladyslavPerederWoof Oct 27, 2025
d33db9a
test: Add comprehensive tests for extended pause upgrade scenarios
VladyslavPerederWoof Oct 27, 2025
e1a72c1
chore: Added natspec docs for added functions, errors, variables and …
VladyslavPerederWoof Oct 27, 2025
4446f59
test: Reworked tests structure and logic
VladyslavPerederWoof Oct 28, 2025
b7558f1
test: Simplify event extraction in extended pause upgrade test
VladyslavPerederWoof Oct 28, 2025
bceff9a
test: Refactor extended pause test structure and remove unused variables
VladyslavPerederWoof Oct 28, 2025
4347303
fix: Review fixes
VladyslavPerederWoof Oct 29, 2025
852226c
fix: added skip logic for zero collateral factors
VladyslavPerederWoof Nov 5, 2025
bf51327
test: added tests for skip collateral factors logic
VladyslavPerederWoof Nov 5, 2025
4ee3754
test: fixed tests for supply
VladyslavPerederWoof Nov 6, 2025
f96c266
test: fixed tests for supply and transfer
VladyslavPerederWoof Nov 6, 2025
b47d0e1
fix: review fixes
VladyslavPerederWoof Nov 6, 2025
b5f5cdb
fix: lint fixes
VladyslavPerederWoof Nov 6, 2025
883b6c8
test: test fixes
VladyslavPerederWoof Nov 10, 2025
5177225
chore: added natspec for tests
VladyslavPerederWoof Nov 11, 2025
d93806d
chore: removed scenario
VladyslavPerederWoof Nov 11, 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
63e198b
chore: added scenarios
VladyslavPerederWoof Nov 11, 2025
d96232b
Merge branch develop into fix/avoid-pricefeed-paralysis
VladyslavPerederWoof Nov 11, 2025
e01e9c3
chore: added new scenarious
VladyslavPerederWoof Nov 11, 2025
1662266
fix: initialize loop variable in asset iteration
VladyslavPerederWoof Nov 11, 2025
534a449
chore: added descriptions for scenarious
VladyslavPerederWoof Nov 11, 2025
df2dbbf
chore: removed unused variables
VladyslavPerederWoof Nov 11, 2025
58f05d7
refactor: update getLiquidityWithLiquidateCF function signature and a…
VladyslavPerederWoof Nov 11, 2025
1f2f885
fix: fixes
VladyslavPerederWoof Nov 11, 2025
88963e5
chore: remove unused dependency @nomicfoundation/hardhat-network-help…
VladyslavPerederWoof Nov 11, 2025
9bab7ee
chore: add @nomicfoundation/hardhat-network-helpers dependency to har…
VladyslavPerederWoof Nov 11, 2025
6f4a76f
feat: added custom snapshot
VladyslavPerederWoof Nov 11, 2025
3f9caef
fix: change base rpc
MishaShWoof Nov 12, 2025
b1cc600
fix: fixed scenario
VladyslavPerederWoof Nov 12, 2025
82926d8
fix: eslint fixes
VladyslavPerederWoof Nov 12, 2025
f728fd8
feat: add new wbtc whale address to the WHALES list
VladyslavPerederWoof Nov 13, 2025
5c84e87
chore: fix of withdraw scenario
VladyslavPerederWoof Nov 13, 2025
454a2fe
chore: temp skip of nearly added scenarios
VladyslavPerederWoof Nov 13, 2025
7340afa
fix: lint fix
VladyslavPerederWoof Nov 13, 2025
a4c2f41
refactor: enhance quoteCollateral tests to support extended asset lis…
VladyslavPerederWoof Nov 13, 2025
5853567
refactor: update WithdrawScenario to include asset list check in filt…
VladyslavPerederWoof Nov 13, 2025
485ad16
refactor: enhance LiquidationScenario and QuoteCollateral tests to ut…
VladyslavPerederWoof Nov 14, 2025
68f6aab
fix: change rpc
MishaShWoof Nov 14, 2025
60b8360
refactor: update LiquidationScenario and QuoteCollateral tests to ski…
VladyslavPerederWoof Nov 14, 2025
01bb95e
refactor: streamline quoteCollateral function by using local variable…
VladyslavPerederWoof Nov 17, 2025
76ec8f3
refactor: optimize usesAssetList function by introducing a local vari…
VladyslavPerederWoof Nov 17, 2025
03042fb
Merge branch develop into fix/avoid-pricefeed-paralysis
VladyslavPerederWoof Nov 17, 2025
d2801ea
fix: replace ankr with quicknode
MishaShWoof Nov 17, 2025
248034d
fix: fix quote collateral scenario
VladyslavPerederWoof Nov 17, 2025
df2cd6b
fix: update quote calculation to allow for a margin of error in colla…
VladyslavPerederWoof Nov 17, 2025
d85107e
fix: increase margin of error in quote calculation for collateral sce…
VladyslavPerederWoof Nov 17, 2025
d290a86
refactor: enhance LiquidationScenario by adding asset delisting check…
VladyslavPerederWoof Nov 17, 2025
1b6365f
Merge branch develop into fix/avoid-pricefeed-paralysis
VladyslavPerederWoof Nov 17, 2025
16c12c0
refactor: update LiquidationScenario to remove unnecessary scenario.o…
VladyslavPerederWoof Nov 17, 2025
9a18af1
fix: increase margin of error in quote calculation for collateral sce…
VladyslavPerederWoof Nov 17, 2025
49c4893
fix: update quote calculation to use BigInt for margin of error in co…
VladyslavPerederWoof Nov 17, 2025
4d9df56
refactor: remove redundant comments in LiquidationScenario and Withdr…
VladyslavPerederWoof Nov 17, 2025
33e306f
feat: introduce snapshot helper functions for blockchain state manage…
VladyslavPerederWoof Nov 17, 2025
9971c2b
Merge branch develop into woof-software/extended-pause
VladyslavPerederWoof Nov 17, 2025
6491c74
feat: add asset delisting and extended asset list support functions
VladyslavPerederWoof Nov 18, 2025
0c9472a
fix: fix scenarios
VladyslavPerederWoof Nov 18, 2025
20092de
refactor: export toBigInt function from helpers for reuse in math cal…
VladyslavPerederWoof Nov 18, 2025
dbfb903
refactor: remove commented-out code for CometExtAssetList check
VladyslavPerederWoof Nov 18, 2025
5ea9e22
feat: add new ezETH and weETH whale addresses to the WHALES list for …
VladyslavPerederWoof Nov 18, 2025
a7018a9
feat: add new whale addresses for various assets across multiple netw…
VladyslavPerederWoof Nov 18, 2025
9c7300f
fix: fix scenario file naming
VladyslavPerederWoof Nov 19, 2025
1b6904e
chore: natspec fixes
VladyslavPerederWoof Nov 19, 2025
79e17b1
refactor: replace setupExtendedAssetListSupport with supportsExtended…
VladyslavPerederWoof Nov 19, 2025
675bc10
Merge branch woof-software/extended-pause into fix/avoid-pricefeed-pa…
VladyslavPerederWoof Nov 20, 2025
518bc58
feat: revert changes on AssetList and added mock for temp v of new one
VladyslavPerederWoof Nov 21, 2025
52bd37d
feat: add support for mock asset list factory in configurator tests
VladyslavPerederWoof Nov 21, 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
e0f36c1
feat: integrate mock asset list factory support into deployment process
VladyslavPerederWoof Nov 25, 2025
8567489
refactor: rename pause-related events in CometExt and CometExtInterfa…
VladyslavPerederWoof Nov 25, 2025
7040929
refactor: update event names for collateral and base supply pause act…
VladyslavPerederWoof Nov 25, 2025
3d059f2
Merge branch develop into woof-software/extended-pause
VladyslavPerederWoof Nov 26, 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
892de86
test: added collateral deactivation tests
VladyslavPerederWoof Nov 27, 2025
4bfdbef
feat: added collateral deactivation logic
VladyslavPerederWoof 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
de4b034
chore: added natspec
VladyslavPerederWoof Dec 2, 2025
4d7177e
test: added scenarios for deactivated collateral feature
VladyslavPerederWoof Dec 2, 2025
cc47692
test: added tests for deactivated collateral feature
VladyslavPerederWoof Dec 2, 2025
e8c854a
chore: added more comprehensive docs for tests
VladyslavPerederWoof Dec 2, 2025
a80b37b
fix: add temporary hack to skip processing specific proposals (510, 5…
VladyslavPerederWoof Dec 2, 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
2a1124f
Merge branch 'feat/service-patch' into woof-software/extended-pause
VladyslavPerederWoof Dec 12, 2025
6e2d418
feat: fixed unpause logic for asset with index >= 8 with additional t…
VladyslavPerederWoof Dec 12, 2025
a17020b
feat: enforced tests for isLiquidatable semantics acrosss liquidateCF…
VladyslavPerederWoof Dec 12, 2025
1b39615
fix: correct order of collateral asset supply logic in supplyCollater…
VladyslavPerederWoof Dec 12, 2025
87d8cba
chore: remove unnecessary console log from `SupplyScenario.ts`
VladyslavPerederWoof Dec 15, 2025
226cba6
Merge branch woof-software/extended-pause into feat/collateral-deacti…
VladyslavPerederWoof Dec 15, 2025
7a35ff0
test: enhanced scenarios for deactivated collaterals
VladyslavPerederWoof Dec 16, 2025
bcf1a21
fix: update transfer scenario description to clarify behavior when as…
VladyslavPerederWoof Dec 16, 2025
c1e706a
refactor: simplify pause state checks in CometWithExtendedAssetList c…
VladyslavPerederWoof Dec 16, 2025
00361c5
chore: update COMP_WHALES addresses for mainnet
VladyslavPerederWoof Dec 16, 2025
6d01265
feat: add error handling for collateral activation and deactivation i…
VladyslavPerederWoof Dec 17, 2025
b0a580b
test: enhance scenarios for collateral activation and deactivation wi…
VladyslavPerederWoof Dec 17, 2025
21e9a90
refactor: update COMP_WHALES addresses for mainnet in index.ts
VladyslavPerederWoof Dec 17, 2025
40816b6
test: improve collateral activation and deactivation tests with addit…
VladyslavPerederWoof Dec 17, 2025
8d13300
chore: optimized scenarios with for loops
VladyslavPerederWoof Dec 18, 2025
17a1175
refactor: remove temporary hacks for skipping specific proposals in P…
VladyslavPerederWoof Dec 18, 2025
9b39261
chore: code refactoring
VladyslavPerederWoof Dec 18, 2025
a46de9b
Merge branch woof-software/extended-pause into feat/collateral-deacti…
VladyslavPerederWoof Dec 18, 2025
e3e2c63
chore: update governance addresses by removing outdated entries and a…
VladyslavPerederWoof Dec 19, 2025
91a6421
chore: update governance addresses by removing outdated entries and a…
VladyslavPerederWoof Dec 19, 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
bd8375b
Merge branch develop into woof-software/extended-pause
VladyslavPerederWoof Dec 22, 2025
ac17fbc
Merge branch woof-software/extended-pause into feat/collateral-deacti…
VladyslavPerederWoof Dec 22, 2025
5875e80
feat: Supply tests update
artemwoofsoftware Dec 23, 2025
b3456da
fix: working arbitrum scenarios
MishaShWoof Dec 24, 2025
41461c0
refactor: simplify currentPauseOffsetStatus function in CometExt cont…
VladyslavPerederWoof Dec 30, 2025
313a7f6
refactore: supply tests
VladyslavPerederWoof Jan 14, 2026
f8fc889
feat: Utilization peaking impact & borrow indexes grow in empty market
VladyslavPerederWoof Jan 16, 2026
d70140b
feat: added lenders illiquidity preventions
VladyslavPerederWoof Jan 20, 2026
633b26d
chore: removed receive func
VladyslavPerederWoof Jan 20, 2026
5c6ba4d
chore: remove unused import of hardhat console
VladyslavPerederWoof Jan 20, 2026
9174842
test: added tests for supply 24 collaterals
VladyslavPerederWoof Jan 27, 2026
cba9d1c
test: added test for transfering base tokens
VladyslavPerederWoof Jan 28, 2026
c87c47b
test: addedadditional tests for transfer
VladyslavPerederWoof Jan 29, 2026
d237a3d
Merge pull request #249 from woof-software/woof-software/extended-pause
VladyslavBudiukWOOF Jan 30, 2026
676dad1
test: enhance transfer tests with additional scenarios and snapshot f…
VladyslavPerederWoof Feb 3, 2026
61d8db1
Merge branch feat/service-patch into fix/avoid-pricefeed-paralysis
VladyslavPerederWoof Feb 4, 2026
4c6c978
test: added tests for price feed with revert
VladyslavPerederWoof Feb 5, 2026
171d350
feat: removed MockAssetList sc with factory, updated checks in AssetL…
VladyslavPerederWoof Feb 6, 2026
45536f0
refactor: remove redundant check for descaled borrow collateral facto…
VladyslavPerederWoof Feb 6, 2026
0b015d4
test: add non-standard token transfer scenarios and fee-on-transfer h…
VladyslavPerederWoof Feb 6, 2026
cd2e749
Merge branch feat/service-patch into woof-software/supply-tests
VladyslavPerederWoof Feb 9, 2026
7b4ceb4
Merge branch feat/service-patch into test/transfer-functionality
VladyslavPerederWoof Feb 9, 2026
21bf6dc
test: enhance supply tests with additional checks for paused states a…
VladyslavPerederWoof Feb 9, 2026
35b6f1c
test: remove isolation from supply test suite
VladyslavPerederWoof Feb 9, 2026
48676c8
test: add scenarios for pausing lender and borrower transfers, and co…
VladyslavPerederWoof Feb 10, 2026
fcc6f59
test: add tests for pausing and unpausing collateral supply for multi…
VladyslavPerederWoof Feb 10, 2026
f0dd507
fix: internal audit fixes
VladyslavPerederWoof Feb 12, 2026
bd73b8e
fix: internal audit fixes
VladyslavPerederWoof Feb 12, 2026
3f53179
feat: added accrueInternal to supply and withdraw collateral function…
VladyslavPerederWoof Feb 19, 2026
cb452af
refactor: simplify supply functions by removing redundant operator pa…
VladyslavPerederWoof Feb 19, 2026
91760c1
refactor: enhance isLiquidatable logic and improve asset price handli…
VladyslavPerederWoof Feb 20, 2026
8b2ea24
new fixes
MishaShWoof Feb 23, 2026
73cb01d
fix
MishaShWoof Feb 23, 2026
7d4a913
fix: precision fix
MishaShWoof Feb 23, 2026
f78c91e
feat: withdrawal test refactoring with reduced duplication, non-stand…
Feb 23, 2026
a39d72a
WIP: utilization for transferBase and during withdraw for lenders
VladyslavPerederWoof Feb 26, 2026
0375004
feat: add collateral deactivation checks and update error messages
VladyslavPerederWoof Feb 27, 2026
87eedc5
fix: Additional cases, revert case replacement, ext pause restruct
Feb 28, 2026
de79748
fix: restore amount assignment in supplyCollateral function to ensure…
VladyslavPerederWoof Mar 5, 2026
d345a99
Merge branch feat/withdrawal-test-refactoring into feat/supply-n-with…
VladyslavPerederWoof Mar 31, 2026
32d79c6
Merge branch test/transfer-functionality into feat/supply-n-withdraw-…
VladyslavPerederWoof Mar 31, 2026
f70ca50
refactor: split accrueAccount into internal and external functions fo…
VladyslavPerederWoof Apr 1, 2026
7080468
fix: forge-std revert
VladyslavPerederWoof Apr 3, 2026
c8bd632
revert: forge-std to previous version
VladyslavPerederWoof Apr 3, 2026
5fdd114
revert: packages and lock file
VladyslavPerederWoof Apr 3, 2026
6bed860
wip: skipped logic for pushing utilization back
VladyslavPerederWoof Apr 3, 2026
32831a3
wip: removed console log
VladyslavPerederWoof Apr 3, 2026
8a568ee
chore: restore @tenderly/hardhat-tenderly dependency in package.json
VladyslavPerederWoof Apr 3, 2026
002a06d
fix: moved assetPrices array creation after check of user principal
VladyslavPerederWoof Apr 3, 2026
2efe3b1
refactor: enhance collateral factor validation logic in AssetList con…
VladyslavPerederWoof Apr 3, 2026
f0ea472
feat: enhance utilization checks during transfers and withdrawals to …
VladyslavPerederWoof Apr 7, 2026
f3ebdba
fix: change scroll rpc
MishaShWoof Apr 9, 2026
cda82b3
Merge pull request #339 from woof-software/feat/supply-n-withdraw-accrue
VladyslavPerederWoof Apr 10, 2026
5c1934d
Merge pull request #345 from woof-software/feat/price-fetching-optimi…
VladyslavPerederWoof Apr 10, 2026
da00690
fix: update ProposalConstraint to skip proposal 510 and 567
VladyslavPerederWoof Apr 10, 2026
8404b8a
Merge branch 'woof-software/supply-tests' into fix/supplyInternal-red…
VladyslavPerederWoof Apr 10, 2026
805b3e5
fix: added proposal for skip
VladyslavPerederWoof Apr 10, 2026
0b405a1
Merge branch 'woof-software/supply-tests' into feat/lenders-illiquidity
VladyslavPerederWoof Apr 10, 2026
5528c8a
fix: update skipped proposals
VladyslavPerederWoof Apr 10, 2026
1f84908
Merge branch 'woof-software/supply-tests' into fix/supplyInternal-red…
VladyslavPerederWoof Apr 10, 2026
7644e5f
chore: skipped temporary proposals
VladyslavPerederWoof Apr 10, 2026
c5c7492
fix: tests fixes
VladyslavPerederWoof Apr 10, 2026
0442a1c
Merge pull request #340 from woof-software/fix/supplyInternal-redunda…
VladyslavPerederWoof Apr 14, 2026
79f0cd4
Merge branch 'woof-software/supply-tests' into feat/lenders-illiquidity
VladyslavPerederWoof Apr 14, 2026
c750952
Merge pull request #316 from woof-software/feat/lenders-illiquidity
VladyslavPerederWoof Apr 14, 2026
a2775bc
Merge branch 'develop' into feat/service-patch
VladyslavPerederWoof Apr 14, 2026
7c6d081
Merge branch 'feat/service-patch' into woof-software/supply-tests
VladyslavPerederWoof Apr 14, 2026
267d847
fix: Forge tests workflow fixed
VladyslavPerederWoof Apr 15, 2026
8572779
Merge pull request #313 from woof-software/woof-software/supply-tests
VladyslavPerederWoof Apr 15, 2026
72c9ae4
chore: removed receive function that was added accidetly and was not …
VladyslavPerederWoof Apr 15, 2026
953f998
Merge branch fix/avoid-pricefeed-paralysis into feat/service-patch
VladyslavPerederWoof Apr 16, 2026
a6c26bf
Merge branch feat/collateral-deactivation into feat/service-patch
VladyslavPerederWoof Apr 17, 2026
15d5ab0
fix(scenarios): update asset borrow collateral factor to zero before …
VladyslavPerederWoof Apr 17, 2026
9a5d94c
feat: simulation for proposal, that target multiple l2 chains
MishaShWoof Apr 24, 2026
ccc4855
fix: update relations and cctp addresses
MishaShWoof Apr 24, 2026
5f6c765
Merge branch 'develop' of github.com:woof-software/comet into feat/mu…
MishaShWoof Apr 24, 2026
56096fc
fix: clean up
MishaShWoof Apr 24, 2026
e5144db
fix
MishaShWoof Apr 24, 2026
32e63ae
wip
MishaShWoof May 1, 2026
c980175
fix: handle max gaslimit per tx
MishaShWoof May 1, 2026
750ede2
fix: slither
MishaShWoof May 1, 2026
d66627b
Merge branch 'develop' of github.com:woof-software/comet into woof-so…
MishaShWoof May 5, 2026
6c05226
wip: tmp migration
MishaShWoof May 6, 2026
269860c
feat: update with proper actions
MishaShWoof May 7, 2026
686a627
wip
MishaShWoof May 11, 2026
e02ba0d
fix: change capo branch
MishaShWoof May 13, 2026
237c5a4
refactor: enhance collateral factor validation and error handling in …
VladyslavPerederWoof May 13, 2026
954a635
Merge branch 'develop' of github.com:woof-software/comet into feat/mu…
MishaShWoof May 14, 2026
431202f
refactor(tests): improve test descriptions for asset liquidation scen…
VladyslavPerederWoof May 14, 2026
a1dbe7e
Merge pull request #417 from woof-software/fix/price-fetching-n-col-f…
VladyslavBudiukWOOF May 14, 2026
cb19c8f
feat: tenderly simulations for multiple messages for one network
MishaShWoof May 14, 2026
4544e7c
test: improved test cases description, added new tests
VladyslavPerederWoof May 15, 2026
0905c6d
Merge pull request #419 from woof-software/fix/price-fetching-n-col-f…
VladyslavBudiukWOOF May 15, 2026
e18d7a8
fix: supply and withdraw scenario fixes
MishaShWoof May 19, 2026
ac1c003
Merge branch 'develop' of github.com:woof-software/comet into woof-so…
MishaShWoof May 20, 2026
b6946a1
feat: description
MishaShWoof May 20, 2026
a9747c9
feat: recent proposals
MishaShWoof May 21, 2026
c1c411a
fix: speed up gas tests
MishaShWoof May 21, 2026
2c7d198
fix: set enacted to true
MishaShWoof May 21, 2026
7b738e5
fix: remove redundant migrations
MishaShWoof May 22, 2026
eadf6f4
fix: undo delition
MishaShWoof May 22, 2026
0882cd0
Merge branch 'feat/multichain-proposal-simulation' of github.com:woof…
MishaShWoof May 25, 2026
aad08e3
fix: seacrest and tenderly simulation fix
MishaShWoof May 25, 2026
947827d
multiple migrations and some fixes to l2 -> L1 simulation
MishaShWoof May 25, 2026
24d3fa9
fix: speed up scenario run
MishaShWoof May 26, 2026
46312ee
feat: audit for service patch
MishaShWoof May 26, 2026
5c77c15
fix: scroll fix and a bunch of new whales
MishaShWoof May 27, 2026
a511449
Merge branch 'develop' of github.com:woof-software/comet into woof-so…
MishaShWoof May 27, 2026
1773fad
Merge branch 'feat/service-patch' of github.com:woof-software/comet i…
MishaShWoof May 27, 2026
ca77ea5
fix: scroll fix
MishaShWoof May 27, 2026
70c6ddd
feat: audit links
MishaShWoof May 27, 2026
1c230fa
fix: update forge and scenario config
MishaShWoof May 29, 2026
3f1c7d4
Merge branch 'develop-tmp' of github.com:woof-software/comet into woo…
MishaShWoof May 29, 2026
7bf4b4d
fix: fixes from the linea and scroll branch
MishaShWoof May 29, 2026
5cb11e4
fix: linter fix
MishaShWoof May 29, 2026
9b39401
fix: bulker scenario update for mainnet usdc
MishaShWoof May 29, 2026
92348dd
fix: update migration
MishaShWoof May 29, 2026
ebb99cf
Merge branch 'main' of github.com:woof-software/comet into develop-tmp
MishaShWoof Jun 1, 2026
8bc062d
Merge branch 'develop-tmp' of github.com:woof-software/comet into woo…
MishaShWoof Jun 1, 2026
e987be8
fix: New Ext addresses
MishaShWoof Jun 20, 2026
0cd20ff
fix: Enable liquidation scenario
MishaShWoof Jun 20, 2026
df30e5d
fix: remove the truncate of the baseSupplyIndex (#464)
VladyslavBudiukWOOF Jul 2, 2026
b7329f1
test: update unit test suite to satisfy new business logic
VladyslavBudiukWOOF Jul 8, 2026
ebb433c
Merge branch 'main' of github.com:woof-software/comet into woof-softw…
MishaShWoof Jul 14, 2026
f9dd235
fix: migrations for test runs
MishaShWoof Jul 14, 2026
93a2f8a
Merge branch 'feat/service-patch' of github.com:woof-software/comet i…
MishaShWoof Jul 14, 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
Binary file added audits/Service Patch Audit.pdf
Binary file not shown.
16 changes: 12 additions & 4 deletions contracts/AssetList.sol
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,17 @@ contract AssetList {
if (IPriceFeed(priceFeed).decimals() != PRICE_FEED_DECIMALS) revert CometMainInterface.BadDecimals();
if (IERC20NonStandard(asset).decimals() != decimals_) revert CometMainInterface.BadDecimals();

// Ensure collateral factors are within range
if (assetConfig.borrowCollateralFactor >= assetConfig.liquidateCollateralFactor) revert CometMainInterface.BorrowCFTooLarge();
// Sanity checks for factors ordering: BCF < LCF; LCF <= MAX; LF <= MAX
if (assetConfig.borrowCollateralFactor >= assetConfig.liquidateCollateralFactor && assetConfig.borrowCollateralFactor != 0)
revert CometMainInterface.BorrowCFTooLarge();
Comment on lines +141 to +142
if (assetConfig.liquidateCollateralFactor > MAX_COLLATERAL_FACTOR) revert CometMainInterface.LiquidateCFTooLarge();
if (assetConfig.liquidationFactor > MAX_COLLATERAL_FACTOR) revert CometMainInterface.LiqPenaltyTooHigh();

// Valid collateral factor configurations:
// 1. Both BCF and LCF are 0 => collateral is fully de-listed
// 2. borrowCF=0, liquidateCF>0 => soft de-list (no new borrows, controlled liquidation wind-down)
// 3. Both non-zero, properly ordered => active collateral
// Invalid: borrowCF>0, liquidateCF=0 => reverts (borrow power without liquidation coverage)

unchecked {
// Keep 4 decimals for each factor
Expand All @@ -148,8 +156,8 @@ contract AssetList {
uint16 liquidateCollateralFactor = uint16(assetConfig.liquidateCollateralFactor / descale);
uint16 liquidationFactor = uint16(assetConfig.liquidationFactor / descale);

// Be nice and check descaled values are still within range
if (borrowCollateralFactor >= liquidateCollateralFactor) revert CometMainInterface.BorrowCFTooLarge();
// safety check duplicate sanity check on original values to ensure no values skewing after descaling and type conversion
if (borrowCollateralFactor >= liquidateCollateralFactor && borrowCollateralFactor != 0) revert CometMainInterface.BorrowCFTooLarge();

// Keep whole units of asset for supply cap
uint64 supplyCap = uint64(assetConfig.supplyCap / (10 ** decimals_));
Expand Down
18 changes: 18 additions & 0 deletions contracts/CometCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ abstract contract CometCore is CometConfiguration, CometStorage, CometMath {
uint8 internal constant PAUSE_ABSORB_OFFSET = 3;
uint8 internal constant PAUSE_BUY_OFFSET = 4;

/// @dev Offsets for specific actions in the extended pause flag bit array
/// @dev Offset of pause lenders withdraw
uint24 internal constant PAUSE_LENDERS_WITHDRAW_OFFSET = 0;
/// @dev Offset of pause borrowers withdraw
uint24 internal constant PAUSE_BORROWERS_WITHDRAW_OFFSET = 1;
/// @dev Offset of pause collateral supply
uint24 internal constant PAUSE_COLLATERAL_SUPPLY_OFFSET = 2;
/// @dev Offset of pause base supply
uint24 internal constant PAUSE_BASE_SUPPLY_OFFSET = 3;
/// @dev Offset of pause lenders transfer
uint24 internal constant PAUSE_LENDERS_TRANSFER_OFFSET = 4;
/// @dev Offset of pause borrowers transfer
uint24 internal constant PAUSE_BORROWERS_TRANSFER_OFFSET = 5;
/// @dev Offset of pause collateral transfer
uint24 internal constant PAUSE_COLLATERALS_TRANSFER_OFFSET = 6;
/// @dev Offset of pause collateral withdraw
uint24 internal constant PAUSE_COLLATERALS_WITHDRAW_OFFSET = 7;

/// @dev The decimals required for a price feed
uint8 internal constant PRICE_FEED_DECIMALS = 8;

Expand Down
216 changes: 216 additions & 0 deletions contracts/CometExt.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pragma solidity 0.8.15;

import "./CometExtInterface.sol";
import "./CometMainInterface.sol";

contract CometExt is CometExtInterface {
/** Public constants **/
Expand Down Expand Up @@ -29,6 +30,27 @@ contract CometExt is CometExtInterface {
/// @dev The ERC20 symbol for wrapped base token
bytes32 internal immutable symbol32;

/** Modifiers **/

/**
* @dev Modifier to check if the sender is the governor or pause guardian
*/
modifier onlyGovernorOrPauseGuardian() {
if (msg.sender != CometMainInterface(address(this)).governor() &&
msg.sender != CometMainInterface(address(this)).pauseGuardian())
revert OnlyPauseGuardianOrGovernor();
_;
}

/**
* @dev Modifier to check if the asset index is valid
* @param assetIndex The index of the asset
*/
modifier isValidAssetIndex(uint24 assetIndex) {
if (assetIndex >= CometMainInterface(address(this)).numAssets()) revert InvalidAssetIndex();
_;
}

/**
* @notice Construct a new protocol instance
* @param config The mapping of initial/constant parameters
Expand Down Expand Up @@ -205,4 +227,198 @@ contract CometExt is CometExtInterface {
if (block.timestamp >= expiry) revert SignatureExpired();
allowInternal(signatory, manager, isAllowed_);
}

/*//////////////////////////////////////////////////////////////
EXTENDED PAUSE CONTROL
//////////////////////////////////////////////////////////////*/

/**
* @notice Set the status of a pause offset
* @param offset The offset to set
* @param paused The new status of the pause offset
*/
function setPauseFlag(uint24 offset, bool paused) internal {
paused ? extendedPauseFlags |= (uint24(1) << offset) : extendedPauseFlags &= ~(uint24(1) << offset);
}

/**
* @notice Get the current status of a pause offset
* @param offset The offset to check
* @return The current status of the pause offset
*/
function currentPauseOffsetStatus(uint24 offset) internal view returns (bool) {
return (extendedPauseFlags & (uint24(1) << offset)) != 0;
}

/**
* @notice Check if the collateral asset is deactivated
* @param assetIndex The index of the collateral asset
* @return Whether the collateral asset is deactivated
*/
function isCollateralDeactivated(uint24 assetIndex) public view returns (bool) {
return (deactivatedCollaterals & (uint24(1) << assetIndex) != 0) == true;
}

/**
* @inheritdoc CometExtInterface
*/
function pauseLendersWithdraw(bool paused) override external onlyGovernorOrPauseGuardian {
if (currentPauseOffsetStatus(PAUSE_LENDERS_WITHDRAW_OFFSET) == paused) revert OffsetStatusAlreadySet(PAUSE_LENDERS_WITHDRAW_OFFSET, paused);

setPauseFlag(PAUSE_LENDERS_WITHDRAW_OFFSET, paused);

emit LendersWithdrawPauseAction(paused);
}

/**
* @inheritdoc CometExtInterface
*/
function pauseBorrowersWithdraw(bool paused) override external onlyGovernorOrPauseGuardian {
if (currentPauseOffsetStatus(PAUSE_BORROWERS_WITHDRAW_OFFSET) == paused) revert OffsetStatusAlreadySet(PAUSE_BORROWERS_WITHDRAW_OFFSET, paused);

setPauseFlag(PAUSE_BORROWERS_WITHDRAW_OFFSET, paused);

emit BorrowersWithdrawPauseAction(paused);
}

/**
* @inheritdoc CometExtInterface
*/
function pauseCollateralWithdraw(bool paused) override external onlyGovernorOrPauseGuardian {
if (currentPauseOffsetStatus(PAUSE_COLLATERALS_WITHDRAW_OFFSET) == paused) revert OffsetStatusAlreadySet(PAUSE_COLLATERALS_WITHDRAW_OFFSET, paused);

setPauseFlag(PAUSE_COLLATERALS_WITHDRAW_OFFSET, paused);

emit CollateralWithdrawPauseAction(paused);
}

/**
* @inheritdoc CometExtInterface
*/
function pauseCollateralAssetWithdraw(uint24 assetIndex, bool paused) override external onlyGovernorOrPauseGuardian isValidAssetIndex(assetIndex) {
if ((collateralsWithdrawPauseFlags & (uint24(1) << assetIndex) != 0) == paused) revert CollateralAssetOffsetStatusAlreadySet(collateralsWithdrawPauseFlags, assetIndex, paused);

paused ? collateralsWithdrawPauseFlags |= (uint24(1) << assetIndex) : collateralsWithdrawPauseFlags &= ~(uint24(1) << assetIndex);

emit CollateralAssetWithdrawPauseAction(assetIndex, paused);
}

/**
* @inheritdoc CometExtInterface
*/
function pauseCollateralSupply(bool paused) override external onlyGovernorOrPauseGuardian {
if (currentPauseOffsetStatus(PAUSE_COLLATERAL_SUPPLY_OFFSET) == paused) revert OffsetStatusAlreadySet(PAUSE_COLLATERAL_SUPPLY_OFFSET, paused);

setPauseFlag(PAUSE_COLLATERAL_SUPPLY_OFFSET, paused);

emit CollateralSupplyPauseAction(paused);
}

/**
* @inheritdoc CometExtInterface
*/
function pauseBaseSupply(bool paused) override external onlyGovernorOrPauseGuardian {
if (currentPauseOffsetStatus(PAUSE_BASE_SUPPLY_OFFSET) == paused) revert OffsetStatusAlreadySet(PAUSE_BASE_SUPPLY_OFFSET, paused);

setPauseFlag(PAUSE_BASE_SUPPLY_OFFSET, paused);

emit BaseSupplyPauseAction(paused);
}

/**
* @inheritdoc CometExtInterface
*/
function pauseCollateralAssetSupply(uint24 assetIndex, bool paused) override external onlyGovernorOrPauseGuardian isValidAssetIndex(assetIndex) {
if ((collateralsSupplyPauseFlags & (uint24(1) << assetIndex) != 0) == paused) revert CollateralAssetOffsetStatusAlreadySet(collateralsSupplyPauseFlags, assetIndex, paused);
if (!paused && isCollateralDeactivated(assetIndex)) revert CollateralIsDeactivated(assetIndex);

paused ? collateralsSupplyPauseFlags |= (uint24(1) << assetIndex) : collateralsSupplyPauseFlags &= ~(uint24(1) << assetIndex);

emit CollateralAssetSupplyPauseAction(assetIndex, paused);
}

/**
* @inheritdoc CometExtInterface
*/
function pauseLendersTransfer(bool paused) override external onlyGovernorOrPauseGuardian {
if (currentPauseOffsetStatus(PAUSE_LENDERS_TRANSFER_OFFSET) == paused) revert OffsetStatusAlreadySet(PAUSE_LENDERS_TRANSFER_OFFSET, paused);

setPauseFlag(PAUSE_LENDERS_TRANSFER_OFFSET, paused);

emit LendersTransferPauseAction(paused);
}

/**
* @inheritdoc CometExtInterface
*/
function pauseBorrowersTransfer(bool paused) override external onlyGovernorOrPauseGuardian {
if (currentPauseOffsetStatus(PAUSE_BORROWERS_TRANSFER_OFFSET) == paused) revert OffsetStatusAlreadySet(PAUSE_BORROWERS_TRANSFER_OFFSET, paused);

setPauseFlag(PAUSE_BORROWERS_TRANSFER_OFFSET, paused);

emit BorrowersTransferPauseAction(paused);
}

/**
* @inheritdoc CometExtInterface
*/
function pauseCollateralTransfer(bool paused) override external onlyGovernorOrPauseGuardian {
if (currentPauseOffsetStatus(PAUSE_COLLATERALS_TRANSFER_OFFSET) == paused) revert OffsetStatusAlreadySet(PAUSE_COLLATERALS_TRANSFER_OFFSET, paused);

setPauseFlag(PAUSE_COLLATERALS_TRANSFER_OFFSET, paused);

emit CollateralTransferPauseAction(paused);
}

/**
* @inheritdoc CometExtInterface
*/
function pauseCollateralAssetTransfer(uint24 assetIndex, bool paused) override external onlyGovernorOrPauseGuardian isValidAssetIndex(assetIndex) {
if ((collateralsTransferPauseFlags & (uint24(1) << assetIndex) != 0) == paused) revert CollateralAssetOffsetStatusAlreadySet(collateralsTransferPauseFlags, assetIndex, paused);
if (!paused && isCollateralDeactivated(assetIndex)) revert CollateralIsDeactivated(assetIndex);

paused ? collateralsTransferPauseFlags |= (uint24(1) << assetIndex) : collateralsTransferPauseFlags &= ~(uint24(1) << assetIndex);

emit CollateralAssetTransferPauseAction(assetIndex, paused);
}

/**
* @inheritdoc CometExtInterface
*/
function deactivateCollateral(uint24 assetIndex) override external isValidAssetIndex(assetIndex) {
if (msg.sender != CometMainInterface(address(this)).pauseGuardian()) revert OnlyPauseGuardian();
if (isCollateralDeactivated(assetIndex)) revert CollateralIsDeactivated(assetIndex);

// Mark collateral as deactivated
deactivatedCollaterals |= (uint24(1) << assetIndex);
emit CollateralDeactivated(assetIndex);

// Pause supply of this collateral
collateralsSupplyPauseFlags |= (uint24(1) << assetIndex);
emit CollateralAssetSupplyPauseAction(assetIndex, true);

// Pause transfer of this collateral
collateralsTransferPauseFlags |= (uint24(1) << assetIndex);
emit CollateralAssetTransferPauseAction(assetIndex, true);
}

/**
* @inheritdoc CometExtInterface
*/
function activateCollateral(uint24 assetIndex) override external isValidAssetIndex(assetIndex) {
if (msg.sender != CometMainInterface(address(this)).governor()) revert OnlyGovernor();
if ((deactivatedCollaterals & (uint24(1) << assetIndex) != 0) == false) revert CollateralIsActivated(assetIndex);

// Mark collateral as activated
deactivatedCollaterals &= ~(uint24(1) << assetIndex);
emit CollateralActivated(assetIndex);

// Unpause supply of this collateral
collateralsSupplyPauseFlags &= ~(uint24(1) << assetIndex);
emit CollateralAssetSupplyPauseAction(assetIndex, false);

// Unpause transfer of this collateral
collateralsTransferPauseFlags &= ~(uint24(1) << assetIndex);
emit CollateralAssetTransferPauseAction(assetIndex, false);
}
}
Loading