changed 4 years ago
Linked with GitHub

UBIKchain: Build plan

The following details UBIK's plan to build and maintain a blockchain for governing the UBIK NGO.

Development teams involved:

UBIKchain parameters and time units

Parameter Value
Slot 6s
Epoch 4h (~2400 slots)
Session 4h (~2400 slots)
Era 24h (~14400 slots)
Democracy Time Slots Description
Voting period 10 days 144000 How long the public can vote on a referendum.
Launch period 10 days 144000 How long the public can select which proposal to hold a referendum on, i.e., every week, the highest-weighted proposal will be selected to have a referendum.
Enactment period 10 days 144000 Time it takes for a successful referendum to be implemented on the network.
Council (Board) Time Slots Description
Term duration 365 days 5'256'000 The length of a council member's term until the next election round.
Voting period 5 days 72000 The council's voting period for motions.
Technical committee Time Slots Description
Cool-off period 7 days 100,800 The time a veto from the technical committee lasts before the proposal can be submitted again.
Emergency voting period 3 hours 1,800 The voting period after the technical committee expedites voting.

UBIKchain details

The UBIKchain blockchain is a Substrate-based blockchain used by UBIK.hr, Croatia's self-regulating NGO for blockchain education and adoption.

The chain contains several ready-to-use FRAME pallets, and several custom built ones. The following list details them all:

  • Balances for a native cryptocurency (UBIK tokens) and balance tracking / transfers.
  • Identity to register member and board member identities on-chain.
  • Utility for batch transactions (batchAll).
  • Treasury for collecting fees and voting on UBIK token distribution to UBIK members based on certain criteria.
  • Aura for sequential PoA block production.
  • AuraPay for rewarding Aura authorities for block production.
  • Collective + Democracy for the NGO's Board.
  • Polls for voting on topics and questions as put forth by the NGO's members and Board.
  • MultiVesting, a modified version of the Vesting pallet designed to gradually release funds but to also allow multiple vesting schedules per accounts (the original only supports one vesting entry per address).

The purpose of the chain is to track member involvement and "reputation" through on-chain and off-chain actions (subjective judgement by Board members), and to reward good behavior.

The following section details each pallet separately for additional context, with links to individual pallet source code. Feel free to skip to the Development Timeline to view the milestones.

Balances + MultiVesting + Utility

Parameter Value
Token UBIK
Decimals 10

The Balances pallet adds basic cryptocurrency functionality to a blockchain: sending, receiving, transfers, and balances.

The base currency of the chain is called UBIK with each whole unit consisting of 1e10 Planck (smallest possible unit), like in Polkadot's DOT.

MultiVesting builds on the Vesting pallet and allows multiple vesting balances with different schedules on a single address. The original Vesting pallet only supports a single vesting balance on an account which, while circumventable with multiple addresses per use, doesn't work hand-in-hand with projects that need a high degree of Sybil resistance. In MultiVesting, a single vest call will unlock the vested funds from all balances. Alternatively, the Vesting pallet might be upgraded to support this natively: https://github.com/paritytech/substrate/pull/7699

The Utility pallet is used to add batchAll functionality into the chain, allowing the submission of several extrinsics with just a single signature. batchAll is atomic (as opposed to its non-atomic cousin batch) which means all transactions in a batch will either succeed or fail.

These three pallets together allow the distribution of funds in a vested manner at scale. This is helpful when distributing rewards for off-chain activity, or paying out tokens to new members who join. The idea is to give out some amount of vested tokens to new joinees and vest for 1 year with a linear unlock. This results in a full unlock of the membership balance after a year, encouraging renewal.

Identity

Param Value
Identity deposit 0.1 UBIK
Per-field deposit 0.01 UBIK
Sub-accounts deposit 0.01 UBIK

The Identity pallet allows users to register their real-world identity on-chain (name, email address, social media handle). The registration of an identity requires a deposit, and each additional field besides the basic ones requires an additional deposit. Deposited funds can be used for Polls and Democracy.

The pallet also allows registration of sub-identities. This makes it possible to define child accounts of a main account, useful for members of the NGO who are companies and would like to define their employee members this way.

Every NGO member will have to register their identity on-chain and the registrar will be the Board (Council). A registrar can verify an identity, sealing its legitimacy and preventing impersonation. This adds full transparency to voting procedures, and helps with distribution of funds. Those who will want to join the pool of Authorities and maintain the network by being block producers will have to have verified identities on-chain.

Treasury

Parameter Value Description
Spend period 432000 slots (~30 days) Period of time after which a burn is applied to unspent funds.
Burn amount 0% Percentage of unspent treasury funds to burn.
Proposal deposit 1 UBIK or 5%, whichever is greater Deposit needed to create a Treasury Spend proposal. Refunded if proposal passes, burned otherwise.
Proposal approval threshold 2/3 Ratio of Council aye vs nay required to pass a treasury proposal
Proposal rejection threshold 1/2 Ratio of Council aye vs nay required to kill a treasury proposal

