Upgradeability

Upgradeability, in the context of Ducat, is an extension of the Inscription Registries. An inscription registry will manage upgradeability, allowing users to modify the existing pointers by staking their DUCAT governance tokens at one address or another. If the process passes, the MPC network will issue a transaction that updates the Inscription registries, modifying the registry.

Regardless of whether they own DUCAT or UNIT, anyone can submit a governance proposal. The proposal should include:

  1. The new circuit - can be a circuit that works completely differently or modifies some parameters.

  2. The circuit registry - The registry in which the process will be modified.

  3. The circuit ID - The circuit that the new circuit stored in the pointer will be replacing. This can replace an entire flow or just a single element.

  4. The prepared addresses - These addresses will be tap-scripts, which will lock some DUCATs until the end of the proposal. They will either be YES or NO.

  5. The proposal validation block height - when the votes will be counted.

  6. The activation block height - When the replacement of the pointer will happen.

This information will have to exist in the form of an inscription. This inscription will be sent to the MPC network and, if correctly formed, will be included in the governance proposals. The MPC network will check the governance proposals in each block to determine if they have reached the proposal validation block time. Then, again, the MPC network will check the governance proposals to issue the inscription update when the activation block time happens.

The diagram below explains the process:

In this diagram, we should focus on gFlow. Governance Flow(gFlow) describes the three elements that orchestrate the possibility of upgrading flows in Ducat. We have three main functions:

  1. Add - The addProposal circuit will be triggered when anyone tries to submit a governance proposal. It will check that the proposal is well formed, contains all the necessary elements, and points to an inscription.

  2. Count - will look at proposals and determine if they have reached the desired block.

  3. Activate - will look at the activation block height of a PASSED proposal and modify the necessary flows to bring the upgrade live when specified.

In this specific diagram, we can see how the protocol uses the add circuit to include the proposal inside of the governance proposal registry at a later point, determined by the proposal validation block height. The protocol will recount the votes and ensure that the proposal has passed. Finally, at activation block height, the protocol will programmatically replace the pointer of the old contract with the new contract. This will cause all new floes that go through the vLiquidation process to follow the new rules set out by the proposal.

Last updated