Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treasury support KTON Proposal #306

Merged
merged 19 commits into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .maintain/ci/travis.local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
readonly TEST_CRATES=(
'kton'
'ring'
'staking'
'treasury'
);

function main() {
cargo build

for crate in ${TEST_CRATES[@]}
do
cargo test -p "darwinia-$crate"
done
}

main
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
env: RUST_TOOLCHAIN=nightly-2020-02-07 TARGET=native STAKING
script: .maintain/ci/darwinia_test_script.sh staking

- stage: Darwinia Test
env: RUST_TOOLCHAIN=nightly-2020-02-07 TARGET=native STAKING
script: .maintain/ci/darwinia_test_script.sh treasury

# TODO: remove this when overall test case ready
allow_failures:
- stage: Overall Test
Expand Down
6 changes: 4 additions & 2 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,11 @@ impl pallet_treasury::Trait for Runtime {
type ApproveOrigin = pallet_collective::EnsureMembers<_4, AccountId, CouncilCollective>;
type RejectOrigin = pallet_collective::EnsureMembers<_2, AccountId, CouncilCollective>;
type Event = Event;
type ProposalRejection = ();
type KtonProposalRejection = ();
type RingProposalRejection = ();
type ProposalBond = ProposalBond;
type ProposalBondMinimum = ProposalBondMinimum;
type RingProposalBondMinimum = ();
type KtonProposalBondMinimum = ();
clearloop marked this conversation as resolved.
Show resolved Hide resolved
type SpendPeriod = SpendPeriod;
type Burn = Burn;
}
Expand Down
9 changes: 9 additions & 0 deletions frame/balances/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Balances

Balances currently contains **RING** and **KTON**.

**RING** is system token of Darwinia Network, the initial supply before Darwinia network mainnet release is 2 billion.

**KTON** is the staking and governance credential of Darwinia Network, KTON can **only obtained by locking RING**, the initial supply is 0.

At present, some **RING** and **KTON** exist in the Ethereum network and the Tron network in the form of **ERC-20** and **TRC-20**. These TOKENs will be transferred to the Darwinia main network by 1:1 cross-chain conversion after the Darwinia main online.
31 changes: 31 additions & 0 deletions frame/balances/kton/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Kton

To encourage users to make long term commitments and pledge, users can choose to lock RING for 3 - 36 months in the process of Staking, and the system will offer a KTON token as reward for users participating in Staking. During the committed pledge period, users can not unlock their RING. (Unless pay triple amounts of KTON as penalty)

As a result, during RING staking process, user can choose to **lock RING for a period to receive KTON**. The initial supply amount of KTON should be zero, yet before Darwinia Mainnet launch, some users have already started locking their RING in Evolution Land, so there will be some KTON supply at the time of mainnet launch. The earliest design to obtain the KTON by locking the RING appears in the Gringotts of Evolution Land. The related introduction can refer to the Gringotts KTON model [5].

KTON can be pledged to receive Staking power, so as to participate POS mining as well. User may Staking via pledge KTON, if user take back their staking KTON, then related POS mining is stopped, and it takes 14 days for unpledged KTON to arrive.

## FAQ

### What is Kton?

**KTON** is the staking and governance credential of Darwinia Network, KTON can **only obtained by locking RING**, the initial supply is 0.

### Where Kton from?

Users can choose to lock RING for 3 - 36 months in the process of Staking, and the system will offer a KTON token as reward for users participating in Staking.

### When Kton spends?

1. Transfer to other accounts.

2. Burned by slashed.

### What will happen after slashing?

Slashed token goes to tresure.


---
(5): https://forum.evolution.land/topics/55
3 changes: 3 additions & 0 deletions frame/balances/ring/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# RING

**RING** is system token of Darwinia Network, the initial supply before Darwinia network mainnet release is 2 billion.
Loading