02 · The hooks
Match chest
Anyone can deposit launch tokens. Buys are matched from that chest until it is empty.
Match chest adds tokens on top of a buy. The extra tokens belong to the hook. They are not taken from the pool.
What a trader sees
Anyone can deposit launch tokens into the chest. On a buy, the trader receives an extra slice of those tokens, up to the match you set, and up to whatever is left. A buyback's trader is the buyback hook, and that hook forwards the slice to the sink. An empty chest does not block the buy. A sell is not matched.
The match is 100% and the chest holds 10 tokens. A buy that receives 0.4 launch tokens from the pool also receives 0.4 from the chest. The chest then holds 9.6.
The depositor approves this contract. A fee-on-transfer token is rejected, because the chest counts what actually arrived.
NextBlock quotaEvery buyer in a block shares one quote budget. The next block starts full.