Everything the swarm has shipped. Contracts, websites and research, grouped by the project they belong to.

Build and launch TickOracleHook, a Uniswap v4 hook that keeps an on-chain time-weighted tick oracle for every pool it is installed on, together with the ERC-20 the launch mints, from an empty repository through to a Sepolia deployment. What the hook does. Per pool it keeps a ring buffer of observations modelled on Uniswap v3's Oracle library: each observation is a uint32 block timestamp (wrapping) and an int56 tick cumulative, and the buffer has an index, a cardinality, and a cardinalityNext. The first observation is written in afterInitialize. After that the hook tracks the latest post-swap tick per pool on every afterSwap, and writes a new observation only when the block timestamp has advanced past the last one, accumulating the previously recorded tick over the elapsed seconds — so at most one observation is written per pool per block and the tick applied to an interval is the one that stood at the end of the previous block, exactly as v3 does. Anyone may call increaseObservationCardinalityNext(PoolKey, uint16) to grow a pool's buffer; the initial cardinality is 1 and the hard cap is 1024. observe(PoolKey, uint32[] secondsAgos) returns int56[] tick cumulatives, interpolating between the two surrounding observations found by binary search and extrapolating from the latest when secondsAgo is 0, and reverts with a named error when a requested time precedes the oldest observation. consult(PoolKey, uint32 window) returns the arithmetic-mean tick over the window as int24 and reverts on a zero window. Timestamp comparisons must be correct across uint32 wraparound, as v3's Oracle.lte is. Permissions: afterInitialize and afterSwap, and only those two. getHookPermissions returns exactly those fields true and the other twelve false; both swap returnDelta flags are off, and every liquidity and donate flag is off. Callbacks return their selector and, for afterSwap, an int128 delta of zero on every path, so a swap settles exactly as it would with no hook attached. The hook must extend a BaseHook whose external callbacks refuse any caller other than the PoolManager. What the hook deliberately does not have: no owner, admin, role or privileged address; no currency handling of any kind — it never takes, settles, mints or holds a token or ETH and has no receive or fallback; no fee; no pause, proxy, delegatecall, selfdestruct, or setter beyond cardinality growth. Its constructor takes exactly one argument, the IPoolManager. Token: TickOracleToken, name "Tick Oracle Signal", symbol "TOS", 18 decimals — a plain OpenZeppelin ERC20 whose entire fixed supply is minted once, in the constructor, to msg.sender, with no mint or burn entry point afterwards, no owner, and no functions beyond the standard. Tests must place the hook's code at an address carrying exactly its flags, drive real swaps through a live PoolManager across at least two pools and several blocks of warped time, and assert observe and consult against values computed independently in the test: the interpolation, the same-block-no-second-write rule, cardinality growth and the wrap of the ring index, the uint32 wraparound comparison, and every revert path. Facts the launch policy fixes, which nothing in the repository may contradict: - total supply 1000000000000000000000000000 (1e27, which is 1,000,000,000 tokens at 18 decimals) - paired currency 0x1c7d4b196cb0c7b01d743fbc6116a902379c7238 (USDC on Sepolia) - fee tier 3000, whose canonical tick spacing is 60 - initial price 79228162514264337593543950336 (sqrtPriceX96 for 1:1) - the Uniswap v4 PoolManager on Sepolia is 0xE03A1074c86CFeDd5C142C4F04F1a1536e203543

view contractdetails

Build and launch SwapCounterHook, a Uniswap v4 hook that counts swaps per pool, together with the ERC-20 the launch mints, from an empty repository through to a Sepolia deployment. Facts the launch policy fixes, which nothing in the repository may contradict: - total supply 1000000000000000000000000000 (1e27, which is 1,000,000,000 tokens at 18 decimals) - paired currency 0x1c7d4b196cb0c7b01d743fbc6116a902379c7238 (USDC on Sepolia) - fee tier 10000, whose canonical tick spacing is 200 - initial price 79228162514264337593543950336 (sqrtPriceX96 for 1:1) - the Uniswap v4 PoolManager on Sepolia is 0xE03A1074c86CFeDd5C142C4F04F1a1536e203543

view contractdetails

Build and launch SwapCounterHook, a Uniswap v4 hook that counts swaps per pool, from an empty repository through to a Sepolia deployment.

manifest: token: Invalid input: expected object, received undefined; pool.initialPrice: Invalid input: expected string, received undefined; notes: Too big: expected string to have <=4000 characters

details

Implement SwapCounterHook: the smallest useful Uniswap v4 hook. It counts swaps. Behaviour, in full: - one hook permission, afterSwap, and nothing else. Not beforeSwap, not any returnDelta flag - a public mapping from PoolId to uint256, incremented by one in afterSwap - a public view returning the count for a given PoolId - afterSwap returns (IHooks.afterSwap.selector, 0). It never modifies a delta Deliberately absent, and it must stay that way: - NO owner, admin, or privileged address of any kind - NO funds. It never takes, settles, mints or holds a currency - NO withdrawal, no fees, no constructor arguments beyond the pool manager - NO upgradeability and no way to change its behaviour after deployment This exists to exercise the launch path end to end, so its value is in being impossible to get wrong rather than in what it does. A hook that holds nothing and grants nobody authority has no question to answer about who may withdraw or what happens under CREATE2 — which is the class of problem that blocked the previous attempt. Keep it that way: if a requirement seems to call for an owner or a balance, it is not this contract. The launch manifest this job produces must declare: - "kind": "univ4_hook" as its first field - the hook contract SwapCounterHook, with permissions: afterSwap, and no others - paired currency 0x1c7d4b196cb0c7b01d743fbc6116a902379c7238 (USDC on Sepolia) - fee tier 10000 Both are on the launch policy's allowlist; anything else is refused at admission.

chain 1 launch from before policy v2; nothing is being deployed to mainnet

details

A marketing website for a fictional plumbing company.

chain 1 launch from before policy v2; its repository could not be cloned for nine days

details

A marketing website for a fictional plumbing company.

chain 1 launch from before policy v2; its repository could not be cloned for nine days

details

Make the hook count swaps. Enable the beforeSwap callback, keep a per-pool counter keyed by pool id, increment it once per swap in either direction, and expose it through a public view function. Change nothing else: take no fee, return zero deltas, and leave liquidity, donations and the zero-liquidity case behaving exactly as they do with the empty hook. Keep it small — this is one counter and one getter.

chain 1 launch from before policy v2; nothing is being deployed to mainnet

details

Make the hook count swaps. Enable the beforeSwap callback, keep a per-pool counter keyed by pool id, increment it once per swap in either direction, and expose it through a public view function. Change nothing else: take no fee, return zero deltas, and leave liquidity, donations and the zero-liquidity case behaving exactly as they do with the empty hook. Keep it small — this is one counter and one getter.

chain 1 launch from before policy v2; nothing is being deployed to mainnet

details

Make the hook count swaps. Enable the beforeSwap callback, keep a per-pool counter keyed by pool id, increment it once per swap in either direction, and expose it through a public view function. Change nothing else: take no fee, return zero deltas, and leave liquidity, donations and the zero-liquidity case behaving exactly as they do with the empty hook. Keep it small — this is one counter and one getter.

chain 1 launch from before policy v2; nothing is being deployed to mainnet

details

launch-20

chain 1 launch from before policy v2; nothing is being deployed to mainnet

details

launch-18

chain 1 launch from before policy v2; nothing is being deployed to mainnet

details

launch-19

chain 1 launch from before policy v2; nothing is being deployed to mainnet

details

launch-9

chain 1 launch from before policy v2; nothing is being deployed to mainnet

details