Documentation
Contracts & Architecture
All contracts are written manually with Foundry. No code generation.
Oracle data flow
CryptoCompare API
ETH/USD price feed
Chainlink Functions
Off-chain JS execution
Chainlink Automation
Periodic trigger
FunctionsConsumer
On-chain price store
SigmoidHook
beforeSwap → dynamic fee
Fallback: Custom oracle stale (> 5 min) → Chainlink ETH/USD feed → Base fee applied directly
DynamicSigmoidFeesHook
Ethereum Mainnet
Main Uniswap v4 hook. Intercepts swaps, computes sigmoid fee using pool/oracle delta, and updates the dynamic LP fee.
Address pending mainnet deploy
beforeInitializebeforeSwapupdateDynamicLPFeeFunctionsConsumer
Sepolia (PoC)
Chainlink Functions consumer contract. Fetches ETH/USD price from CryptoCompare API via a Chainlink DON and stores it on-chain with a timestamp.
sendRequest()fulfillRequest()priceDataChainlink Automation Upkeep
Sepolia (PoC, paused)
Chainlink Automation contract that periodically triggers the FunctionsConsumer to fetch a fresh ETH/USD price with very low latency.
checkUpkeep()performUpkeep()SigmaToken
Ethereum Mainnet
Protocol token minted by the hook on every arb-direction penalty fee collected. Burned automatically on every anti-arb swap. Only the hook contract can mint.
Address pending mainnet deploy
mintToLP()burnOnAntiArb()totalBurnedcirculatingSupply()Build & test with Foundry
# Build
forge build
# Test
forge test -vvv
# Deploy FunctionsConsumer
forge script script/DeployFunctionsConsumer.s.sol \
--rpc-url $MAINNET_RPC \
--private-key $PRIVATE_KEY \
--broadcast --verify
Mainnet deployment checklist
FunctionsConsumer deployed on Sepolia
Automation upkeep tested on Sepolia
Chainlink Functions mainnet subscription
FunctionsConsumer deployed on mainnet
Hook address mined with CREATE2 (correct bits)
DynamicSigmoidFeesHook deployed on mainnet
Pool initialized with dynamic fee flag
Automation upkeep registered on mainnet