Search projects, hackathons, sponsors and tech

    ← All projects

    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

    About

    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.