Skip to content

swanandi-bhende/RWAComply_Hook

Repository files navigation

RWAComplyHook (Uniswap v4)

RWAComplyHook is a Uniswap v4 hook for specialized, compliance-aware markets. It enforces tier-based access, retail caps, volatility-aware dynamic fees, and admin safeguards during swap flow.

Demo

Core Features

  • Tier-based compliance access:
    • Tier 0: blocked
    • Tier 1: retail (capped)
    • Tier 2: institutional
  • Dynamic fees based on oracle volatility and user tier
  • Admin controls:
    • pause and unpause
    • set retail cap
    • set volatility threshold
    • update oracle address
  • PoolManager integration tests on the real hook call path

Repository Layout

  • src/RWAComplyHook.sol - main hook logic
  • src/MockRWAOracle.sol - volatility oracle
  • src/PoolExecutor.sol - swap execution helper
  • src/MockERC20.sol - demo tokens
  • test/RWAComply.t.sol - hook unit tests
  • test/RWAComplyIntegration.t.sol - PoolManager integration tests
  • script/DeployFull.s.sol - canonical local deployment flow
  • script/run_canonical_demo.sh - one-command demo run
  • frontend/ - interactive UI and presentation page
  • docs/demo_run_log.txt - reproducible local run output

Quick Start (Local)

  1. Start local chain:
anvil
  1. Deploy and run canonical flow:
bash script/run_canonical_demo.sh
  1. Start frontend:
cd frontend
npm install
npm run dev
  1. Open:

http://localhost:3000

Run Tests

forge test

License

MIT

About

Submission for Uniswap Hook Incubator 8 Hookathon 2026.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors