Skip to content

Conversation

@naddison36
Copy link
Collaborator

Changes

  • Set capital limit at 100k USDe
  • whitelisted same accounts as Ether.fi ARM
  • Replaced Morpho Market with a Aave USDe Vault
  • Increase allocateThreshold to 100 USDe
  • Increased minSharesToRedeem to 1 USDe

naddison36 and others added 4 commits November 27, 2025 15:19
* Add ethena smoke tests

* add allocate test

* Add allocation tests for AAVE market with and without yield

* fmt
@naddison36 naddison36 marked this pull request as ready for review November 28, 2025 01:19
@naddison36 naddison36 merged commit aa0a5c0 into nicka/ethena Dec 1, 2025
8 checks passed
@naddison36 naddison36 deleted the nicka/ethena-aave branch December 1, 2025 21:52
naddison36 added a commit that referenced this pull request Dec 2, 2025
* Removed unused event from Ether.fi ARM
Added more Natspec

* WIP Ethena ARM

* Ethena ARM processes

* Add support for base assets that appreciate against the liquidity asset

* Deploy script for Ethena ARM

* Fix build

* Refactored EthenaARM so there can be multiple cooldown requests

* Add Test for Ethena ARM (#149)

* Add EthenaARM integration tests and shared setup

* Rename test file

* Add integration tests for swapTokensForExactTokens functionality in EthenaARM

* Refactor swapExactTokensForTokens tests for clarity and correctness

* Remove unused IERC721Receiver import from EthenaARM contract

* Ethena ARM: Unstake request v1 (#150)

* Enhance EthenaARM to support multiple unstaker contracts for parallel cooldown requests

* Fix type casting for last used unstaker index to ensure proper indexing

* Simplify array management

* Implement request delay for unstake requests and update visibility of state variables

* Refactor comments in EthenaARM contract for clarity and consistency

* Remove unused imports and clean up comments in EthenaARM contract

* Refactor EthenaARM contract to use constant for maximum unstakers and update related code for clarity

* Added snapMarket Hardhat task

* Updated Ethena process diagram

* EthenaARM Tests (#153)

* wip add unstaker deployment script

* Refactor deployUnstakers function to use constant for max unstakers

* Rename setUnstaker function to setUnstakers for clarity

* Deploy unstakers and set ownership in DeployEthenaARMScript

* Make unstakers array public for improved accessibility

* Add tests for request/claim withdraw

* Add more test for request/claim

* Fix error message for request delay in requestBaseWithdrawal function

* Simplify cooldown amount handling in EthenaARM contract

* Add tests for swapping SUSDE to USDE with outstanding withdrawals and insufficient liquidity

* Refactor cooldown handling in EthenaARM and EthenaUnstaker contracts to use UserCooldown struct

* Refactor import statements in DeployEthenaARMScript to consolidate IWETH and IStakedUSDe imports

* [Ethena ARM] - Invariant Testing (#156)

* 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

* Added Ethena contract dependency diagram

* Fix tuple unpacking in withdrawalRequests to maintain consistency in Properties and TargetFunctions

* Update propertyI to check for greater than or equal condition in Properties contract

* Ethena ARM deployment script (#162)

* Update Ethena ARM deploy script

* Added DEBUG_HIDE_DATE to setActionVars Hardhat task

* Added Aave v2 USDe Vault

* [Ethena ARM] Add smoke tests. (#163)

* Add ethena smoke tests

* add allocate test

* Add allocation tests for AAVE market with and without yield

* fmt

---------

Co-authored-by: Clément <55331875+clement-ux@users.noreply.github.com>

* Added days option to snap Hardhat task

* Added siUSD and iUSD tokens

* Add match target to Makefile for contract verification

* [Ethena ARM] Deploy contracts (#170)

* Deploy Ethena ARM

* Add match target to Makefile for contract verification

* remove incorrect invariant

---------

Co-authored-by: Clément <55331875+clement-ux@users.noreply.github.com>
Co-authored-by: Clément <clemmoller@gmail.com>
naddison36 added a commit that referenced this pull request Dec 3, 2025
* Removed unused event from Ether.fi ARM
Added more Natspec

* WIP Ethena ARM

* Ethena ARM processes

* Add support for base assets that appreciate against the liquidity asset

* Deploy script for Ethena ARM

* Fix build

* Refactored EthenaARM so there can be multiple cooldown requests

* Add Test for Ethena ARM (#149)

* Add EthenaARM integration tests and shared setup

* Rename test file

* Add integration tests for swapTokensForExactTokens functionality in EthenaARM

* Refactor swapExactTokensForTokens tests for clarity and correctness

* Remove unused IERC721Receiver import from EthenaARM contract

* Ethena ARM: Unstake request v1 (#150)

* Enhance EthenaARM to support multiple unstaker contracts for parallel cooldown requests

* Fix type casting for last used unstaker index to ensure proper indexing

* Simplify array management

* Implement request delay for unstake requests and update visibility of state variables

* Refactor comments in EthenaARM contract for clarity and consistency

* Remove unused imports and clean up comments in EthenaARM contract

* Refactor EthenaARM contract to use constant for maximum unstakers and update related code for clarity

* Added snapMarket Hardhat task

* Updated Ethena process diagram

* EthenaARM Tests (#153)

* wip add unstaker deployment script

* Refactor deployUnstakers function to use constant for max unstakers

* Rename setUnstaker function to setUnstakers for clarity

* Deploy unstakers and set ownership in DeployEthenaARMScript

* Make unstakers array public for improved accessibility

* Add tests for request/claim withdraw

* Add more test for request/claim

* Fix error message for request delay in requestBaseWithdrawal function

* Simplify cooldown amount handling in EthenaARM contract

* Add tests for swapping SUSDE to USDE with outstanding withdrawals and insufficient liquidity

* Refactor cooldown handling in EthenaARM and EthenaUnstaker contracts to use UserCooldown struct

* Refactor import statements in DeployEthenaARMScript to consolidate IWETH and IStakedUSDe imports

* [Ethena ARM] - Invariant Testing (#156)

* 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

* Added Ethena contract dependency diagram

* Fix tuple unpacking in withdrawalRequests to maintain consistency in Properties and TargetFunctions

* Update propertyI to check for greater than or equal condition in Properties contract

* Ethena ARM deployment script (#162)

* Update Ethena ARM deploy script

* Added DEBUG_HIDE_DATE to setActionVars Hardhat task

* Added Aave v2 USDe Vault

* [Ethena ARM] Add smoke tests. (#163)

* Add ethena smoke tests

* add allocate test

* Add allocation tests for AAVE market with and without yield

* fmt

---------

Co-authored-by: Clément <55331875+clement-ux@users.noreply.github.com>

* Added days option to snap Hardhat task

* Added siUSD and iUSD tokens

* Add match target to Makefile for contract verification

* [Ethena ARM] Deploy contracts (#170)

* Deploy Ethena ARM

* Add match target to Makefile for contract verification

* remove incorrect invariant

* Refactor allocate function to clarify return value handling from static call

* Update ARM name references to include Ethena in subtask descriptions

* Add Ethena to ARM name options in snap task and liquidity asset mapping

* Update depositARM, request and claim task to support Ethena ARM and enhance ARM name options

* Update setPrices subtask to include Ethena in ARM name options

* Add Ethena support in swap and tasks descriptions

* Add Ethena withdrawal tasks and status retrieval functionality

* Add ethena actions

* Add Ethena action variables for fee collection and withdrawal tasks

* Fix smoke tests

* Update README.md to rename EtherFi withdrawal command to Ethena withdrawal

* fmt

* Unwrapped sUSDe to USDe in snap for Ethena

* Increased the Ethena allocate threshold in Action

* Add Ethena Action config to rollup
Updated the ARM ABI used by Defender Actions

* Fix Ethena auto claim withdrawals

---------

Co-authored-by: Nicholas Addison <nick@addisonbrown.com.au>
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.

3 participants