Skip to content
HookOSv4
Discover
HomeFeedTokensHooks12Events4
Trade
ArenaStake $HOOKTerminal
Build
LaunchAI Studio
Tools
AlphaScoreDev PortalStatusPress
You
ProfileBrand kit
HomeFeedHooks
Skip to content
HookOSv4
Discover
HomeFeedTokensHooks12Events4
Trade
ArenaStake $HOOKTerminal
Build
LaunchAI Studio
Tools
AlphaScoreDev PortalStatusPress
You
ProfileBrand kit
HomeFeedHooks
ai studio · synth-1

Describe a market.
Get a hook.

Type behaviors in plain English. Our model generates audited Solidity, runs Monte Carlo simulations, and ships.

SDK docs
HookOS / Synth-1
session · 4m
Synth-1
Hey. I build hooks. Tell me what you want your market to do — anything from anti-bot taxes to AI-tuned fees — and I'll generate, simulate, and deploy.
⌘+Enter to ship·v1.4-synth · 128K ctx
VolatilityPunish.sol
Compiled0.8.26
pragma solidity ^0.8.26;

import {BaseHook} from "v4-periphery/BaseHook.sol";
import {IPoolManager} from "v4-core/interfaces/IPoolManager.sol";
import {PoolKey} from "v4-core/types/PoolKey.sol";
import {VolatilityOracle} from "./oracles/VolOracle.sol";

/// @title VolatilityPunish
/// @notice Scales sell tax by realized volatility
contract VolatilityPunish is BaseHook {
    uint256 constant VOL_THRESHOLD = 6e16;  // 6%
    uint256 constant BASE_TAX      = 5e15;  // 0.5%
    uint256 constant MAX_TAX       = 8e16;  // 8.0%
    uint256 constant COOLDOWN      = 12;    // blocks

    VolatilityOracle public oracle;

    event VolatilityPunish(address indexed seller, uint256 tax);

    function beforeSwap(
        address sender,
        PoolKey calldata key,
        IPoolManager.SwapParams calldata params,
        bytes calldata
    ) external override returns (bytes4, BeforeSwapDelta, uint24) {
        uint256 vol = oracle.realized(key.toId());

        if (vol > VOL_THRESHOLD && params.zeroForOne) {
            uint256 scale = ((vol - VOL_THRESHOLD) * MAX_TAX) /
                            (18e16 - VOL_THRESHOLD);
            uint256 tax = BASE_TAX + scale;

            _collectTax(sender, tax);
            _route(tax, 4000, 3000, 3000); // burn / lp / holders
            emit VolatilityPunish(sender, tax);
        }

        return (
            IHooks.beforeSwap.selector,
            BeforeSwapDeltaLibrary.ZERO_DELTA,
            0
        );
    }
}
↳ 44 lines· ready
Simulation · projected
Estimated performance
Passed
Floor
—
Tax collected
—
Sell pressure
—
Fee response curve
vol > 6%
0% vol9%18%
Market prediction · 7d
—
est. floor impact
—
deploy to simulate
Simulation results will appear after deploying to a testnet fork.
Calls HookRegistry.registerHook() on Base