ColonyHook on BNB Chain

Uniswap v4 Hook Contract 0x5cf7e335d984d7544b8334fd98b5605da8e1e0cc on BNB Chain · Fee sharing · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
2
Swaps (24h)
21 (9 traders)
Total swaps
21

What it does

Colony pools charge a creator-set trading tax of 1% to 5% on every swap that involves the MARS quote asset, split 20% to the flywheel, 20% to the treasury, and the rest between token holders and the creator as the creator chose at launch.

How it works step by step

  • Charges a creator-chosen trading tax between 1% and 5% on swaps of registered Colony tokens against the MARS quote asset, taken via return deltas in beforeSwap (exact-in and exact-out) and afterSwap (cases where the quote is unspecified).
  • Splits each collected tax: 20% to a flywheel address, 20% to a treasury address, and the remaining 80% divided by the creator-set holderBps between token holders (transferred to the token and announced via notify()) and the creator's claimable balance.
  • Enforces that each pool's currencies are MARS plus a registered token, rejecting initialization from any sender other than the factory.
  • Tracks platform, treasury and creator balances in storage and lets anyone trigger payouts to the fixed flywheel, treasury and creator addresses.
Swap behaviour
On every swap of a registered Colony pool, the hook takes a tax denominated in MARS: on exact-in swaps where MARS is the input and on exact-out swaps where MARS is the output it takes the tax in beforeSwap; in the other direction it takes the tax from the afterSwap delta. Buyers and sellers of the token therefore both pay the tax whenever the MARS side is involved; the tax is a fixed percentage per token (1% to 5%) set at registration. Swaps that carry no MARS on the specified side are charged on the unspecified side in afterSwap.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
The pool's LP fee is fixed at 0; the only fee is the creator-chosen trading tax (taxBps, 1% to 5%) taken by the hook. Of that tax, 20% goes to the flywheel, 20% to the treasury, and the remaining 80% is split by holderBps between token holders and the creator. Fee parameters are immutable after registration.
Owner & admin controls
The owner can only set the factory, flywheel and treasury addresses once each (first call only) and can renounce ownership. There is no pause, no parameter change, no upgrade mechanism and no way to alter tax rates or split percentages after deployment. Creators can change the address that receives their creator payout via setCreator. Anyone can trigger claimCreator, claimPlatform and claimTreasury, which pay only to the fixed or creator-chosen recipients.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: validates that pool initialization comes from the factory and that the pool contains a registered token. beforeSwap: takes the tax in MARS and returns a specified-currency delta when MARS is the specified currency. afterSwap: takes the tax from the unspecified currency and returns it as an unspecified delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take tokens from swaps through returned deltas.

Security & trust assessment

Risk level: low (verified source, high confidence).

Who controls it: The owner has no ongoing power over pools or user funds after one-time setup; renouncing ownership removes even that. Creators control only the payout recipient for their own share.

Risk to user funds: The hook holds MARS transiently during swaps and can hold residual balances of the tax it routes; it does not custody or block user principal. Taxes are sent out in the same transaction (holder share) or accrued to fixed or creator-set recipients and paid out by permissionless functions.

Security findings

  • [info] Hook takes tokens via return deltas: beforeSwap and afterSwap take MARS from the pool manager and return deltas that charge swappers up to 5% of the swap amount; this is the intended tax mechanism but means swappers pay the tax on every affected trade.
  • [info] Immutable fee parameters: Tax rates, holder share and split percentages are set in registerToken and have no setter, so they cannot be changed after launch.
  • [low] Holder transfer and notify call to token: _distribute transfers MARS to the token contract and calls notify() on it; a malicious or buggy token could make notify revert and block swaps for that pool, though the token address is set by the factory.
  • [info] One-time owner setup: Factory, flywheel and treasury are set once by the owner; if the owner sets an incorrect address before renouncing, the destination cannot be corrected.

Contract details

Verified source
Yes (ColonyHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
5,827 bytes
Upgradeable proxy
No
Detected patterns
erc20, moves-currency, ownable, return-delta, tax

Pools using ColonyHook