<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-i-won-the-uniswap-foundation-prize-track-at-uhi9-by-turning-impermanent-loss-into-yield-vn9qm6g7y" -->

---
title: How I Won the Uniswap Foundation Prize Track at UHI9 by...
description: A DeFi engineer details how they built CrossHedge, a Uniswap v4 hook that won the Uniswap Foundation prize at UHI9 by converting LP impermanent loss (LVR) into...
canonical: https://daily.dev/posts/how-i-won-the-uniswap-foundation-prize-track-at-uhi9-by-turning-impermanent-loss-into-yield-vn9qm6g7y
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How I Won the Uniswap Foundation Prize Track at UHI9 by Turning Impermanent Loss Into Yield | daily.dev
og:description: A DeFi engineer details how they built CrossHedge, a Uniswap v4 hook that won the Uniswap Foundation prize at UHI9 by converting LP impermanent loss (LVR) into...
og:url: https://daily.dev/posts/how-i-won-the-uniswap-foundation-prize-track-at-uhi9-by-turning-impermanent-loss-into-yield-vn9qm6g7y
og:image: https://api.daily.dev/og/posts/vN9qM6G7y.png
og:image:alt: How I Won the Uniswap Foundation Prize Track at UHI9 by Turning Impermanent Loss Into Yield
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How I Won the Uniswap Foundation Prize Track at UHI9 by Turning Impermanent Loss Into Yield

