{"hook":"0xd88DcACF4E77B7FF2778AEE824639D30cb1640CC","block":92981295,"bits":204,"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":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":7962,"selectors":["0xdc98354e","0xde6fb465","0xe1b4af69","0xe8614178","0xf2539453","0xc415b95c","0xcf0ac78f","0xdc1ab379","0xdc4c90d3","0xb6a8b0fa","0xb7578940","0xb9daf517","0xbe378228","0x9beedd1e","0x9f063efc","0xa78842ee","0xb47b2fb1","0x726877e5","0x77cd9374","0x8549d9be","0x91dd7346","0x93cc0b2b","0x5f81a57c","0x64f8caec","0x6c2bbe7e","0x6fe7e6eb","0x26465937","0x4eec9e09","0x575e24b4","0x5c9302c9","0x0f1d6f76","0x1d38cbfe","0x21d0ee70","0x259982e5"],"delegatecall":false,"selfdestruct":false,"create":false,"calls":10,"addresses":[]},"proxy":{"implementation":null,"admin":null,"beacon":null,"clone":false},"owner":null,"functions":[{"selector":"0xdc98354e","name":"beforeInitialize(address,(address,address,uint24,int24,address),uint160)"},{"selector":"0xde6fb465","name":"unsettledTokens()"},{"selector":"0xe1b4af69","name":"afterDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)"},{"selector":"0xe8614178","name":"feesOnDay(uint256)"},{"selector":"0xf2539453","name":"activePoolsOnDay(uint256)"},{"selector":"0xc415b95c","name":"feeCollector()"},{"selector":"0xcf0ac78f","name":"feesChargedOf(address)"},{"selector":"0xdc1ab379","name":"lastActiveDay(address)"},{"selector":"0xdc4c90d3","name":"poolManager()"},{"selector":"0xb6a8b0fa","name":"beforeDonate(address,(address,address,uint24,int24,address),uint256,uint256,bytes)"},{"selector":"0xb7578940","name":"totalFeesCharged()"},{"selector":"0xb9daf517","name":"totalStockLocked()"},{"selector":"0xbe378228","name":"PROTOCOL_FEE_BPS()"},{"selector":"0x9beedd1e","name":"totalUnsettledFees()"},{"selector":"0x9f063efc","name":"afterAddLiquidity(address,(address,address,uint24,int24,address),(int24,int24,int256,bytes32),int256,int256,bytes)"},{"selector":"0xa78842ee","name":"settleFees(address)"},{"selector":"0xb47b2fb1","name":"afterSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),int256,bytes)"},{"selector":"0x726877e5","name":"unsettledFeeOf(address)"},{"selector":"0x77cd9374","name":"poolsEverTraded()"},{"selector":"0x8549d9be","name":"REQUIRED_FLAGS()"},{"selector":"0x91dd7346","name":"unlockCallback(bytes)"},{"selector":"0x93cc0b2b","name":"stockLockedOf(address)"},{"selector":"0x5f81a57c","name":"totalVolume()"},{"selector":"0x64f8caec","name":"volumeOf(address)"},{"selector":"0x6c2bbe7e","name":"afterRemoveLiquidity(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":"0x26465937","name":"stockCurrency()"},{"selector":"0x4eec9e09","name":"tokenizedStock()"},{"selector":"0x575e24b4","name":"beforeSwap(address,(address,address,uint24,int24,address),(bool,int256,uint160),bytes)"},{"selector":"0x5c9302c9","name":"currentDay()"},{"selector":"0x0f1d6f76","name":"volumeOnDay(uint256)"},{"selector":"0x1d38cbfe","name":"settleAllFees()"},{"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":29,"firstTime":1788356004,"lastTime":1788377756},"pools":[{"id":"0x73d61491f8a1a95ff3d2bf76880c7f86a2dcc7ec303cbed701bf1d272817660e","key":{"currency0":"0x31E3987B19b5BAC6D95fF0e442f4bE5b0689D8a5","currency1":"0x5D2e81cB3A6FECe856B824Dfd7e1d6D3dbaD8cd9","fee":3000,"tickSpacing":60,"hooks":"0xd88DcACF4E77B7FF2778AEE824639D30cb1640CC"},"symbols":["JINQIAN","FAMI"],"state":{"sqrtP":"418149963893114902970261954","tick":-104891,"protocolFee":0,"lpFee":3000,"liquidity":"5264665503629113682261949"},"swaps":[{"zeroForOne":true,"ok":true,"amountIn":"498756200073937988295804","paid":"498756200073937988295804","got":"13844331303521648864","expected":"13844331303521648864","feePpm":3000,"takePpm":0},{"zeroForOne":false,"ok":true,"amountIn":"3537695000547527522","paid":"3537695000547527522","got":"125340437758063159210297","expected":"126606342094323955736583","feePpm":3000,"takePpm":9999}],"roundTrip":{"ok":true,"lossPpm":1,"added":["-2997224422532501846354","-88823203017862738"],"removed":["2997224422532501846353","88823203017862737"]}},{"id":"0xa56ed69aaea2c454c19d3d699ffc5dd8896a9fbef77591afa429bbabdfbbeadd","key":{"currency0":"0x5D2e81cB3A6FECe856B824Dfd7e1d6D3dbaD8cd9","currency1":"0x9A063D080f0935881F3994c5a16FbB9ba155B6F7","fee":3000,"tickSpacing":60,"hooks":"0xd88DcACF4E77B7FF2778AEE824639D30cb1640CC"},"symbols":["FAMI","YZ"],"state":{"sqrtP":"15048759285647737809339056560514","tick":104939,"protocolFee":0,"lpFee":3000,"liquidity":"5264665503629113682261949"},"swaps":[{"zeroForOne":true,"ok":true,"amountIn":"13858610075003775739","paid":"13858610075003775739","got":"493262357185383142539243","expected":"498242322724939281264055","feePpm":3000,"takePpm":9996},{"zeroForOne":false,"ok":true,"amountIn":"4665735654116572158363","paid":"4665735654116572158363","got":"128935065155624828","expected":"128935065155624828","feePpm":3000,"takePpm":0}],"roundTrip":{"ok":true,"lossPpm":1,"added":["-81962930621134554","-3244118113425478621141"],"removed":["81962930621134553","3244118113425478621140"]}}],"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":"pass","detail":"It takes 1.00% 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.30%, written in the pool key."},{"id":"05","title":"No one holds the switch","status":"caution","detail":"No owner() but it has settleFees, settleAllFees."},{"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":"29 pools over 47 days."}],"score":88,"verdict":"caution"}