Staking $DEMI
$DEMI is the stake behind layers. Staked on a layer, it ranks that layer higher in the gallery and earns that layer's half of every plan payment, in HYPE. $DEMI held without staking earns nothing. Plans, gas and apps never need $DEMI: they are paid in HYPE.
$DEMI is an ERC-20 on Elysium at 0x8bf8388a6512b6dc9675bc964b1298da08c5afbd. Stakes are held by the DemiurgeHub. Its owner pointed it at $DEMI once with setToken, and that can never be changed.
#The rules
| Rule | Value | Where it comes from |
|---|---|---|
| Minimum stake | 10,000 $DEMI per position today | minStake. The owner can set it between 1,000 and 1,000,000 $DEMI. |
| Warmup | 7 days, then activation | WARMUP, a constant. |
| Cooldown | 7 days | COOLDOWN, a constant. |
| Floor after a partial exit | 1,000 $DEMI | MIN_STAKE_FLOOR, a constant. |
| Stakers' share of each plan payment | half of what remains after the float | Hard-coded in the Hub. |
A position is one wallet on one layer. Stakes on different layers are separate positions.
#Staking
On a layer's page, or on Stake, enter an amount and press Stake. The page first asks your wallet to approve the Hub for that amount if needed, then calls stake(layerId, amount).
- The position after the stake, counting what is earning and what is warming, must reach the minimum.
- The new amount is warming: for 7 days it earns nothing and counts nowhere, neither in the layer's rank nor in any pot.
- Adding to a stake that is still warming restarts the 7 days for the whole warming amount.
#Activation
Once the 7 days have passed, the warming amount starts earning when it is activated. Anyone may activate anyone's stake with activate(layerId, user), and the page shows an Activate button when it is due. Your own next stake, unstake request or claim on that layer activates it too.
#What a stake earns
Plan money reaches stakers each time it is split: when a layer's rollup is recorded (the payments held until then) and on every payment after that. See Plans and launching.
- The layer's share. Half of what remains after the float goes to the stakers earning on that layer, pro rata to their earning amounts.
- The global pot. If nobody is earning on the layer that was paid, that half goes to the global stakers' pot instead, shared pro rata by every earning position on every layer.
- The treasury. If nobody is earning anywhere, that half goes to the treasury.
Rewards are paid in HYPE and accrue per position. Claim on a layer's panel calls claim(layerId) and pays everything that position has earned, from its layer and from the global pot. A wallet staking on several layers claims on each.
A worked example: a 2 HYPE payment of one period on a recorded layer with earning stake sends 0.95 HYPE to that layer's stakers. A staker holding a quarter of the layer's earning stake can claim 0.2375 HYPE of it.
#Unstaking
requestUnstake(layerId, amount) stops amount from earning and starts its 7-day cooldown. Warming stake is taken first, then earning stake. What stays must be zero or at least 1,000 $DEMI, and the same holds for the earning part on its own.
When the cooldown ends, withdraw(layerId) returns everything cooling at once. A new unstake request while tokens are cooling restarts the 7 days for the whole cooling amount.
The panel takes an amount: Unstake requests that amount and Unstake all the whole position. It checks the 1,000 $DEMI rule before your wallet opens. The same call from the command line:
cast send 0xC0E368370786629A7F3ECfC5fEae7E7AD64597F2 "requestUnstake(uint256,uint256)" <layerId> 5000000000000000000000 \
--rpc-url https://rpc.elysium.kinetiq.xyz --interactiveThat example takes 5,000 $DEMI (18 decimals) off a position.
#Gallery rank
The gallery orders layers by the $DEMI earning on them, highest first, and shows the rank on each card. Warming stake does not count. The layer page and the Stake page show the earning total of each layer.
#What nobody can do
No function of the Hub lets the owner, the operator or anyone else move staked $DEMI or a staker's accrued HYPE. Staked tokens leave the Hub only through withdraw to the staker, and HYPE rewards only through claim to the staker. The owner cannot change the warmup, the cooldown, the floor or the 50/50 split; within its caps it can change the minimum stake, which applies to new stakes. The full list of owner powers is on Security and trust.
#Reading a position
export HUB=0xC0E368370786629A7F3ECfC5fEae7E7AD64597F2
export ELYSIUM_RPC=https://rpc.elysium.kinetiq.xyz
# earning amount, debts, pending, cooling, cooling end; then claimable HYPE
cast call $HUB "position(uint256,address)((uint256,uint256,uint256,uint256,uint256,uint64),uint256)" <layerId> <you> --rpc-url $ELYSIUM_RPC
# warming amount and the time it can be activated
cast call $HUB "warming(uint256,address)(uint256,uint64)" <layerId> <you> --rpc-url $ELYSIUM_RPC
# a layer's earning total
cast call $HUB "layerStake(uint256)(uint256,uint256)" <layerId> --rpc-url $ELYSIUM_RPC
Demiurge