// FLOW DYNAMICS
FLUX
Where money moves when it moves. Order flow, liquidity migration, capital velocity. This is a Navier-Stokes fluid simulation running on your GPU. Drag to inject energy. Watch it propagate.
LIQUIDITY IS A FLUID
Capital doesn't teleport. It flows. Through order books, across bridges, between pools. It has viscosity — slippage. It has turbulence — volatility. It has pressure gradients — yield differentials that pull money from one protocol to the next.
The simulation above solves the Navier-Stokes equations in real-time: advection moves dye along velocity fields, pressure projection enforces incompressibility, vorticity confinement prevents numerical damping from killing the small-scale curls. The same math describes smoke, water, and the movement of $200B in DeFi TVL.
When you drag your mouse, you inject a splat — a localized burst of velocity and color. In market terms, that's a whale entering a position. The fluid responds: existing flows deflect, vortices form at the boundary, pressure waves radiate outward. One large trade distorts the entire field.
The color dissipation models capital decay. Yield farming rewards dilute. Liquidity incentives expire. The bright splat you injected fades as the velocity field carries it downstream and diffusion spreads it thin. Nothing stays concentrated without continuous energy input.
// SIMULATION PIPELINE
ADVECTION
Move quantities along the velocity field. Semi-Lagrangian: trace each texel backward through the flow, sample where it came from. Stable at any timestep. The core transport mechanism.
CURL + VORTICITY
Compute the curl of the velocity field. Apply vorticity confinement force to counteract numerical dissipation. Without this, the simulation goes laminar in seconds — all structure dies.
PRESSURE SOLVE
Compute divergence, then Jacobi-iterate the pressure field. 20 iterations per frame. Subtract the pressure gradient from velocity to enforce incompressibility — mass in equals mass out.
SPLAT + DISPLAY
User input injects velocity and dye via Gaussian splats. The display shader reads the dye texture and renders it. The whole pipeline runs at 60fps on a phone GPU.
READING THE FLOW
Order flow analysis is the trader's version of fluid dynamics. Toxic flow is high-velocity, directional — informed traders who know something the market maker doesn't. Non-toxic flow is diffuse, random — retail noise that market makers profit from via the spread.
Liquidity migration follows pressure gradients. When Aave raises rates, capital flows from Compound. When a new L2 launches with incentives, TVL migrates from mainnet. The fluid simulation makes the invisible visible: capital has inertia, momentum, and turbulence.