Restaking
When restaking on Overload, we mainly focus on the many-to-many model for the first rollout. To read more about the trade-offs and rationale about the chosen approach, we refer to the previous section at Many-to-many.
Mechanics
Non-slashable
When a user delegates their tokens to a validator inside a consensus contract, they cannot be slashed. This is a feature in which we deem is inherent to deploying a many-to-many model in production. Due to the exponential edges in a many-to-many model, it's unfeasible to slash a user when validators get slash, but we believe this to be a non-issue in cases where consensus is reached onchain.
In turn, unslashability becomes feature and not a bug. It reduces uncertainties when restaking as the rug-risk will decrease when cannot be drained, even in scenarios where the consensus contract has bugs or is a honey pot. From this, we think it's possible that this can see an uptick in appetite to restake, especially for newly deployed contracts/projects.
Restake and Unstake
A user can only restake to one validater per consensus contract, and this simplifies the implementation, as well as logic.
The balance unlock and locked is calculated from the max restaked amount to all the validators. In other words:
balance_locked = max(R_1, R_2, ..., R_n)
balance_unlocked = balance_total - balance_locked
where R_i
is each restaked amount for each unique (consensus, validator)
pair.
Note that when tokens are restaked to a validator, only the balance_unlocked
is available for withdrawal. The balance_locked
amount needs to first be fully unstaked across all validators, until withdrawal of the asset is possible again.
To prevent restaking-infinity-freezes where a consensus contract enforces a type(uint256).max
cooldown time for unstaking (effectively bricking your tokens), we set a maximum cooldown time of 1 month = 2,629,746 seconds
in the core contract. In other words, if a user restakes to a honey pot, the worst case scenario is a max wait time of 1 month
until they fully unstake from a (consensus, validator)
pair.