@@ -19,27 +19,22 @@ contract EthenaStrategyFacet {
1919 error EthenaCoinNotInPool (address tokenIn , address tokenOut );
2020 error EthenaZeroAddress ();
2121
22-
2322 /*====events====*/
2423
25- event EthenaSetConfig ( address indexed usde , address indexed curvePool , address indexed stakedUSDEV2 );
24+ event EthenaSetConfig (address indexed usde , address indexed curvePool , address indexed stakedUSDEV2 );
2625
2726 // erc7201:vaultrouter.strategy.ethena
28- bytes32 internal constant ETHENA_STORAGE_SLOT =
29- //0x79d5a97e8f8d9829cf9573ba239138882c2da3a5eaaa986a771c2ca1596b9500;
30-
27+ bytes32 internal constant ETHENA_STORAGE_SLOT = 0x0000000000000000000000000000000000000000000000000000000000000000 ;
28+
3129 struct EthenaStorage {
3230 IERC20 usde;
3331 ICurvePool curvePool;
3432 IStakedUSDEV2 stakedUSDEV2;
3533 uint256 maxSlippageBps;
3634 uint256 cooldownDuration;
37-
38- /*====only for offchain explicit routing ====*/
39-
35+ /*====only for offchain explicit routing ====*/
4036 //mapping (address => bool) allowedRouter;
4137 //mapping (address => bool) allowedSpender;
42-
4338 }
4439
4540 function _es () internal pure returns (EthenaStorage storage s ) {
@@ -58,10 +53,7 @@ contract EthenaStrategyFacet {
5853 external
5954 {
6055 LibDiamond.enforceIsContractOwner ();
61- if (
62- address (usde) == address (0 ) || address (curvePool) == address (0 )
63- || address (stakedUSDEV2) == address (0 )
64- ) {
56+ if (address (usde) == address (0 ) || address (curvePool) == address (0 ) || address (stakedUSDEV2) == address (0 )) {
6557 revert EthenaUSDENotConfigured ();
6658 }
6759 EthenaStorage storage s = _es ();
@@ -80,8 +72,7 @@ contract EthenaStrategyFacet {
8072 function ethenaDeposit (uint256 amount ) external {
8173 EthenaStorage storage s = _es ();
8274 if (
83- address (s.usde) == address (0 ) || address (s.curvePool) == address (0 )
84- || address (s.stakedUSDEV2) == address (0 )
75+ address (s.usde) == address (0 ) || address (s.curvePool) == address (0 ) || address (s.stakedUSDEV2) == address (0 )
8576 ) {
8677 revert EthenaUSDENotConfigured ();
8778 }
@@ -110,18 +101,15 @@ contract EthenaStrategyFacet {
110101 return s.stakedUSDEV2.convertToAssets (shares) / 1e12 ; // USDe(18) -> USDC(6)
111102 }
112103
113- function ethenaWithdraw () external {
114-
104+ function ethenaWithdraw () external {
105+
115106 //withdraw is gated on the core protocol side
116107 //going asynchronous has lots of variables included and is practically complex
117108
118- }
109+ }
119110
120111 /*=== cooldown ===*/
121112
122-
123-
124-
125113 /*==== internal swap helper — Curve only, par-floor enforced by caller ====*/
126114
127115 /// @dev Executes tokenIn -> tokenOut on the configured Curve StableSwap pool.
@@ -184,6 +172,4 @@ contract EthenaStrategyFacet {
184172 }
185173 if (! foundIn || ! foundOut) revert EthenaCoinNotInPool (tokenIn, tokenOut);
186174 }
187-
188-
189- }
175+ }
0 commit comments