Buy → absorption
A buy through the hook is matched against open covenants first, at a discount, and only then against the pool. Buyers are the counterparty that "forgives" an exit — and they are paid a discount for it.
How matching works
- Tax first. The 3% ETH tax is taken and accrued to the creator.
- Absorb FIFO. The hook walks the covenant queue from the head (oldest first) and fills your buy against open covenants at each covenant's frozen discount. The CVN you receive for that portion is priced 5–20% below the covenant's reference price.
- Then the pool. Once the queue is empty (or your ETH is spent), any remaining ETH runs as a normal pool swap at market price.
If there are no open covenants, your buy is simply a plain pool swap — the hook just took the tax.
The discount, and why it moves
The absorption discount scales with covenant stress:
- Base discount: 5% (
BASE_DISCOUNT_BPS = 500) — the floor, applied when there is little open debt. - Max discount: 20% (
MAX_DISCOUNT_BPS = 2000) — the cap, applied under heavy covenant stress.
More outstanding exit debt means a larger discount, which makes absorbing it more attractive. The market self-corrects: when exits pile up, the reward for stepping in rises.
Each covenant's discount was frozen when it was created, so what you pay is deterministic and visible before you trade.
Absorption accounting
Absorption is accounting done by the queue; the actual token
delivery and ETH intake are performed by the hook via the PoolManager. When a covenant is filled
completely it emits CovenantFullyAbsorbed; partial fills emit CovenantAbsorbed with the amounts.
The ETH a buyer pays into a covenant is booked to the protocol reserve, where it later pairs with
expiring debt to seed locked liquidity.