PulseFi

Agent-driven capital optimization with Uniswap v4 hook-gated settlement

PulseFi

Created At

HackMoney 2026

Project Description

PulseFi introduces session-based agentic trading on Base Sepolia. Users lock capital once into a non-custodial SessionEscrow contract, while an off-chain solver continuously evaluates routing opportunities across Uniswap v4 and LiFi. Execution is gated by a custom Uniswap v4 Hook (SessionGuardHook), which enforces just-in-time funding and session balance validation before swaps occur.

Instead of executing every trade onchain, PulseFi separates decision-making from settlement. The solver performs market scanning and route simulation off-chain, minimizing unnecessary gas costs and reducing information leakage. When a profitable opportunity is detected, the system performs an atomic execution: escrow spend → Uniswap v4 swap → capital settlement, all in a single, verifiable transaction.

Yellow is used to structure session-based execution flows and vault logic, ensuring scoped authorization and executor-restricted actions. LiFi enables cross-route discovery and liquidity aggregation, while Uniswap v4 provides programmable liquidity via hooks for secure capital enforcement.

The result is a composable, transparent, and hook-enforced agentic execution model that prioritizes security, capital efficiency, and clean separation between intelligence and settlement.

How it's Made

PulseFi is built with Solidity (0.8.26) and integrates directly with Uniswap v4 core and periphery contracts. We implemented:

• SessionEscrow.sol: a session-based capital vault that locks USDC and authorizes a trusted executor • SessionGuardHook.sol: a custom Uniswap v4 Hook that enforces session balance checks in beforeSwap() • Atomic execution flow: escrow.spend() → PoolManager.swap() → settle()

The hook validates executor identity, decodes hookData (sessionId, maxAmountIn), verifies session balance from the escrow contract, and atomically funds the swap through PoolManager before execution. This ensures just-in-time liquidity without exposing full session capital.

The backend (Node.js + TypeScript) runs an off-chain solver loop that integrates: • Uniswap SDK for v4 pool interaction • LiFi SDK for route comparison and liquidity aggregation • Price and slippage heuristics

The frontend (React + Vite + Ethers.js) manages wallet connection, session provisioning, and atomic execution UI. All onchain interactions are verifiable on Base Sepolia, and the system is designed to meet Uniswap v4 Agentic Finance track requirements by emphasizing reliability, composability, and transparent execution boundaries over speculative AI.

background image mobile

Join the mailing list

Get the latest news and updates