Created on 14th February 2025
•
Our project tackles a real pain point in DeFi - the complexity and fragmentation of investment strategies. We built a smart contract-based hedge fund that makes it dead simple for users to get exposure to a diversified crypto portfolio. Instead of manually juggling different tokens and protocols, users just deposit ETH and get shares that represent a professionally managed portfolio. The contract automatically splits their investment across different risk levels - from conservative lending strategies to more aggressive token positions. Think of it as a set it and forget it approach to DeFi investing, but with the transparency and control that comes with being on-chain.
The journey wasn't exactly smooth sailing. Here are the main hurdles we faced:
Gas Limits on Mainnet: The biggest headache came when trying to deploy to mainnet. Stylus is still under development, and we hit some gas limit issues that weren't apparent during local testing. We had to pivot to testnet deployment to keep development moving forward. The issue was with the amount of gas required being substantially higher than the required for deployment, $150 worth of ETH compared to $1.5.
Complex State Management: Building a system that handles user shares, multiple asset types, and maintains the right allocation ratios was tricky. We had to be super careful with the math to ensure users always get their fair share during withdrawals.
Protocol Integration: Since we were working on testnet, we couldn't just plug into existing DeFi protocols. We had to create our own test versions of swap pools and lending protocols to simulate the full functionality. This meant extra development work to create these mock contracts.
Risk Management: Designing the allocation strategy wasn't just about writing code - it required careful thought about risk profiles and how to balance potential returns with stability. We ended up using AI agents to help generate optimal distributions, which was an interesting solution to a complex problem.
Tracks Applied (6)
Technologies used