project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Marina Royale

Lottery using Uniswap V4 hooks with built-in referrals. Mobile-optimized through Telegram with gas-free experience on Base.

Marina Royale

Created At

ETHGlobal Singapore

Winner of

Pyth Network - Most Innovative use of Pyth Entropy

Uniswap Foundation - Hooks, Hooks, and Hooks 2nd place

Project Description

We leverage Uniswap V4 hooks instead of traditional ERC4626 vaults allowing anyone with liquidity to spin up their lottery pools. Particularly, meme communities or large treasuries with utility tokens can now provide liquidity using their native tokens, unlocking highly positive expected value opportunities.

We've created a mobile-optimized experience using embedded wallets and paymaster logic to remove gas fees from users. We use the Dynamic Wallet to onboard users.

Key features include:

  • Risk-based allocation of LP pool for lottery
  • Multiple winning scenarios based on pool sizes
  • Uniswap V4 integration for curve-based liquidity with built-in referral system
  • Pyth Network for secure, decentralized entropy generation

Unlike lossless lotteries, our system offers distinct expected values for both players and liquidity providers:

Players have a chance at winning significant jackpots, with the trade-off of potential loss of principal. Liquidity providers earn from unsuccessful tickets and benefit from the built-in referral system, potentially earning more than in traditional yield-generating protocols.

Our referral system, built directly into the Uniswap V4 hooks, incentivizes community growth & potentially creates token utility: When a referred user participates and doesn't win, 20% of their ticket value goes to the referrer. The remaining 80% is distributed among the liquidity providers. For example, if user A is referred and buys 10 tickets worth $10 USDC, and the jackpot expires without them winning, $2 goes to the referrer and $8 is shared among the LPs.

How it's Made

  • Smart Contracts: Two contracts (Lottery.sol and LotteryManager.sol) that implement the core lottery logic and management functions.
  • Uniswap V4 Hooks: In favour of hook-based liquidity instead of ERC4626 vaults, this allows for more efficient liquidity management, unique lottery mechanics, and a built-in referral system.
  • Pyth Network Integration: We use Pyth for generating secure, decentralized entropy, ensuring fair and unpredictable lottery outcomes.
  • Embedded Wallets: Implemented using Dynamic wallet, this feature simplifies user onboarding and interaction with the lottery.
  • Paymaster Logic: We've abstracted gas fees away from users through ZeroDev.
background image mobile

Join the mailing list

Get the latest news and updates