{"hook":"0x18Cf9452cBf4518941E283403CaD563C62b64040","block":93270449,"bits":64,"flags":[{"bit":13,"key":"beforeInitialize","label":"Before initialize","risk":0,"does":"Runs once, when a pool is created.","fn":"beforeInitialize(address,(address,address,uint24,int24,address),uint160)","on":false},{"bit":12,"key":"afterInitialize","label":"After initialize","risk":0,"does":"Runs once, right after a pool is created.","fn":"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)","on":false},{"bit":11,"key":"beforeAddLiquidity","label":"Before add liquidity","risk":1,"does":"Can refuse a deposit, or only let some addresses provide liquidity.","fn":"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)","on":false},{"bit":10,"key":"afterAddLiquidity","label":"After add liquidity","risk":0,"does":"Runs after each deposit.","fn":"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)","on":false},{"bit":9,"key":"beforeRemoveLiquidity","label":"Before remove liquidity","risk":2,"does":"Can refuse a withdrawal. LPs may not get out.","fn":"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)","on":false},{"bit":8,"key":"afterRemoveLiquidity","label":"After remove liquidity","risk":0,"does":"Runs after each withdrawal.","fn":"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)","on":false},{"bit":7,"key":"beforeSwap","label":"Before swap","risk":1,"does":"Runs before every swap. On a dynamic-fee pool it can set the fee each time.","fn":"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)","on":false},{"bit":6,"key":"afterSwap","label":"After swap","risk":0,"does":"Runs after every swap.","fn":"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)","on":true},{"bit":5,"key":"beforeDonate","label":"Before donate","risk":0,"does":"Runs before a donation to LPs.","fn":"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)","on":false},{"bit":4,"key":"afterDonate","label":"After donate","risk":0,"does":"Runs after a donation to LPs.","fn":"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)","on":false},{"bit":3,"key":"beforeSwapReturnDelta","label":"Before swap returns delta","risk":2,"does":"Can take part of what you put into a swap, or change how much is swapped.","fn":null,"on":false},{"bit":2,"key":"afterSwapReturnDelta","label":"After swap returns delta","risk":2,"does":"Can take part of what you get out of every swap.","fn":null,"on":false},{"bit":1,"key":"afterAddLiquidityReturnDelta","label":"After add returns delta","risk":2,"does":"Can charge LPs on the way in.","fn":null,"on":false},{"bit":0,"key":"afterRemoveLiquidityReturnDelta","label":"After remove returns delta","risk":2,"does":"Can take part of what LPs withdraw.","fn":null,"on":false}],"code":{"size":11604,"selectors":["0xe5f0ae20","0xef3dc46f","0xf2fde38b","0xf6b76e1b","0xdfba3694","0xe1a45218","0xe1b4af69","0xe30c3978","0xb47b2fb1","0xb6a8b0fa","0xdc4c90d3","0xdc98354e","0x80f8952d","0x8da5cb5b","0x9f063efc","0x6fe7e6eb","0x715018a6","0x79ba5097","0x7ecfb18a","0x575e24b4","0x5a38d80f","0x5d1b15cb","0x6c2bbe7e","0x266e274b","0x3bd909fd","0x4134fef3","0x4c0a8da9","0x0885f732","0x21d0ee70","0x259982e5"],"delegatecall":false,"selfdestruct":false,"create":false,"calls":0,"addresses":[]},"proxy":{"implementation":null,"admin":null,"beacon":null,"clone":false},"owner":"0xd03543d97B1725D6c9df6b1f90FEDBF446Cd1418","functions":[{"selector":"0xe5f0ae20","name":"setModuleFactories(address,address,address)"},{"selector":"0xef3dc46f","name":"wethModuleFactory()"},{"selector":"0xf2fde38b","name":"transferOwnership(address)"},{"selector":"0xf6b76e1b","name":"MAX_LEVEL_HP_BONUS_BPS()"},{"selector":"0xdfba3694","name":"RAID_DURATION()"},{"selector":"0xe1a45218","name":"BPS_DENOMINATOR()"},{"selector":"0xe1b4af69","name":"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)"},{"selector":"0xe30c3978","name":"pendingOwner()"},{"selector":"0xb47b2fb1","name":"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)"},{"selector":"0xb6a8b0fa","name":"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)"},{"selector":"0xdc4c90d3","name":"poolManager()"},{"selector":"0xdc98354e","name":"beforeInitialize(address,(address,address,uint24,int24,address),uint160)"},{"selector":"0x80f8952d","name":"raidVault()"},{"selector":"0x8da5cb5b","name":"owner()"},{"selector":"0x9f063efc","name":"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)"},{"selector":"0x6fe7e6eb","name":"afterInitialize(address,(address,address,uint24,int24,address),uint160,int24)"},{"selector":"0x715018a6","name":"renounceOwnership()"},{"selector":"0x79ba5097","name":"acceptOwnership()"},{"selector":"0x7ecfb18a","name":"LEVEL_HP_STEP_BPS()"},{"selector":"0x575e24b4","name":"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)"},{"selector":"0x5a38d80f","name":"victoryNonce(bytes32)"},{"selector":"0x5d1b15cb","name":"raidState(bytes32)"},{"selector":"0x6c2bbe7e","name":"afterRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)"},{"selector":"0x266e274b","name":"NEXT_HP_VOLUME_BPS()"},{"selector":"0x3bd909fd","name":"stockModuleFactory()"},{"selector":"0x4134fef3","name":"registerPool((address,address,uint24,int24,address),address,address,uint128,uint128)"},{"selector":"0x4c0a8da9","name":"isRaging(bytes32)"},{"selector":"0x0885f732","name":"poolConfig(bytes32)"},{"selector":"0x21d0ee70","name":"beforeRemoveLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)"},{"selector":"0x259982e5","name":"beforeAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),bytes)"}],"history":{"pools":5,"firstTime":1785682624,"lastTime":1785996906},"pools":[{"id":"0x088b9899c98638e89cd0dc4a31845467329f99dbb7f2dd09b79ce84f4f7402e4","key":{"currency0":"0x117cc2133c37B721F49dE2A7a74833232B3B4C0C","currency1":"0xD8BfE4950f229270CC21B3ff4e3BC29Fab31F01d","fee":10000,"tickSpacing":200,"hooks":"0x18Cf9452cBf4518941E283403CaD563C62b64040"},"symbols":["SPY","UNIHOOK"],"state":{"sqrtP":"1344872536487963746794941221163482","tick":194799,"protocolFee":0,"lpFee":10000,"liquidity":"58909214732957179520496"},"swaps":[{"zeroForOne":true,"ok":true,"amountIn":"1735208620825382","paid":"1735208620825382","got":"494737751771905699716786","expected":"494737751771905699716786","feePpm":10000,"takePpm":0},{"zeroForOne":false,"ok":true,"amountIn":"8764161836430745379699","paid":"8764161836430745379699","got":"30111939719139","expected":"30111939719139","feePpm":10000,"takePpm":0}],"roundTrip":{"ok":true,"lossPpm":1,"added":["-10267934424008","-3917358274655449884640"],"removed":["10267934424007","3917358274655449884639"]}},{"id":"0x876ebe4a389d9f06179f0c5680febff6d126ee39039273e4f23b1ece0fa51a8a","key":{"currency0":"0x01995f56f6ba8db4d17Ec94983db56DeaC9FF01d","currency1":"0xa30FA36Db767ad9eD3f7a60fC79526fB4d56D344","fee":10000,"tickSpacing":200,"hooks":"0x18Cf9452cBf4518941E283403CaD563C62b64040"},"symbols":["USO","USO"],"state":{"sqrtP":"12150343439814328016267832","tick":-175664,"protocolFee":0,"lpFee":10000,"liquidity":"152314890910884737018971"},"swaps":[{"zeroForOne":true,"ok":true,"amountIn":"496596206938757444435572","paid":"496596206938757444435572","got":"11556906779935174","expected":"11556906779935174","feePpm":10000,"takePpm":0},{"zeroForOne":false,"ok":true,"amountIn":"11679421665445699","paid":"11679421665445699","got":"491387008300261239343428","expected":"491387008300261239343428","feePpm":10000,"takePpm":0}],"roundTrip":{"ok":true,"lossPpm":1,"added":["-3240105327248770223509","-84464204766766"],"removed":["3240105327248770223508","84464204766765"]}}],"openCallbacks":[],"checks":[{"id":"01","title":"Permissions that touch your money","status":"pass","detail":"None of the permissions that let a hook take from swaps or from LPs are switched on."},{"id":"02","title":"What it takes from a swap","status":"pass","detail":"A swap through it pays the pool fee and nothing else."},{"id":"03","title":"LPs can get out","status":"pass","detail":"Liquidity added and removed in the same block came back whole."},{"id":"04","title":"The fee is the fee","status":"pass","detail":"A fixed fee of 1%, written in the pool key."},{"id":"05","title":"No one holds the switch","status":"caution","detail":"Owned by 0xd03543d97B1725D6c9df6b1f90FEDBF446Cd1418. Owner-style functions: setModuleFactories, transferOwnership."},{"id":"06","title":"The code cannot change","status":"pass","detail":"Not a proxy, no DELEGATECALL, no SELFDESTRUCT."},{"id":"07","title":"Only the PoolManager can call it","status":"pass","detail":"Each callback refused a call that did not come from the PoolManager."},{"id":"08","title":"Track record","status":"pass","detail":"5 pools over 78 days."}],"score":93,"verdict":"caution"}