Skip to content

Conversation

@naddison36
Copy link
Collaborator

Overview

Ethena's synthetic dollar, USDe, provides the crypto-native, scalable solution for money achieved by delta-hedging Bitcoin, Ethereum and other governance-approved spot assets using perpetual and deliverable futures contracts, as well as holding liquid stables such as USDC and USDT.

USDe can be staked to receive protocol rewards. sUSDe is the liquidity provider token received when staking USDe. There is a 7 day cooling off period to unstake sUSDe which means sUSDe trades with a discount in the market.

Objectives/Requirements

  • Deploy a sUSDe based ARM with USDe as the liquidity asset.
  • The liquidity provider should be limited to an Origin Treasury multi-sig wallet
  • The ARM Operator will unstake sUSDe to USDe which has a 7 days cooling off period
  • The AbstractARM should be enhanced to support a base asset that are not pegged to the liquidity asset. In Ethena’s case, sUSDe which can be redeemed for an increasing amount of USDe over time. (when streaming USDe rewards, the amount increases every block)

Links

ARM Configuration

  • Base asset: sUSDe
  • Liquidity Asset: USDe
  • Claim delay: 10 minutes like Lido ARM, 1 day or 7 days?
  • Min Shares to Redeem: 1e7
  • Allocate Threshold: 1 ether (1e18)
  • Operator: ARM Relayer 0x39878253374355DBcc15C86458F084fb6f2d6DE7
  • Fee: 20%
  • CapManager used to limit the treasury wallet 0x6E3fddab68Bf1EBaf9daCF9F7907c7Bc0951D1dc
  • Cross price: TODO
  • Lending Market: TODO

@naddison36 naddison36 marked this pull request as draft November 12, 2025 05:47
@naddison36 naddison36 changed the title Ethena sUSDe <> USDe ARM WIP Ethena sUSDe <> USDe ARM Nov 12, 2025
naddison36 and others added 7 commits November 12, 2025 16:48
* 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
* 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
require(unstaker != address(0), "EthenaARM: Invalid unstaker");

// Ensure unstaker isn't used during last 7 days
uint256 amount = EthenaUnstaker(unstaker).cooldownAmount();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can call cooldowns on sUSDe directly rather than going via the helper

/// @notice Claim all the USDe that is now claimable from the Staked USDe contract.
/// Reverts with `InvalidCooldown` from the Staked USDe contract if the cooldown period has not yet passed.
function claimBaseWithdrawals(address unstaker) external {
uint256 cooldownAmount = EthenaUnstaker(unstaker).cooldownAmount();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can call cooldowns on sUSDe directly rather than going via the helper

susde.unstake(arm);
}

function cooldownAmount() external view returns (uint256) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can drop this function. The ARM can get the cooldown amount for the unstaker directly

naddison36 and others added 2 commits November 14, 2025 16:05
* 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
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