The purpose of this contract is to bootstrap the security of Mars Hub blockchain.
At launch, Mars Hub will have a genesis validator set of 10–20 members, each having exactly 1 MARS token. The decision was made that each genesis validator only gets 1 token and not more, such that they don't have an unfair advantage over those who join post-genesis. However, this also means that for a brief period after launch, the network will have a very low security (10–20 MARS worth of security, to be specific). If a user is eligible for a big airdrop, they can potentially create a validator with the airdrop tokens right after launch and hijack the network.
To mitigate this risk, the Mars community pool will have a portion of its tokens (~1% of total supply may be a reasonable amount) deposited into this "delegator" contract, which then delegates the tokens evenly to each of the genesis validators. At instantiation, the contract will be given an
ending_time for these delegations. Once the ending time is elapsed, anyone can invoke a method on the contract to unbond these delegations. Once unbonding is completed, anyone can invoke
refund to return all funds to the community pool.
- Contract address:
- Testnet address:
- Contract repo: https://github.com/mars-protocol/periphery/tree/main/contracts/delegator
- Audits: https://github.com/mars-protocol/mars-audits/tree/main/periphery
Instantiates the Delegator contract.
|Denomination of the coin that will be staked
|The ending time for the delegation program, as UNIX timestamp. Once this time has elapsed, anyone can invoke the
unbond method to unbond the delegations. Additionally, Mars Hub governance can decide to prematurely end the delegation program if they see fit, ignoring the ending time, by invoking the
force_unbond sudo message.
Delegate tokens that the contract holds evenly to the current validator set.
Unbond the delegations. Can be invoked by anyone after
ending_time is reached.
Donate all coins held by the contract to the community pool.
Forcibly unbond the delegations.
This "sudo" message can only be invoked by the gov module, and ignores whether the
ending_time has been reached.
Return the contract configuration.