StarFish 馃専

The ETF Hook for Uniswap V4 enables automated ETF trading and rebalancing using decentralized oracles , with randomization for unbiased pricing. It simplifies liquidity management and brings efficient ETF trading to DeFi.

ETHGlobal BangkokShipped November 15, 2024Prize winner#defi#payments#infra#uniswap
Repo
StarFish 馃専 banner

About

This Uniswap V4 Hook introduces a novel mechanism for trading ETFs (Exchange-Traded Funds) and other ERC-20 tokens, such as WBTC-WETH ETF and USDC. Leveraging Uniswap V4鈥檚 advanced hooks, this project provides a seamless way to rebalance ETF components dynamically based on their worth, ensuring accurate price alignment and efficient portfolio management.

Challenges in Current ETF Trading:

Manual Rebalancing: Traditional ETFs require manual or periodic rebalancing, often leading to inefficiencies and price discrepancies. Limited DeFi Integration: Current decentralized exchanges do not inherently support ETF-like instruments or dynamic rebalancing. Data Source Reliance: Over-reliance on a single price oracle can result in biased or outdated price feeds.

How the ETF Hook Solves These Problems:

Automated Rebalancing: By integrating a custom Uniswap V4 hook, the ETF Hook dynamically rebalances ETF components based on their real-time worth, fetched from decentralized oracles. Randomized Oracle Selection: The integration of the Pyth Network ensures fairness and decentralization in price fetching by generating a random number to select from multiple oracles like Chainlink and Chronicle. Seamless Trading Experience: Traders can interact directly with the ETF via Uniswap V4 pools without worrying about the underlying complexities of rebalancing.

How It Works

  • Price Fetching and Randomization:

The hook interacts with Chronicle, Chainlink, and other decentralized oracles to fetch the current prices of ETF components. A random number is generated via the Pyth Network, which determines the oracle to use, ensuring a fair distribution of price-fetching responsibilities.

  • Rebalancing Logic:

The hook calculates the composition worth of the ETF components based on their prices and the token's pool size. If discrepancies arise (e.g., one component significantly outweighs another), the hook dynamically rebalances the ETF to maintain the desired proportions.

  • Trading Mechanism:

The hook ensures that trades execute with updated ETF compositions. Traders can swap ETFs and other ERC-20 tokens like USDC, with liquidity dynamically adjusted in real-time based on rebalancing.

Why It鈥檚 Needed

1. Enhanced ETF Trading in DeFi:

Traditional ETFs face inefficiencies when integrated into DeFi, such as manual rebalancing and difficulty accessing real-time prices. The ETF Hook simplifies this process, offering a decentralized and automated solution.

2. Dynamic Price Accuracy:

By leveraging multiple oracles and incorporating randomness, the ETF Hook ensures price feeds remain unbiased, accurate, and robust.

3. Improved User Experience:

Users can trade ETFs as seamlessly as they would with any other ERC-20 token while benefiting from automated portfolio rebalancing, which was previously unavailable on decentralized exchanges.

How it's made

Technologies Used:

Uniswap V4 Hooks Framework: The foundation of the project, allowing custom extensions like dynamic rebalancing and liquidity mapping. Solidity: To implement smart contract logic for the ETF hook, rebalancing mechanism, and oracle integration. Chronicle, Chainlink, and Pyth Network: Chronicle and Chainlink provide price data for ETF components. Pyth Network introduces randomness to determine which oracle to use, ensuring decentralization and fairness. Frontend: A user-friendly interface to showcase ETF trading and rebalancing in action.

Core Logic:

Liquidity Mapping: The hook maps liquidity positions of ETF components to Uniswap V4 pools. Oracle Interaction: Smart contracts fetch, compare, and adjust ETF worth dynamically. Trade Execution: Trades trigger the rebalancing mechanism when necessary, ensuring accurate ETF composition post-trade.

Key Features

Dynamic Rebalancing: Ensures ETF components stay proportionate to their market value, creating a more efficient trading instrument. Randomized Oracle Selection: Reduces the risk of oracle manipulation and improves decentralization. Seamless Integration: Works natively with Uniswap V4 pools, avoiding the need for additional platforms or middlemen. Future Expandability: The hook can be adapted to accommodate more complex ETFs or additional tokens.

Prizes

  • Blockscout 路 Blockscout Explorer Big Pool Prize 路 Blockscout Explorer Big Pool Prize
  • Chronicle Protocol 路 Best Integration of Chronicle Oracles 路 1st place
  • Uniswap Foundation 路 Hooks, Hooks, and Hooks 路 4th place

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Custom Curves

CustomHooks is a customizable hook-based solution for Uniswap v4, enabling trading on custom invariant curves while leveraging Uniswap's efficient pool and routing infrastructure

Coupled Markets

DeFi Innovation: Coupling of Uniswap V4 Hook with AI Agent. Allows for improving the returns for the liquidity providers while maintaining market rate swap rates for all attached liquidity pools. Unique to our design: Minimal gas cost for swappers despite rich hook functionality

Amino Hooks

Agent-aware Uniswap v4 hooks with bonded ERC-8004 identity, ZK compliance, and risk-adjusted fees.