Skip to content

Conversation

@clement-ux
Copy link
Contributor

No description provided.

@clement-ux clement-ux marked this pull request as ready for review November 25, 2025 12:40
@clement-ux clement-ux merged commit f2ee35e into clement/ethena-invariant-tests Nov 25, 2025
8 checks passed
@clement-ux clement-ux deleted the clement/ethena-invariant-tests-medusa branch November 25, 2025 12:40
naddison36 pushed a commit that referenced this pull request Nov 25, 2025
* Add mock for sUSDe contract.

* Add Medusa VM interface.

* Add base contracts and setup for EthenaARM invariant tests

* Simplify MockSUSDE

* Add unstakers

* Prepare list for target functions

* Fix rewards calculation

* Add label and assume functions to Vm interface

* Improve invariant setup

* wip add targets for susde contract

* add logs

* Update SUSDE target functions to reflect completed implementations

* Add Morpho target functions

* Add Find library for user request retrieval in testing

* Add ARM deposit/request/claim target functions

* Add MockMorpho contract and update tests for utilization rate functionality

* Fix claimable request check in Find library by updating variable usage

* Make MockMorpho more realistic

* Add target functions for allocate liquidity on ARM.

* Add target function for setting prices in TargetFunctions contract

* add target functions for swaps

* Fix ClaimRequest checks

* Add target for fees management

* Add target functions for base request/claim withdraw

* Add Math library with utility functions for absolute values, min/max, and comparisons

* Add ghost values

* Add initial swaps invariant

* implement properties

* Add invariant functions for swap and liquidity properties

* Add after-invariant checks and unit tests for ARM functionality

* Add test target for Ethena invariant checks

* Refactor CI workflow to include Ethena invariant tests and adjust Foundry profiles for improved testing parameters

* Reduce invariant test runs in CI profile from 1000 to 500 for improved performance

* Remove redundant invariant checks for USDe balance and ARM total assets in Properties contract

* Add exchange rate checks to target functions for improved invariants

* fmt

* Update Foundry version to 1.4.4 and enforce fail on revert in CI profile

* try to fix CI

* try again

* externalize fetching user with ARM shares

* fmt

* [Ethena ARM] Support Medusa Fuzzer (#160)

* wip

* Add crytic-export directory to .gitignore for improved build cleanliness

* Disable assertion testing and update property test prefix in medusa.json

* Refactor code structure for improved readability and maintainability

* Update .gitignore to ignore the crytic-export directory instead of its contents

* Rename FuzzerFoundry_EthenaARM file

* Refactor EthenaARM contracts to use state variables for label availability and update medusa.json for improved assertion testing configurations

* Update invariant profile settings for reduced runs and depth

* restore default values

* remove crytic export

* improve tests

* try something

* try again

* add medusa ci

* skip fuzzer during contract compilation

* try again

* add previous work

* Update invariant properties in Properties.sol to reflect current state

* Update USDe balance requirement and remove dead address redemption logic

* bump to latest forge version

* Update Foundry version specification from "latest" to "stable" in CI workflow

* small adjustment

* increase ci runs

* remove one invariant

* adjust comment

* update contract titles and descriptions for FuzzerFoundry and FuzzerMedusa

* add ethena invariant test to test-invariants target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants