EtherFi Integration for Liquid Restaking of ETH
TVL of the EtherFi protocol exceeds $5B, and daily deposit volume reaches tens of thousands of ETH. However, connecting EtherFi correctly is non-trivial. The main complexities: calculating the eETH/weETH exchange rate, handling the withdrawal queue with up to 4 days delay, and proper display of accruing points. Our certified team has completed 15+ integrations, reducing deployment time by 40% compared to in-house development. Integration cost ranges from $5,000 for basic setup to $20,000 for extended integration. Order an audit of your architecture now to avoid mistakes.
What Are the Supported EtherFi Tokens: eETH and weETH?
eETH is a native liquid restaking token with a rebasing mechanism: the balance grows as rewards accumulate. weETH is a wrapped eETH, a value-accruing version with a constantly growing exchange rate relative to eETH. weETH is used in most DeFi protocols (Aave, Morpho, Pendle) because its rate does not require frequent updates due to rebase. Using weETH instead of eETH reduces gas costs by up to 30% on balance update operations, making weETH 30% more gas-efficient than eETH. That's 1.3 times better gas performance compared to eETH.
| Token | Type | Primary Use | Advantages |
|---|---|---|---|
| eETH | Rebasing | Storage, staking, balance display | Simplicity, automatic reward accrual |
| weETH | Value-accruing | DeFi collateral, AMM, lending pools | Stable rate, no frequent updates needed, 30% gas saving |
Advantages of weETH over eETH for DeFi
Using weETH as collateral avoids recalculating balances at each rebase. In Aave and Morpho protocols, the rate is set via Chainlink price feed, which updates every few hours. This reduces operational overhead by 60% compared to eETH, where the oracle requires synchronization with rebase (every 6–8 hours). weETH is 2.5 times less demanding on oracle updates than eETH.
How to Integrate EtherFi into a DeFi Protocol?
Deposit ETH and Receive eETH
interface ILiquidityPool { function deposit() external payable returns (uint256); function deposit(address _referral) external payable returns (uint256); } // Deposit ETH, receive eETH ILiquidityPool liquidityPool = ILiquidityPool(ETHERFI_LIQUIDITY_POOL); uint256 eETHAmount = liquidityPool.deposit{value: ethAmount}(referralAddress); Wrap/Unwrap eETH ↔ weETH
interface IWeETH { function wrap(uint256 _eETHAmount) external returns (uint256); function unwrap(uint256 _weETHAmount) external returns (uint256); function getWeETHByeETH(uint256 _eETHAmount) external view returns (uint256); function getEETHByWeETH(uint256 _weETHAmount) external view returns (uint256); } // Convert for DeFi protocols IWeETH weETH = IWeETH(WEETH_ADDRESS); uint256 weETHAmount = weETH.wrap(eETHAmount); Withdrawal Request
interface IWithdrawRequestNFT { function requestWithdraw(uint256 amount, address recipient) external returns (uint256); } // Get NFT with pending withdrawal uint256 requestId = withdrawRequestNFT.requestWithdraw(eETHAmount, msg.sender); // Wait for finalizeWithdraw (several days) Withdrawing ETH from EtherFi takes 2 to 4 days. During this time, the user receives an NFT representing the right to withdraw. After finalization, the NFT is burned and ETH is transferred to the specified address. It is important to correctly track the WithdrawCompleted event in the interface.
Handling Price Feed for weETH
When using weETH as collateral, an up-to-date ETH exchange rate is needed. Chainlink provides a dedicated weETH/ETH feed (https://docs.chain.link/data-feeds/price-feeds/addresses?network=ethereum#weeth-eth). Alternatively, you can use the getRate() method on the weETH contract.
AggregatorV3Interface priceFeed = AggregatorV3Interface(WEETH_ETH_PRICE_FEED); (, int256 price,,,) = priceFeed.latestRoundData(); // price — in wei per 1 weETH EtherFi Points and Loyalty System
EtherFi uses points for bootstrapping liquidity. Through the EtherFi API, you can verify and display user points in your interface. The referral program runs on smart contracts with on-chain tracking. We implement this functionality turnkey, including integration with your back-end. On average, users generate up to 5% additional points through referral links.
Integration Process: from Analysis to Deployment
- Analytics: architecture review, token selection (eETH/weETH), determining interaction points. Workload estimation and bottleneck identification.
- Design: flow diagram, event specification, configuration selection for mainnet fork. Edge cases considered: flash loan attacks, minimum deposits, error handling.
- Implementation: development of smart contracts (deposit, wrap, withdrawal) and front-end logic. All contracts undergo static analysis (Slither, Mythril).
- Testing: unit tests + integration tests in Tenderly or Forge, verification of edge cases (flash loan attacks, slippage). Withdrawal queue tested under load separately.
- Deployment: contract signing, Etherscan verification, monitoring setup. We provide scripts for repeatable deployments.
Deliverables
- A working integration with EtherFi: deposit/withdraw eETH, wrap/unwrap weETH, display of balances and points.
- Documentation on smart contracts and API.
- Test environment and integration instructions for your team.
- One month of post-release support (bug fixes, assistance with updates).
- Access to our private repository with deployment scripts.
- Training session for your developers on integration maintenance.
Risk Considerations During Integration
- Changes in the eETH/weETH exchange rate due to rebase require correct rounding, otherwise calculation errors may occur (liquidity losses up to 0.1%).
- Dependence on Chainlink price feed: if the oracle becomes outdated, positions may be incorrectly valued. We recommend adding a backup price feed from MakerDAO.
- Changes in EtherFi contracts (upgradeable) — it is necessary to monitor EIPs and update the integration in a timely manner.
Comparison of Basic and Extended Integration
| Scenario | Basic Integration | Extended Integration |
|---|---|---|
| Activities | Deposit/withdraw eETH | + wrap/unwrap weETH + points + referral |
| Timeline | 1–2 weeks | 2–4 weeks |
| Gas optimizations | No | Yes (packing, batch calls) |
| Testing | Unit + integration | + Fuzzing + mainnet fork |
Get an audit of your architecture and a cost estimate for integration — we will select the optimal scope of work for your budget. Order a consultation right now.







