chapters· Manage a program
23 · Build & manage

Manage your program

Edit the split, arm the auto-harvest, open the harvest, move or freeze the roles.

A program's rules live in one struct, editable by the operator and validated at write-time. Everything here can also be done from the app's settings box — this chapter is what each lever actually does.

The config struct

ProgramConfig — WAD shares, 1e18 = 100%
struct ProgramConfig { uint64 buybackShareWad; // secondary side → the pool's pot uint64 burnShareWad; // main side → the burn cascade uint64 compoundShareWad; // BOTH sides → the LP budget uint64 potCompoundShareWad; // buyback split: pot output → the carry uint64 potBurnShareWad; // buyback split: pot output → the cascade bool publicHarvest; // open harvest(key) to anyone address secondaryRecipient; // gets: gross − compound − buyback address mainRecipient; // gets: gross − compound − burn uint256 minMain; // auto-harvest trigger (max = disarmed) uint256 minSecondary; }

The validation, spelled out

rulewhy
compound + buyback ≤ 100% and compound + burn ≤ 100%each side's shares must fit in its own gross
burnShareWad == 0 when main is nativethe network token cannot be burned
potCompound + potBurn ≤ 100%, and potBurn == 0 on a native mainthe buyback split carves the pot's output — same laws, applied to what the pot buys
a live recipient behind every leg that can carry valuea side summing below 100% has a remainder — value never goes nowhere
edits shape FUTURE harvests onlynothing already harvested or carried is re-touched; the standing carry keeps retrying under the new rules

Proven configurations

plain LP

a normal position; harvest manually, keep everything.

  • · compound 0% · buyback 0% · burn 0%
  • · recipients = you
  • · auto-harvest disarmed
growth engine

fees deepen liquidity and fuel the pot automatically.

  • · compound 50%
  • · buyback 50% (secondary side)
  • · auto-harvest armed
deflationary

the main side burns, the secondary side fuels defense.

  • · compound 30%
  • · buyback 40% (sec) · burn 70% (main)
  • · recipients = treasury
trustless lock

surrendered at birth: locked LP, frozen rules, public machine.

  • · owner = 0x0 at creation
  • · harvest forced public
  • · nobody can ever edit anything

Moving the roles

// operator: hand the settings to a DAO, a multisig — or freeze them hook.setProgramOperator(poolId, newOperator); // 0x0 = frozen forever // owner: hand the property to a locker, a vault — or lock it hook.transferProgramOwnership(poolId, newOwner); // 0x0 = locked forever + public harvest
surrender is one-way

There is deliberately no way back from address(0) on either role. Freezing the rules does not lock the liquidity, and locking the liquidity does not freeze the rules — decide each on its own.

Moving the pot's recipient

Separate from the program entirely: the pot admin moves where bought/absorbed main goes with setRecipient(poolId, recipient) — to a treasury, a rewards contract, or address(0) for burn (ERC20 main only). Anything parked from a refused delivery pays the current recipient when retried.

FAQ

Which settings can I edit after launch?+

Everything in ProgramConfig: both sides' fee shares, the buyback split, both recipients and the harvest minimums — via the operator's setProgramConfig. The pool itself (tokens, fee tier, hook) is fixed.

How do I arm or disarm the auto-harvest?+

Set minMain/minSecondary: real values arm the in-swap harvest at those floors; type(uint256).max disarms it, leaving only the manual harvest(key) path.

How do I hand the program to a multisig or DAO?+

Transfer the owner and/or operator to the contract's address — each role moves independently, so you can give a DAO the settings while a locker holds the property.

What can the pot admin change?+

Only the pot recipient (where the buyback split's remainder goes, 0x0 = burn) — and only while the main isn't native for a burn target. The admin has no power over anyone's funds.

How do I read my program's health?+

programOf(id) shows the position, shares and carry; potOf(id) the war chest; owedOf/parkedOf/heldOf the ledgers; quotePump/quoteShield the live defense. All views, all free.