{"hook":"0xf4312871bB45614926d000d95c82aDFBa07Ae0CC","block":93063599,"bits":8396,"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":true},{"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":true},{"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":true},{"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":true},{"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":6842,"selectors":["0xd5f39488","0xd706f4b4","0xdc4c90d3","0xdc98354e","0xea40f8fe","0xf92f23a7","0xbf333f2c","0xc1e7af35","0xc45a0155","0xc4e833ce","0xc8aa7c2f","0xd0c87bfb","0x5bb47808","0x64df049e","0x918570c8","0x91dd7346","0xb47b2fb1","0xb5217bb4","0x04be202d","0x1a17db67","0x1d8ef3ef","0x34dafbd2","0x575e24b4"],"delegatecall":false,"selfdestruct":false,"create":false,"calls":6,"addresses":[]},"proxy":{"implementation":null,"admin":null,"beacon":null,"clone":false},"owner":null,"functions":[{"selector":"0xd5f39488","name":"deployer()"},{"selector":"0xd706f4b4","name":"LAUNCH_WINDOW()"},{"selector":"0xdc4c90d3","name":"poolManager()"},{"selector":"0xdc98354e","name":"beforeInitialize(address,(address,address,uint24,int24,address),uint160)"},{"selector":"0xea40f8fe","name":"distribute(bytes32)"},{"selector":"0xf92f23a7","name":"accrued(bytes32)"},{"selector":"0xbf333f2c","name":"FEE_BPS()"},{"selector":"0xc1e7af35","name":"PROTOCOL_BPS()"},{"selector":"0xc45a0155","name":null},{"selector":"0xc4e833ce","name":"getHookPermissions()"},{"selector":"0xc8aa7c2f","name":"accruedLaunchTax(bytes32)"},{"selector":"0xd0c87bfb","name":"buybackRecipient()"},{"selector":"0x5bb47808","name":"setFactory(address)"},{"selector":"0x64df049e","name":"protocolFeeRecipient()"},{"selector":"0x918570c8","name":"HOLDER_BPS()"},{"selector":"0x91dd7346","name":"unlockCallback(bytes)"},{"selector":"0xb47b2fb1","name":"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)"},{"selector":"0xb5217bb4","name":"pools(bytes32)"},{"selector":"0x04be202d","name":"LAUNCH_TAX_BPS()"},{"selector":"0x1a17db67","name":"BUYBACK_BPS()"},{"selector":"0x1d8ef3ef","name":"currentFeeBps(bytes32)"},{"selector":"0x34dafbd2","name":"registerPool((address,address,uint24,int24,address),address,address,address,address)"},{"selector":"0x575e24b4","name":"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)"}],"history":{"pools":13,"firstTime":1788553785,"lastTime":1791848068},"pools":[{"id":"0xcdb6d56ad4916ed3b9af65bf45f33751935443649e63caaf1f7439de1fcaa807","key":{"currency0":"0x37A2aFaa98648f2e13658623885F821ac8365609","currency1":"0xcf041a47150D513Be78b9186c2361717cbe8AFb0","fee":0,"tickSpacing":60,"hooks":"0xf4312871bB45614926d000d95c82aDFBa07Ae0CC"},"symbols":["pGLD5x","DAVID"],"state":{"sqrtP":"467288395520717055320914539146548","tick":173656,"protocolFee":0,"lpFee":0,"liquidity":"165661380579139930798527"},"swaps":[{"zeroForOne":true,"ok":true,"amountIn":"5648902144436850","paid":"5648902144436850","got":"190573230117062645276076","expected":"196466062396236778140296","feePpm":0,"takePpm":29995},{"zeroForOne":false,"ok":true,"amountIn":"488536135850909619934554","paid":"488536135850909619934554","got":"13615716798123476","expected":"14036821441364408","feePpm":0,"takePpm":30000}],"roundTrip":{"ok":true,"lossPpm":1,"added":["-88985954507422","-2963760730040544260058"],"removed":["88985954507421","2963760730040544260057"]}},{"id":"0xf34b76c1a76af692e2e049e6376e76d317b162fbde448304e19e69710ff9955c","key":{"currency0":"0xC9eAd1aF430C531CF287e1672A3BBaced7102CEe","currency1":"0xe24CABDf76DD1c2576049167eB1755C84b985C36","fee":0,"tickSpacing":60,"hooks":"0xf4312871bB45614926d000d95c82aDFBa07Ae0CC"},"symbols":["TRIP","pHOOD3x"],"state":{"sqrtP":"9782117021910916940453807","tick":-180000,"protocolFee":0,"lpFee":0,"liquidity":"123465347291953016846812"},"swaps":[{"zeroForOne":true,"ok":true,"amountIn":"4713237785532933681125","paid":"4713237785532933681125","got":"69694030062327","expected":"71849515528172","feePpm":0,"takePpm":30000},{"zeroForOne":false,"ok":true,"amountIn":"7621989687968033","paid":"7621989687968033","got":"484755749779572276454285","expected":"499740703172347129628701","feePpm":0,"takePpm":29986}],"roundTrip":{"ok":true,"lossPpm":1,"added":["-3244099112531568474492","-45078438899348"],"removed":["3244099112531568474491","45078438899347"]}}],"openCallbacks":[],"checks":[{"id":"01","title":"Permissions that touch your money","status":"caution","detail":"The address enables before swap returns delta, after swap returns delta. The hook is allowed to take; the next two checks measure whether it does."},{"id":"02","title":"What it takes from a swap","status":"caution","detail":"It takes 3% of each swap on top of the pool fee."},{"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 0%, written in the pool key."},{"id":"05","title":"No one holds the switch","status":"caution","detail":"No owner() but it has setFactory."},{"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":"13 pools over 45 days."}],"score":75,"verdict":"caution"}