Skip to content

Commit

Permalink
DIP-7, 8
Browse files Browse the repository at this point in the history
  • Loading branch information
aurexav committed Sep 19, 2024
1 parent a60cfde commit 587c8cf
Show file tree
Hide file tree
Showing 8 changed files with 144 additions and 10 deletions.
4 changes: 2 additions & 2 deletions DIPs/dip-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dip: 0
title: Staking Power Specification
authors: Darwinia Network (@AurevoirXavier, @hackfisher)
discussions-to: None
relate-to: DIP-5
relate-to: [DIP-5](dip-5.md)
status: Superseded
type: Economic
created: 2023-11-28
Expand All @@ -13,7 +13,7 @@ created: 2023-11-28

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!! Replaced by [DIP-5](dip-5.md) !!!
!!! Superseded by [DIP-5](dip-5.md) !!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Expand Down
4 changes: 2 additions & 2 deletions DIPs/dip-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dip: 1
title: Staking Commission Specification
authors: Darwinia Network (@AurevoirXavier, @hackfisher, @hujw77, @xiaoch05)
discussions-to: https://github.com/orgs/darwinia-network/discussions/1238, https://github.com/orgs/darwinia-network/discussions/1272
relate-to: DIP-6
relate-to: [DIP-6](dip-6.md)
status: Superseded
type: Economic
created: 2023-11-27
Expand All @@ -13,7 +13,7 @@ created: 2023-11-27

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!! Replaced by [DIP-6](dip-6.md) !!!
!!! Superseded by [DIP-6](dip-6.md) !!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Expand Down
103 changes: 103 additions & 0 deletions DIPs/dip-4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
dip: 4
title: Governance V2
authors: Darwinia Network (@AurevoirXavier)
discussions-to: None
relate-to: [DIP-8](dip-8.md)
status: Final
type: Governance
created: 2024-09-18
---

# DIP-4

## Abstract

This DIP proposes the introduction of GovernanceV2, also known as OpenGov, to the Darwinia Network.

