Skip to content

Add AuroraHook hook on ethereum - #7157

Merged
Ponx merged 2 commits into
mainfrom
hooks/ethereum/0x2f598e61146a845f1d02e9d22e3de3ce361a90c4
Sep 17, 2026
Merged

Ponx merged 2 commits into
mainfrom
hooks/ethereum/0x2f598e61146a845f1d02e9d22e3de3ce361a90c4

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

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

Flag Value
beforeInitialize false
afterInitialize true
beforeAddLiquidity false
afterAddLiquidity false
beforeRemoveLiquidity false
afterRemoveLiquidity false
beforeSwap true
afterSwap true
beforeDonate false
afterDonate false
beforeSwapReturnsDelta false
afterSwapReturnsDelta true
afterAddLiquidityReturnsDelta false
afterRemoveLiquidityReturnsDelta false

Properties

Property Value
dynamicFee true
upgradeable false
requiresCustomSwapData false
vanillaSwap false
swapAccess none

Warnings

  • Submitter did not provide a name. Using AI-derived "AuroraHook".
  • Submitter did not provide a description. Using AI-generated description.

Closes #7144

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: truebeforeSwap returns fee | 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 aurora field is immutable. ✅
  • requiresCustomSwapData: false_resolveTrader falls back to sender when hookData.length < 20; swaps work without hookData. ✅
  • vanillaSwap: false — Correct: afterSwapReturnsDelta=true and dynamicFee=true both individually mandate false. ✅
  • swapAccess: "none"beforeSwap applies 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.json for ethereum. ✅
  • name: "AuroraHook" — Matches contractName in source_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."

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ✓ — beforeSwap returns fee | OVERRIDE_FEE_FLAG where 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, no SELFDESTRUCT. The aurora token reference is immutable. transferOwnership is access control only.

  • requiresCustomSwapData: false ✓ — hookData is optionally used in _resolveTrader to hint a different trader address, but falls back to sender if empty or zero. Swaps function correctly with no hookData.

  • vanillaSwap: false ✓ — dynamicFee is true and afterSwapReturnsDelta is true (the hook calls poolManager.take() to collect the 15% impatient tax and returns a non-zero hookDelta).

  • swapAccess: "none" ✓ — beforeSwap performs no access control; it never reverts based on caller identity. All swaps are permitted.

Metadata

  • chainId: 1 ✓ — matches chains.json for ethereum.
  • name: "AuroraHook" ✓ — matches contractName in source_meta.json and the Solidity contract name.
  • verifiedSource: true ✓ — source_meta.json confirms "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 (registerArchiver requires tier 3, claimArchivePool pays ETH). No audit, safety, or endorsement language present.

All fields are correct.

@Ponx Ponx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot review verified; bitmask/flags/properties check out. LGTM.

@Ponx
Ponx merged commit 0ed4204 into main Sep 17, 2026
5 checks passed
@Ponx
Ponx deleted the hooks/ethereum/0x2f598e61146a845f1d02e9d22e3de3ce361a90c4 branch September 17, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hook: 0x2f598e61146a845f1d02e9d22e3de3ce361a90c4 on ethereum

1 participant