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
Pending

Main Uniswap v4 hook. Intercepts swaps, computes sigmoid fee using pool/oracle delta, and updates the dynamic LP fee.

Address pending mainnet deploy
beforeInitializebeforeSwapupdateDynamicLPFee
FunctionsConsumer
Sepolia (PoC)
Live

Chainlink Functions consumer contract. Fetches ETH/USD price from CryptoCompare API via a Chainlink DON and stores it on-chain with a timestamp.

0xddc2e9aae870617c91fa417809b14cfde4f76181
sendRequest()fulfillRequest()priceData
Chainlink Automation Upkeep
Sepolia (PoC, paused)
Paused

Chainlink Automation contract that periodically triggers the FunctionsConsumer to fetch a fresh ETH/USD price with very low latency.

0xC25f1055f9F8281cf60b1CEC7faD803d5F96e755
checkUpkeep()performUpkeep()
SigmaToken
Ethereum Mainnet
Pending

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()
Chainlink ETH/USD Feed
Ethereum Mainnet
Live

Fallback oracle. Used when the custom oracle price becomes stale (> 5 minutes). Standard Chainlink AggregatorV3Interface.

0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
latestRoundData()decimals()
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