**[Coins Bench](https://daily.dev/sources/coinsbench)** · 20 min read · 3 upvotes · 0 comments

## Summary

A DeFi engineer details how they built CrossHedge, a Uniswap v4 hook that won the Uniswap Foundation prize at UHI9 by converting LP impermanent loss (LVR) into a yield product. The mechanism matches opposing LP delta exposures across chains (Unichain Sepolia and Base Sepolia) peer-to-peer, using Reactive Network as a trustless cross-chain matching engine. Key technical highlights include: computing signed delta using Reiner-Rubinstein barrier-touch math for above-range positions, charging a 30bps entry premium via v4's flash-accounting with a critical take() call that only surfaces against the real PoolManager, an ERC-4626 vault as counterparty of last resort, a built-in watchdog that halts premium charging if the matching engine goes offline, and deterministic cross-chain addressing without bridges. The system was validated with 423 tests including 7 fork tests against live testnets, achieving ~96% line coverage.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://coinsbench.com/how-i-won-the-uniswap-foundation-prize-track-at-uhi9-by-turning-impermanent-loss-into-yield-9bca2f5999c1>

## Questions this post answers

### How do you charge a premium from within a Uniswap v4 afterAddLiquidity hook without the transaction reverting?

You must explicitly call poolManager.take() on the currency the moment you assert a positive hookDelta, because v4 credits a positive delta to the hook's own account as an amount owed that must be settled during the unlock cycle. Skipping this works fine against mock PoolManagers but reverts with CurrencyNotSettled against the real v4 PoolManager, since mocks don't track hook-side deltas.

_Anyone shipping a Uniswap v4 hook can find implementation gotchas like this discussed on daily.dev._

### How can two liquidity providers on different chains hedge each other's impermanent loss without a centralized matcher or bridge?

An in-range LP position carries positive (long) delta while an above-range LP position carries synthetic short delta, so pairing an in-range position on one chain with an above-range position on another offsets both exposures. Reactive Network's cross-chain smart contracts (RSCs) ingest LP position events from both chains, run greedy pairwise matching with gates on sign, horizon, and gamma, then deliver settlement callbacks to each chain's registry, all without a bridge or off-chain keeper.

_Developers designing cross-chain LP hedging mechanisms can track this kind of architecture on daily.dev._

### What is the Reiner-Rubinstein barrier-touch formula used for in pricing above-range Uniswap LP positions?

It sizes the synthetic short delta of an above-range liquidity position by computing the probability that price touches the range boundary over the position's horizon, giving signedDelta = -2 * Phi(d) * maxEth, where Phi is the standard normal CDF. This probability-weighted exposure lets an above-range LP position be matched against a plain long position as if it were a genuine short.

_Engineers modeling LP delta exposure for hedging systems can dig into formulas like this via daily.dev._

## Similar posts on daily.dev

- [Exposing a Critical Uniswap V4 Hook Flaw: Cross-Pool Invariant Manipulation](https://daily.dev/posts/exposing-a-critical-uniswap-v4-hook-flaw-cross-pool-invariant-manipulation-5je9fqgjg) · Coins Bench · 0 upvotes · 0 comments
- [Building secure Uniswap v4 hooks](https://daily.dev/posts/building-secure-uniswap-v4-hooks-o14twkde6) · Trail of Bits Blog · 0 upvotes · 0 comments
- [Uniswap V2 For Dummies\!](https://daily.dev/posts/uniswap-v2-for-dummies--dwqitapfi) · Coins Bench · 0 upvotes · 0 comments
- [The $9M yETH Exploit: How 16 Wei Became Infinite Tokens](https://daily.dev/posts/the-9m-yeth-exploit-how-16-wei-became-infinite-tokens-onm4biw7x) · Check Point Research · 3 upvotes · 0 comments
- [I Deployed a Flash Loan Arbitrage Bot on Polygon Mainnet — Here’s Everything I Learned](https://daily.dev/posts/i-deployed-a-flash-loan-arbitrage-bot-on-polygon-mainnet-here-s-everything-i-learned-ar9b8lcjo) · Coins Bench · 0 upvotes · 0 comments

---

Tags: [#smart-contracts](https://daily.dev/tags/smart-contracts), [#solidity](https://daily.dev/tags/solidity), [#defi](https://daily.dev/tags/defi)

[View this post on daily.dev](https://daily.dev/posts/how-i-won-the-uniswap-foundation-prize-track-at-uhi9-by-turning-impermanent-loss-into-yield-vn9qm6g7y)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How I Won the Uniswap Foundation Prize Track at UHI9 by Turning Impermanent Loss Into Yield","url":"https://daily.dev/posts/how-i-won-the-uniswap-foundation-prize-track-at-uhi9-by-turning-impermanent-loss-into-yield-vn9qm6g7y","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-i-won-the-uniswap-foundation-prize-track-at-uhi9-by-turning-impermanent-loss-into-yield-vn9qm6g7y"},"datePublished":"2026-07-20T15:42:33.157Z","dateModified":"2026-09-14T08:02:44.007Z","description":"A DeFi engineer details how they built CrossHedge, a Uniswap v4 hook that won the Uniswap Foundation prize at UHI9 by converting LP impermanent loss (LVR) into...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Coins Bench","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Coins Bench","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ba340d3c8caa4c2586911332928e24d9","url":"https://daily.dev/sources/coinsbench"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-i-won-the-uniswap-foundation-prize-track-at-uhi9-by-turning-impermanent-loss-into-yield-vn9qm6g7y","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"smart-contracts,solidity,defi","timeRequired":"PT20M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Coins Bench","item":"https://daily.dev/sources/coinsbench"},{"@type":"ListItem","position":3,"name":"How I Won the Uniswap Foundation Prize Track at UHI9 by Turning Impermanent Loss Into Yield"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-i-won-the-uniswap-foundation-prize-track-at-uhi9-by-turning-impermanent-loss-into-yield-vn9qm6g7y#faq","mainEntity":[{"@type":"Question","name":"How do you charge a premium from within a Uniswap v4 afterAddLiquidity hook without the transaction reverting?","acceptedAnswer":{"@type":"Answer","text":"You must explicitly call poolManager.take() on the currency the moment you assert a positive hookDelta, because v4 credits a positive delta to the hook's own account as an amount owed that must be settled during the unlock cycle. Skipping this works fine against mock PoolManagers but reverts with CurrencyNotSettled against the real v4 PoolManager, since mocks don't track hook-side deltas. Anyone shipping a Uniswap v4 hook can find implementation gotchas like this discussed on daily.dev."}},{"@type":"Question","name":"How can two liquidity providers on different chains hedge each other's impermanent loss without a centralized matcher or bridge?","acceptedAnswer":{"@type":"Answer","text":"An in-range LP position carries positive (long) delta while an above-range LP position carries synthetic short delta, so pairing an in-range position on one chain with an above-range position on another offsets both exposures. Reactive Network's cross-chain smart contracts (RSCs) ingest LP position events from both chains, run greedy pairwise matching with gates on sign, horizon, and gamma, then deliver settlement callbacks to each chain's registry, all without a bridge or off-chain keeper. Developers designing cross-chain LP hedging mechanisms can track this kind of architecture on daily.dev."}},{"@type":"Question","name":"What is the Reiner-Rubinstein barrier-touch formula used for in pricing above-range Uniswap LP positions?","acceptedAnswer":{"@type":"Answer","text":"It sizes the synthetic short delta of an above-range liquidity position by computing the probability that price touches the range boundary over the position's horizon, giving signedDelta = -2 * Phi(d) * maxEth, where Phi is the standard normal CDF. This probability-weighted exposure lets an above-range LP position be matched against a plain long position as if it were a genuine short. Engineers modeling LP delta exposure for hedging systems can dig into formulas like this via daily.dev."}}]}
```

