Every buy adds wax. Keep the flame. The last stretch takes the pot.
A candle is lit on chain and burns down one block at a time. Every buy of $CANDLE adds
wax and pushes the end back; selling adds nothing. A toll on every swap fills the pot, and when
nobody buys and the flame goes out, the pot goes to everyone who bought in the last stretch,
in proportion. Not to the last buyer: to the last stretch. Then a new candle is lit, with part
of the pot rolling in.
Tap the candle to add a ball of wax, or use the buttons · B buys, S sells
burning · 20 blocksone block at a time
wick · blocks20pot0burned0candle1
The register
The last stretch is the last blocks before the flame goes out.
The candle is lit. Buy to add a ball of wax, sell to see that nothing moves.
This runs the rule on its own numbers; the real ones are set at deploy.
How it works
Four rules, and the whole game is in the fourth.
01
It burns in blocks
The wick is a block counter. Every block the chain reads takes one off it, and the candle gets one block shorter. When the counter reaches zero, the flame goes out. No clock and no timestamp: the candle counts blocks, and anyone can read how many are left.
02
Every buy adds wax
A qualified buy of $CANDLE adds a fixed number of blocks to the wick, up to a maximum length the candle can never pass. A buy under the minimum pays the toll and adds nothing. A sell adds nothing either: selling never touches the wick.
03
Every swap pays the toll
The hook takes the same fixed share of every swap in the pool, buy or sell, in the quote asset. Part of it burns; the rest fills the pot of the candle that is burning. Nobody can take anything out of the pot before the flame dies, not even us.
04
The last stretch takes the pot
When the flame goes out, the pot, less the share that rolls, goes to everyone who bought in the last K blocks, in proportion to what they bought. Not to the last buyer: to the last stretch. Then a new candle is lit, with the rolled share already in its pot.
The law of the candle
Six things the contracts hold to, whatever happens.
I1
The pot opens at extinction only, when the wick reaches zero, and on nothing else.
I2
Only a qualified buy changes the wick, and never beyond the maximum length.
I3
A sell never changes the wick.
I4
What is paid at extinction, plus the share that rolls, equals the pot, with nothing kept back.
I5
The split covers exactly the qualified buys of the last K blocks, in proportion, with no bonus for the last one.
I6
The toll is the same for everyone, at every moment of a candle.
Every number is fixed at deployment and published on the law page. The team keeps nothing.