Plans and launching
A layer runs on a plan paid in HYPE to the DemiurgeHub on Elysium. The Commons is the one layer with no plan.
#Launching a layer
Launch a layer asks for:
| Field | Rule |
|---|---|
| Name | 1 to 48 bytes. |
| Slug | 2 to 32 characters: lowercase letters, digits, hyphens. Unique. It becomes the RPC path /rpc/<slug>. |
| Block speed | 100, 250 or 500 ms. |
| Gas floor | 0.01, 0.1 or 1 gwei. |
| Plan | 30, 90 or 180 days. |
Launch this layer sends one transaction on Elysium: createLayer(slug, name, blockMs, gasFloorWei, periods) with exactly planPrice × periods in HYPE. The Hub refuses any other amount (Underpaid), a slug already taken (SlugTaken), a slug or name outside the rules (BadSlug, BadName), and every new layer while the owner has paused launches (Paused). The layer gets its id and chain id in that transaction, and paidUntil is set to now plus 30 days per period.
None of these settings can be changed later. See What a layer is for what each one does.
#Price
planPrice is 2 HYPE per 30-day period today. The Hub owner can change it, to any value above zero and at most 20 HYPE (MAX_PLAN_PRICE, a constant). The launch page reads the current price from the Hub, and a payment always uses the price at the moment it is made.
#After you pay
- The Hub emits
LayerRequestedwith everything the operator needs. - Within 20 seconds the operator's worker sees the new layer and runs its steps: it funds the batch poster and validator, stakes the validator's 0.01 WHYPE, creates the rollup on Elysium, records it on the Hub and boots the node. The full list is on What a layer is.
- Your layer page says Starting until the node answers on the gateway, then Live.
#Where the money goes
#The provisioning float
Each payment first sends provisionFloat to the operator key: 0.1 HYPE today, at most 0.25 HYPE (MAX_FLOAT, a constant). It is taken once per payment, not per period, so a 90-day launch pays one float. It covers the layer's running costs on Elysium: the batch poster's and validator's gas, the validator's 0.01 WHYPE base stake and the createRollup transaction. If a payment is smaller than the float, all of it is the float. If the transfer to the operator fails, the float goes to the treasury instead.
#The hold until the rollup is recorded
Before a layer's rollup is recorded for the first time, the rest of each payment stays in the Hub (escrowed(layerId)), and the Hub remembers how much each payer put in (paidInto(layerId, payer)).
The operator records the rollup with registerRollup. The Hub checks the record against the rollup's own getters before accepting it:
- the rollup's
chainId()must equal the layer's chain id; - its
bridge(),inbox(),sequencerInbox()andoutbox()must equal the recorded addresses; - the Bridge's
rollup()must point back at the rollup.
Once the record is accepted, the held amount is split. Every later payment to that layer splits at once.
#The split
What remains after the float is split in two:
- Half to stakers. It goes to the stakers earning on this layer, pro rata. If nobody is earning on this layer, it goes to the global stakers' pot, shared by everyone earning on any layer. If nobody is earning anywhere, it goes to the treasury. See Staking $DEMI.
- Half to the treasury. The treasury address was fixed when the Hub was deployed and cannot be changed. If a transfer to it fails, the amount is kept as
treasuryOwedand anyone can send it on withsweepTreasury().
A worked example, for a 2 HYPE payment of one period on a recorded layer with stakers: 0.1 HYPE float, 0.95 HYPE to the layer's stakers, 0.95 HYPE to the treasury.
#Refund if a layer never starts
If no rollup has been recorded 14 days after a layer was requested (DEPLOY_WINDOW), anyone who paid into it can call refund(layerId) and receive what they paid, minus the float. The first refund ends the layer: it can no longer be paid or recorded, and its paid-until date is set to that moment. Every other payer can still take back their own part.
Once a rollup has been recorded, the held money has been split and the refund is closed, even if the record is voided later.
The app has no refund button. Call it from the wallet that paid, for example with Foundry:
cast send 0xC0E368370786629A7F3ECfC5fEae7E7AD64597F2 "refund(uint256)" <layerId> \
--rpc-url https://rpc.elysium.kinetiq.xyz --interactiveescrowed(layerId), paidInto(layerId, payer), requestedAt(layerId) and refunded(layerId) are public, so you can check your position first.
#Voided records
The Hub owner can erase a rollup record during the 48 hours after it is written (RECORD_WINDOW), so that a record planted with a leaked operator key never stands. After 48 hours a record is final. A voided layer can be recorded again by the operator. Money already split stays where it went.
#Renewing a plan
Anyone can extend any paid layer with pay(layerId, periods) and exactly planPrice × periods in HYPE. The new end date counts from the later of the current paid-until date and now, so paying early adds time and paying after the end starts a new period from today. The Commons cannot be paid, nor a refunded layer.
On a paid layer's page, Renew plan opens a short form: pick 30, 90, 180 or 360 days, read the new paid-until date and the total, and pay it from your wallet on Elysium. The page reads the price from the Hub and shows the new date once the payment lands. The same call from the command line:
# read the current price, then add 30 days to a layer
cast call 0xC0E368370786629A7F3ECfC5fEae7E7AD64597F2 "planPrice()(uint256)" \
--rpc-url https://rpc.elysium.kinetiq.xyz
cast send 0xC0E368370786629A7F3ECfC5fEae7E7AD64597F2 "pay(uint256,uint256)" <layerId> 1 \
--value 2ether --rpc-url https://rpc.elysium.kinetiq.xyz --interactiveA layer's id is shown by layerIdBySlug(slug) on the Hub.
#When a plan ends
| When | What happens |
|---|---|
| Paid-until date passes | Nothing changes for 14 days of grace. The node runs, deposits and withdrawals work. |
| 14 days later | The worker stops the layer's node. The RPC answers "this layer is not running". Nothing new is sequenced, posted or asserted. The layer page says Stopped. |
| Someone pays again | On its next pass the worker starts the same node again, from where it stopped. |
While a layer is stopped, its rollup contracts and every batch stay on Elysium, and the node keeps its data. Withdraw before the grace period ends: HYPE deposited into the Inbox of a stopped layer waits in its Bridge until the layer runs again. Security and trust covers what leaving a stopped layer takes.
#The Commons
The Commons was created once by the operator with createCommons. It is free and never expires: its paid-until date is the largest value the Hub can hold, and pay refuses it. It runs at 250 ms with a 0.1 gwei gas floor, and it is the only layer with the gas drip.
Demiurge