Company: HodlTree
Role: Senior Solidity Developer
Stack: Solidity 0.8.0 · Truffle · Balancer V2 · OpenZeppelin Contracts · Web3.js
Period: 09/2020 - 05/2021
Sophisticated Ethereum DeFi protocol implementing elastic and volatile liquidity pools with automated loss/profit compensation mechanisms. The system integrates with Balancer Protocol to enable dynamic yield strategies with configurable risk parameters and deterministic contract deployment. Two primary trading pairs deployed: sUSD/sETH (75/25 ratio) and USDC/BAL (50/50 ratio), each with independent liquidity management and collateral tracking.
keccak256(rlp([deployer, nonce]))) before any contract exists| Decision | Rationale |
|---|---|
| Balancer V2 over Uniswap | Multi-asset pool support enables more flexible collateral ratios (75/25, 50/50) without AMM constant product constraints |
| Deterministic deployment via CREATE (Factory) | Sequential deployment is structurally impossible due to circular constructor-argument dependencies; Factory pre-computes all addresses before any contract is live |
| Three-tier fee architecture | Aligns incentives between platform, workers, and users; loss compensation funded from performance profits |
| Time-based withdrawal holds | Prevents flash loan attacks and encourages long-term capital commitment |
| Period-based accounting (VPStorage) | Enables fair distribution of BAL rewards and platform fees across different entry times without per-user iteration |
EPT is a loss-compensation voucher, not an LP token. Elastic Pool positions are tracked internally per-user - no ERC20 tokens are minted on deposit. EPT tokens are minted only on withdrawal at a loss, functioning as a typed claim against the reserve. Users redeem them at ReservePool 1:1 for the underlying by burning. This cleanly separates LP accounting from the insurance claim layer.
Volatile Pool depositors are the protocol’s implicit risk underwriters. Their USDC flows directly to ReservePool, funding EPT redemptions. The 1.5× VPT mint coefficient makes the asymmetry explicit: Volatile Pool depositors receive amplified exposure to BAL rewards in exchange for bearing the counterparty risk of ElasticPool’s downside protection.
See HodlTree page for additional context.