Add AuroraHook hook on ethereum - #7157
Conversation
There was a problem hiding this comment.
Review: hooks/ethereum/0x2f598e61146a845f1d02e9d22e3de3ce361a90c4.json
Flags — ✅ Correct
Address 0x2f598e61146a845f1d02e9d22e3de3ce361a90c4: lowest 14 bits = 0x90C4 & 0x3FFF = 0x10C4 = 0001 0000 1100 0100.
| Bit | Flag | JSON | Matches? |
|---|---|---|---|
| 12 | afterInitialize | true | ✅ |
| 7 | beforeSwap | true | ✅ |
| 6 | afterSwap | true | ✅ |
| 2 | afterSwapReturnsDelta | true | ✅ |
| all others | false | false | ✅ |
Confirmed by source comment: HOOK FLAGS: afterInitialize | beforeSwap | afterSwap | afterSwapReturnDelta = 0x10C4.
Properties — ✅ Correct
- dynamicFee: true —
beforeSwapreturnsfee | OVERRIDE_FEE_FLAG(0x400000) with per-tier fees (10000/5000/2500/1000). ✅ - upgradeable: false — No proxy patterns, no delegatecall to mutable addresses, no SELFDESTRUCT. The
aurorafield isimmutable. ✅ - requiresCustomSwapData: false —
_resolveTraderfalls back tosenderwhenhookData.length < 20; swaps work without hookData. ✅ - vanillaSwap: false — Correct:
afterSwapReturnsDelta=trueanddynamicFee=trueboth individually mandate false. ✅ - swapAccess: "none" —
beforeSwapapplies no access control (no allowlist, no governance flag, no temporal gate). ✅
Metadata — ✅ Mostly correct
- verifiedSource: true — Confirmed by
source_meta.json("verified": true). ✅ - chainId: 1 — Matches
chains.jsonfor ethereum. ✅ - name: "AuroraHook" — Matches
contractNameinsource_meta.json. ✅
Description — ❌ Factual inaccuracy
The description states:
"Traders accrue a 'lumi' score by holding AURORA tokens over time, unlocking lower swap fees."
This is not supported by the Solidity logic. The liveLumi() function calculates lumi as:
uint256 elapsed = block.number - lb;
uint256 swapDelta = globalSwapCount >= ss ? globalSwapCount - ss : 0;
uint256 rate = 1 + swapDelta / SWAP_SCALE;
return mat + elapsed * rate;Lumi accrues based purely on block-time elapsed since last swap interaction, scaled by global trading activity. The aurora field is stored as an immutable reference to the AuroraToken contract, but aurora.balanceOf() is never called anywhere in the hook — AURORA token holdings have no effect on lumi accrual whatsoever.
Required fix: Update the description to accurately reflect that lumi accrues based on blocks elapsed since last hook interaction (last swap), multiplied by a rate derived from global swap count — not based on token holdings. For example:
"Traders accrue a 'lumi' score based on time (blocks) elapsed since their last swap, scaled by global trading activity, unlocking lower swap fees (1.00% down to 0.10% across four tiers). Sellers who exit within 7200 blocks (~24h) of their last buy pay a 15% impatient tax on ETH output, redistributed to registered Stellar-tier Archiver holders."
There was a problem hiding this comment.
Review: hooks/ethereum/0x2f598e61146a845f1d02e9d22e3de3ce361a90c4.json
Flags
Address 0x2f598e61146a845f1d02e9d22e3de3ce361a90c4 → lowest 14 bits = 0x10C4 (confirmed by source comment and getHookPermissions()):
afterInitialize,beforeSwap,afterSwap,afterSwapReturnsDelta= true; all others false. All flags match.
Properties
-
dynamicFee: true ✓ —
beforeSwapreturnsfee | OVERRIDE_FEE_FLAGwhere fee is tier-dependent (FEE_DIM=1.00%, FEE_GLOW=0.50%, FEE_RADIANT=0.25%, FEE_STELLAR=0.10%) based on the trader's lumi score. -
upgradeable: false ✓ — No proxy pattern, no
delegatecall, noSELFDESTRUCT. Theauroratoken reference isimmutable.transferOwnershipis access control only. -
requiresCustomSwapData: false ✓ —
hookDatais optionally used in_resolveTraderto hint a different trader address, but falls back tosenderif empty or zero. Swaps function correctly with no hookData. -
vanillaSwap: false ✓ —
dynamicFeeis true andafterSwapReturnsDeltais true (the hook callspoolManager.take()to collect the 15% impatient tax and returns a non-zerohookDelta). -
swapAccess: "none" ✓ —
beforeSwapperforms no access control; it never reverts based on caller identity. All swaps are permitted.
Metadata
- chainId: 1 ✓ — matches
chains.jsonforethereum. - name: "AuroraHook" ✓ — matches
contractNameinsource_meta.jsonand the Solidity contract name. - verifiedSource: true ✓ —
source_meta.jsonconfirms"verified": true. - description ✓ — All technical claims are substantiated by the source: lumi accrual formula (
liveLumi), four fee tiers (constants match), 15% impatient tax (IMPATIENT_TAX_BPS=1500,IMPATIENT_BLOCKS=7200), redistribution to Stellar-tier Archiver holders (registerArchiverrequires tier 3,claimArchivePoolpays ETH). No audit, safety, or endorsement language present.
All fields are correct.
Ponx
left a comment
There was a problem hiding this comment.
Bot review verified; bitmask/flags/properties check out. LGTM.
Summary
A Uniswap v4 hook implementing a loyalty-based dynamic fee system. Traders accrue a "lumi" score by holding AURORA tokens over time, unlocking lower swap fees (1.00% down to 0.10% across four tiers). Sellers who exit within 24 hours of their last buy pay a 15% impatient tax on ETH output, which is redistributed to registered Stellar-tier Archiver holders.
Flags
Properties
Warnings
Closes #7144