The Treasury pallet offers an on-chain account for collecting funds through fees and block rewards.

Every interaction with the chain has a price which varies depending on the byte-size of the extrinsic and the submitted transaction, and the complexity of the operation in terms of CPU cycles. This expense (the transaction fee or tx fee) is sent into the on-chain Treasury.

Once a month, the Council will perform a distribution of gathered funds to NGO members:

  • 50% to block producers
  • 15% to members based on on-chain activity (voting in polls, voting on referenda, submitting proposals)
  • 35% to members based on off-chain activity (open source engagement, meetups, webinars, documentation, media presence, member recruitment)

Likewise, any direct donation to the NGO will immediately result in a Council-initiated mint of an amount of UBIK tokens matching 10% of the deposited amount in HRK for public and 20% for private entities. E.g., a donation of 200 HRK would net 20 UBIK tokens for a company, or 40 UBIK for a private person member. The amount would be immediately unlocked and spendable.

Every member can submit a spending proposal to the Treasury with a specific address as the beneficiary. A deposit is needed to propose a spend. Only the Council votes on treasury proposals. Rejected proposals lose their deposit (it is burned).

Every member can also submit a tip. Tips are like smaller proposals for specific actions on or off-chain. Tip value is decided based on the median value of all Council members who endorsed the tip with a certain amount. Tipping is implemented through a separate sub-pallet of Treasury - pallet-tips.

Aura + Aurora

Parameter Value Description
Block reward 1 UBIK
Treasury allocation 80% Percentage of block reward going into the treasury.

The Aura pallet is Proof-of-Authority consensus for Substrate nodes. It allows a set of whitelisted entities to round-robin through block production. By default, Aura does not provide block rewards. Aurora is an extension for Aura which adds a block reward for the block producers and optionally deposits a fraction of it into the treasury. Aurora might be based on Kulupu's Rewards pallet or this PR.

The idea is to allow every member of the NGO to also support the network by being a block producer, and earn reputation and voting rights that way.

Collective + Democracy

Parameter Value Description
Council motion approval ratio 2/3 Ratio of Council members who need to support a motion for it to become a referendum or an accepted Treasury proposal
Council motion rejection ratio 1/2 Ratio of Council members who need to reject a motion to shoot it down

The Collective pallet enables the creation of on-chain groups of addresses acting as one.

The Democracy pallet enables governance, where certain bodies have the authority to do certain actions on-chain, specifically, to enact forkless runtime upgrades and other changes.

A combination of Collective and Democracy thus allows us to:

  1. Define a Council (also known as Board) who can:
    • create Motions
    • approve Treasury proposals and tips
    • veto a referendum / motion
  2. Define a Technical Committe (composed of teams contributing to UBIKchain development) who can:
    • expedite a proposal or motion, useful for hotfixes

Polls

The Polls pallet is designed to facilitate member voting on NGO matters in the "real world". For example, if the NGO needs to reach a decision on funding an event, the memebers could be asked to approve the decision. The polls pallet allows them to do this with certain caveats:

  • unvested tokens cannot vote. The polls pallet looks at unlocked / vested balances only when considering a user's voting power. This is an optional dependency, but added into UBIKchain for balanced voting when considering donations to the NGO and membership allocations of tokens.
  • users without identities cannot vote. This is an optional dependency, but added into UBIKchain for Sybil resistance.
  • unlike with democracy, there is no conviction voting with polls. Instead, poll use quadratic voting to prevent whale domination. This setting can be disabled and changed to one-person-one-vote, but given that UBIK tokens directly correspond to voting power, it is enabled in UBIKchain.
  • voting on the polls is free, as in, it incurs no transaction fee. Identity verification is good enough as a Sybil attack and spam protection.

Development Timeline

The milestones below are estimated to last a maximum of six months, two months per milestone.

Milestone 0: Basic Chain

The first iteration of the chain is one with Identity, Utility, Vesting, Treasury, Collective, Democracy, Sudo, and Aura.

The NGO's board will be registered as an immutable Council and the Council will be the first Identity Registrar.

Milestone 1: Chain and Aurora

In milestone 1, the aim is to have at least 5 block producers in the Aura set. These block producers will be rewarded by Aurora, the BP reward mechanism described above.

Milestone 2: Polls and Multivesting

In milestone 2, we plan to have the Polls pallet developed and active, giving members with identities the ability to cast votes on real-world decisions the NGO has to make. We will also have the ability to issue tokens on already vested balances, allowing for multi-vesting.

The multi-vested balances can vote on referenda, but cannot participate in Polls.

Polls require users to have identities registered and verified on chain. Quadratic voting will have been implemented.

Milestone 3: UI and Forum integration, Sudo removal via referendum

During the third milestone we will build a simple-to-use Polling UI for non-technical users, and integrate the chain with our forum, allowing not only token transfers through the forum, but also auto-creation of topics based on new treasury proposals, tips, polls, and referendums on-chain to facilitate off-chain discussion with an on-chain integration.

The first referendum will be the removal of the Sudo module.

tags: ubik
Select a repo