project screenshot 1
project screenshot 2
project screenshot 3

All my 🦄 read on L1

our project leverages the L1SLOAD precompile of the Scroll L2 in uniswap v4 hooks, to enable new possibilities on L2

All my 🦄 read on L1

Created At

ETHGlobal Brussels

Winner of

Scroll - Best Build Reading L1 State with L1SLOAD

Uniswap Foundation - Hooks, Hooks, and Hooks 3rd place

Project Description

Our project leverages the L1SLOAD precompile of the Scroll L2 in a Uniswap v4 hook to enable new possibilities in the way Scroll users interact with AMMs. The idea is to relate on L1 data while interacting with the AMM, for example to use uniswap v3 pairs as oracle both for swappers and for LPs to protect themselves.

How it's Made

  1. Scroll L1Sload devnet

    • L1SLOAD Opcode: This precompile allows Scroll contracts to read state storage slots on L1.
  2. Uniswap v4 Hook Integration:

    • AfterSwap Hook: We integrated a Uniswap v4 hook that uses the L1SLOAD opcode. This hook is designed to detect price variation between scroll network and ethereum mainnet. If the price difference is greater than a defined slippage the hook will automatically revert the swap on Scroll, preventing potential exploitations and ensuring the security of the transactions.
  3. Stack:

    • Smart Contracts: Written in Solidity
    • Deploy uniswap on scroll
    • Uniswap v4 Hooks: to include the flashloan detection mechanism.
background image mobile

Join the mailing list

Get the latest news and updates