Add MoonpotHook hook on base#652
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Review: hooks/base/0x282b5e7d546b5e39963753d11b2bb6cd3c9da088.json
Flags ✅
Address 0x...a088 → 0xa088 = 1010 0000 1000 1000 binary. The 14 lowest bits decode to:
beforeInitialize=true, beforeSwap=true, beforeSwapReturnsDelta=true, all others false.
This matches both the hook file's flags section and the getHookPermissions() override in the source. ✅
Properties
- dynamicFee: true ✅ —
_beforeSwapreturnstax | LPFeeLibrary.DYNAMIC_FEE_FLAGon every swap path. - upgradeable: false ✅ — No proxy, delegatecall, or SELFDESTRUCT.
- requiresCustomSwapData: false ✅ — The
bytes calldatahookData parameter in_beforeSwapis completely ignored; swaps work without it. - vanillaSwap: false ✅ —
dynamicFee=trueandbeforeSwapReturnsDelta=trueboth apply. - swapAccess: "governance" ✅ — TMP sells revert (
FloorTickNotSet) until a manager-controlled call tosetCurrentFloorTick()sets thefloorTickSetboolean. This is a governance-style boolean flag set by an admin.
Description ✅
The description accurately reflects the source logic: dynamic price-defense fee on TMP sells scaled by distance above floor tick, intercept-and-burn of excess TMP, USDC liquidity injection, and TWAP oracle guard. All claims are substantiated by _beforeSwap, _defenseTax, _calculateTax, _computeMaxTmpSell, injectLiquidity, and the Oracle library.
chainId ✅
8453 matches base in chains.json.
verifiedSource ✅
source_meta.json reports "verified": true.
❌ Issues Requiring Changes
1. Deployed contract is a test mock — explicitly "Not for production"
source_meta.json reports contractName: "MockHook". The verified source is contracts/mocks/MockHook.sol, whose NatSpec reads:
"Test-only hook. Inherits {MoonpotHook} logic byte-for-byte; only the contract name differs. Still must be deployed at a CREATE2-mined address carrying the same v4 permission flags. Not for production."
A contract explicitly marked as a test mock should not appear in a production registry of deployed hooks. The submitter may have intended to register the production MoonpotHook contract at a different address.
2. Name mismatch with on-chain contract
The hook file uses "name": "MoonpotHook", but the Etherscan-verified contract name is MockHook. While MoonpotHook is the parent contract and is substantiated by the source, the deployed artifact is MockHook. The name should either be MockHook (the actual deployed contract name) or the correct production MoonpotHook address should be submitted instead.
Recommendation: This PR should be rejected until the submitter provides the address of the production MoonpotHook deployment (not the test mock). If this address is truly the intended production hook, the name must be corrected to MockHook — but deploying a "Not for production" mock to mainnet and registering it here is itself a problem that warrants clarification.
|
To be clear on the issue '1. Deployed contract is a test mock — explicitly "Not for production"'; the deployed bytecode is the audited
Verifiable:
The full audited |
|
Contract details on blockscout: https://base.blockscout.com/address/0x282b5E7d546B5E39963753D11B2bb6CD3C9Da088?tab=contract |
|
Closing per the bot review's findings: the verified contract at this address is If there is a production |
Summary
A single-pool USDC/TMP hook that applies a dynamic price-defense fee on TMP sells (scaled by distance above a configurable floor tick), intercepts and burns TMP in excess of a floor-enforced sell limit, injects USDC as a protocol floor-band liquidity position, and records a TWAP oracle to guard liquidity injection against price manipulation.
Flags
Properties
Warnings
Closes #651