For more information, please refer to the official OpenGov [wiki](https://wiki.polkadot.network/docs/learn-polkadot-opengov).

## Rationale

**In V1:**
- Only one proposal could be voted on at a time, which is inconvenient for a community-driven project like the Darwinia Network. A more flexible governance system is needed to support multiple simultaneous proposals.
- The council holds excessive power in the governance process. A more decentralized governance system is required to enhance community involvement in decision-making.
- The technical committee has limited functionality within the current governance framework. A more comprehensive governance system is necessary to increase the technical committee's effectiveness.

**With V2:**
- Multiple proposals across different tracks can be voted on simultaneously, enhancing the efficiency and flexibility of the governance process.
- The introduction of tracks allows for more granular control over pass requirements.
- The council can be removed, and its responsibilities delegated to different tracks, thereby ensuring a more decentralized governance structure.
- The technical committee can function similarly to a fellowship within Polkadot, enabling it to whitelist proposals and expedite the governance process.

## Specification

Seven tracks will be configured for the Darwinia Network.

The first one is `Root`, which remains essentially the same as in V1. Every passed proposal will be executed with the root origin.

The remaining tracks are defined as follows:

```rs
pub enum Origin {
/// Origin able to dispatch a whitelisted call.
WhitelistedCaller,
/// General admin
GeneralAdmin,
/// Origin able to cancel referenda.
ReferendumCanceller,
/// Origin able to kill referenda.
ReferendumKiller,
/// Origin able to spend up to 4M RING from the treasury at once.
MediumSpender,
/// Origin able to spend up to 20M RING from the treasury at once.
BigSpender,
}
```

The specific spending limits are implemented through the following code:

```rs
macro_rules! decl_ensure {
(
$vis:vis type $name:ident: EnsureOrigin<Success = $success_type:ty> {
$( $item:ident = $success:expr, )*
}
) => {
$vis struct $name;
impl<O: Into<Result<Origin, O>> + From<Origin>>
EnsureOrigin<O> for $name
{
type Success = $success_type;
fn try_origin(o: O) -> Result<Self::Success, O> {
o.into().and_then(|o| match o {
$(
Origin::$item => Ok($success),
)*
r => Err(O::from(r)),
})
}
#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<O, ()> {
// By convention the more privileged origins go later, so for greatest chance
// of success, we want the last one.
let _result: Result<O, ()> = Err(());
$(
let _result: Result<O, ()> = Ok(O::from(Origin::$item));
)*
_result
}
}
}
}
decl_ensure! {
pub type Spender: EnsureOrigin<Success = Balance> {
MediumSpender = 4_000_000 * UNIT,
BigSpender = 20_000_000 * UNIT,
}
}
```

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
2 changes: 1 addition & 1 deletion DIPs/dip-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dip: 5
title: KTON Staking
authors: Darwinia Network (@AurevoirXavier, @hackfisher, @hujw77)
discussions-to: https://github.com/orgs/darwinia-network/discussions/1393
relate-to: DIP-0
relate-to: [DIP-0](dip-0.md)
status: Final
type: Economic
created: 2024-01-29
Expand Down
6 changes: 3 additions & 3 deletions DIPs/dip-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dip: 6
title: Flexible and Secure Staking System
authors: Darwinia Network (@AurevoirXavier, @hackfisher)
discussions-to: https://github.com/orgs/darwinia-network/discussions/1455
relate-to: DIP-7
relate-to: [DIP-7](dip-7.md)
status: Superseded
type: Economic
created: 2024-04-10
Expand All @@ -13,7 +13,7 @@ created: 2024-04-10

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!! Replaced by [DIP-7](dip-7.md) !!!
!!! Superseded by [DIP-7](dip-7.md) !!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Expand All @@ -27,7 +27,7 @@ Restrict the rate of entry and exit in collator staking while eliminating the un
security is upheld by validators on the relaychain side. Collators are solely responsible for block collection;
therefore, the original mechanism for maintaining network security should be updated accordingly.
2. Currently, there is no staking slash mechanism in place, rendering the unbonding duration largely irrelevant.
This should be replaced by a different mechanism. However, should a staking slashing mechanism be implemented in the future,
This should be superseded by a different mechanism. However, should a staking slashing mechanism be implemented in the future,
reintroduction of the unbonding duration should be reconsidered.
3. Introducing a rate-limited mechanism can mitigate potential instability in token prices affecting network stability
if the unbonding duration is removed. Other factors also play a role. Similar mechanisms are employed by Ethereum to maintain network stability.
Expand Down
2 changes: 1 addition & 1 deletion DIPs/dip-7.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dip: 7
title: EVM Staking
authors: Darwinia Network (@AurevoirXavier, @hackfisher, @hujw77)
discussions-to: https://github.com/orgs/darwinia-network/discussions/1481
relate-to: DIP-6
relate-to: [DIP-6](dip-6.md)
status: Final
type: Core
created: 2024-06-30
Expand Down
31 changes: 31 additions & 0 deletions DIPs/dip-8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
dip: 8
title: Governance V3
authors: Darwinia Network (@AurevoirXavier, @hujw77, @HackFisher)
discussions-to: None
relate-to: [DIP-4](dip-4.md)
status: Approved
type: Governance
created: 2024-09-18
---

# DIP-8

## Abstract

This DIP aims to enhance the flexibility and efficiency of Darwinia Network's governance. Since the Darwinia Network is based on the EVM, and OpenGov was designed for Polkadot, it is not ideally suited for Darwinia Network's specific requirements.

## Rationale

The objectives of this DIP are as follows:

- **Improve User Experience:** Allow users to vote directly using EVM-compatible wallets without the need to interact with Polkadot.js.
- **Enable Staking Tokens for Voting:** Permit the use of general staking tokens for voting. In the current OpenGov system, the Polkadot SDK's account balance lock model does not allow these tokens to be utilized for voting.

## Specification

TODO.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Each DIP goes through several stages during its lifecycle. Below are the common
- **Final**: The DIP has been merged and the necessary engineering work has been completed.
- **Deferred**: The DIP has been postponed for future consideration.
- **Rejected**: The DIP has been rejected and will not be implemented.
- **Superseded**: The DIP has been replaced by a newer DIP.
- **Superseded**: The DIP has been superseded by a newer DIP.
- **Deprecated**: The DIP is no longer relevant and has been marked as deprecated.

The status of a DIP is updated as it moves through the proposal process, ensuring clear communication of its current state.
Expand Down

0 comments on commit 587c8cf

Please sign in to comment.