It is a gamified, yield-generating financial position represented as a tradeable NFT.
ETHLocker is a decentralized application that helps crypto holders commit to their investment strategies while earning passive income. The core concept is simple but powerful: you lock your ERC20 tokens for a specific time period and set a target price you believe the asset will reach. While your tokens are locked, they're automatically deposited into Aave V3, one of the largest DeFi lending protocols, where they earn yield continuously. This means you're not just locking tokens away uselessly, you're actually getting paid to stick to your investment thesis. Every lock you create is represented by a unique NFT with metadata and images stored on Lighthouse, a decentralized storage solution, making your locked position verifiable, transferable and composable with other DeFi protocols. The protocol integrates with Pyth Network for accurate, manipulation resistant price data, ensuring your target prices are evaluated fairly using real-time oracle feeds from institutional sources.
The real problem ETHLocker solves is the behavioral challenge every crypto investor faces. We've all experienced it: you set a clear plan to hold a token until it reaches a certain price, but when the market crashes 40%, panic sets in and you sell at the worst possible time. Or the opposite happens, your token moons and you hold too long, watching your gains evaporate because you couldn't bring yourself to take profits. Traditional time locks are too rigid, they trap you completely regardless of market conditions. Just holding tokens in your wallet provides no protection against impulsive decisions. ETHLocker bridges this gap by combining time based commitment with price based flexibility powered by Pyth's decentralized oracles. You can't panic sell during downturns because the tokens are locked and earning yield on Aave, but if your asset reaches your target price according to Pyth's price feeds, you have the option to exit and realize your gains. It's a commitment device that respects both discipline and opportunity.
The user experience is designed to be intuitive and transparent. Connect your wallet, choose which ERC20 token to lock, specify the amount, set your unlock date and target price, and create your lock. The interface handles all the complexity behind the scenes, including token approvals and Aave deposits. You can view all your locks in a clean dashboard that shows their status, whether they're still locked, unlocked and ready to withdraw, or already withdrawn. Each lock is represented by a unique NFT with metadata stored on Lighthouse, giving you a permanent, decentralized record of your commitment. When you withdraw, you receive your original tokens plus all the yield earned from Aave's lending pools. The admin panel allows the protocol owner to add support for new tokens by configuring their Aave aToken addresses and Pyth price feed IDs. Everything is modular, secure, and built with modern Web3 standards. The smart contracts were developed and tested using Hardhat, ensuring robust deployment and comprehensive testing. The frontend uses React with TypeScript, organized into reusable components and custom hooks, making the codebase maintainable and scalable. ETHLocker turns behavioral finance theory into practical DeFi infrastructure, helping users overcome their own psychological biases while putting their capital to work earning yield through Aave.
ETHLocker is built with Solidity smart contracts using OpenZeppelin libraries for secure ERC20 and ERC721 implementations, developed and tested using Hardhat for a robust development workflow. The core contract integrates directly with Aave V3 lending pools, which was honestly the trickiest part. When users lock tokens, we immediately deposit them to Aave by calling their lending pool contract, handling all the approvals and aToken share calculations behind the scenes. We store the exact number of aToken shares received so when users withdraw, they get their original tokens plus all the interest accumulated from Aave's lending pools. The Pyth Network integration is central to our price validation system, where each supported token has its Pyth price feed ID stored in the contract, enabling access to high-frequency, institutional-grade price data from over 90 first-party sources. We mint an ERC721 NFT for each lock with metadata and images stored on Lighthouse decentralized storage, which makes the locked position permanently verifiable, transferable and composable with other protocols. The owner can withdraw by proving they hold the corresponding NFT, creating interesting possibilities for secondary markets or using locks as collateral.
The frontend is a React TypeScript application that we deliberately over-architected for maintainability. We broke everything into modular components like Header, CreateLockForm, LockCard, and AdminPanel, then extracted all business logic into custom hooks for wallet connection, token info, and lock fetching. All smart contract calls go through a centralized service layer that handles error parsing and presents user-friendly messages when transactions fail. One hacky optimization we did was dynamically loading ethers.js from a CDN instead of bundling it, keeping our initial load super fast. The interface handles the annoying two-step approval flow gracefully, showing an "Approve Token First" button that automatically switches to "Create Lock" once approval goes through. We also spent time on timestamp validation because mixing blockchain Unix timestamps with user-friendly datetime pickers in different timezones is surprisingly finicky. The Lighthouse integration for NFT metadata storage ensures that all lock information is permanently available and censorship-resistant, not dependent on any centralized server.
The most notable technical decision was setting up the infrastructure for full Pyth price checking while keeping it as a stored reference in this version to reduce gas costs. The entire system is architected to enable on-chain price validation through Pyth oracles with minimal changes, just adding the price comparison logic in the withdraw function. Testing the Aave integration required deploying to testnet early using Hardhat's deployment scripts since mocking complex DeFi protocols locally is a pain. We wrote comprehensive tests in Hardhat to ensure the Aave deposits, withdrawals, and share calculations worked correctly before touching mainnet. The modular architecture might seem like overkill for a hackathon, but it actually made development faster because we could iterate on components independently without breaking everything. The result is a protocol that feels simple to users but has legitimate DeFi integrations with Aave for yield and Pyth for price data working under the hood, with NFT metadata permanently stored on Lighthouse, not just mock contracts or placeholder logic.

