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

Precompile Clean after DIP-7 #101

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 0 additions & 9 deletions docs/build/precompiles/deposit.md

This file was deleted.

8 changes: 1 addition & 7 deletions docs/build/precompiles/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[Precompiles Contracts](https://www.evm.codes/precompiled?fork=shanghai) in Ethereum are built-in contracts that offer specific functionalities. They are implemented within the Ethereum Virtual Machine (EVM) and can be executed by sending a transaction to their unique addresses. Typically, precompiles are utilized for computationally expensive operations like cryptographic functions (e.g., SHA-256, elliptic curve operations) and modular exponentiation. These precompiles are optimized and often more efficient than implementing the same functionalities in Solidity or other smart contract languages.

Darwinia strives to achieve compatibility with Ethereum, which includes being RPC compatible. Additionally, compatibility with Ethereum precompiles is also important. All Darwinia networks have integrated the standard Ethereum precompiles, making it easier for existing Ethereum applications to transition to the Darwinia network without any modifications. In addition to the standard precompiles, Darwinia has also installed other precompiles such as `StateStorage`, `Dispatch`, and `Staking`, considering the unique architecture of Darwinia chains. This chapter will guide you through the design and usage of precompile contracts in Darwinia.
Darwinia strives to achieve compatibility with Ethereum, which includes being RPC compatible. Additionally, compatibility with Ethereum precompiles is also important. All Darwinia networks have integrated the standard Ethereum precompiles, making it easier for existing Ethereum applications to transition to the Darwinia network without any modifications. In addition to the standard precompiles, Darwinia has also installed other precompiles such as `StateStorage`, `Dispatch`. considering the unique architecture of Darwinia chains. This chapter will guide you through the design and usage of precompile contracts in Darwinia.

## Precompiles In Darwinia Networks

Expand All @@ -19,8 +19,6 @@ In the comprehensive Darwinia Ecosystem, each network serves a distinct purpose,
| `0x0000000000000000000000000000000000000402` | [Commitment Token](../precompiles/commitment-token.md) |
| `0x0000000000000000000000000000000000000403` | [USDT](../precompiles/usdt.md) |
| `0x0000000000000000000000000000000000000404` | [PINK](../precompiles/pink.md) |
| `0x0000000000000000000000000000000000000600` | [Deposit](../precompiles/deposit.md) |
| `0x0000000000000000000000000000000000000601` | [Staking](../precompiles/staking.md) |

### Crab Network

Expand All @@ -30,8 +28,6 @@ In the comprehensive Darwinia Ecosystem, each network serves a distinct purpose,
| `0x0000000000000000000000000000000000000400` | [StateStorage](../precompiles/state-storage.md) |
| `0x0000000000000000000000000000000000000401` | [Dispatch](../precompiles/dispatch.md) |
| `0x0000000000000000000000000000000000000402` | [Commitment Token](../precompiles/commitment-token.md) |
| `0x0000000000000000000000000000000000000600` | [Deposit](../precompiles/deposit.md) |
| `0x0000000000000000000000000000000000000601` | [Staking](../precompiles/staking.md) |
| `0x0000000000000000000000000000000000000602` | [Conviction Voting](../precompiles/conviction-voting.md) |

### Koi Testnet
Expand All @@ -43,6 +39,4 @@ In the comprehensive Darwinia Ecosystem, each network serves a distinct purpose,
| `0x0000000000000000000000000000000000000401` | [Dispatch](../precompiles/dispatch.md) |
| `0x0000000000000000000000000000000000000402` | [Commitment Token](../precompiles/commitment-token.md) |
| `0x0000000000000000000000000000000000000403` | [USDT](../precompiles/usdt.md) |
| `0x0000000000000000000000000000000000000600` | [Deposit](../precompiles/deposit.md) |
| `0x0000000000000000000000000000000000000601` | [Staking](../precompiles/staking.md) |
| `0x0000000000000000000000000000000000000602` | [Conviction Voting](../precompiles/conviction-voting.md) |
11 changes: 0 additions & 11 deletions docs/build/precompiles/staking.md

This file was deleted.

9 changes: 4 additions & 5 deletions docs/community/orgs/ktondao.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Overview

[KTON](https://coinmarketcap.com/currencies/darwinia-commitment-token/) is a token that rewards users for locking their [RING](https://coinmarketcap.com/currencies/darwinia-network/) tokens for a certain period of time. The initial supply of KTON is zero, and it is only minted when users lock their RING tokens. Once acquired, KTON can be used to participate in the Darwinia chain's staking and KtonDAO governance.

On the Darwinia chain, users can choose to lock their RING for up to 36 months during the staking process. As a reward for participating in staking, the system grants users KTON.
[KTON](https://coinmarketcap.com/currencies/darwinia-commitment-token/) is a token that incentivizes users to deposit their [RING](https://coinmarketcap.com/currencies/darwinia-network/) token for a specific period of time. On the Darwinia chains, users can deposit their RING for up to 36 months on the [Darwinia Staking App](https://collator-staking.darwinia.network), and in return, they receive KTON as a reward. The initial supply of KTON is zero, and it is only created when users deposit their RING tokens. Once acquired, KTON can be used to participate in the KtonDAO staking and governance processes.

!!! warning
Please note that users cannot unlock their RING during the committed period unless they pay a penalty of the amount of KTON they have received. Therefore, users have the flexibility to choose the lock period and receive KTON in return during the RING staking process.
Please note that users cannot undeposit their RING during the committed period unless they pay a penalty of the amount of KTON they have received. Therefore, users have the flexibility to choose the deposit period and receive KTON in return during the RING staking process.

## Kton Staking

If you stake RING tokens and receive KTON, you can use those KTON to take part in the Darwinia chain's Kton staking mechanism. RingDAO will allocate 20% of its issuance to KtonDAO, which is given to KTON staking participants as an extra reward for their contribution. Participate in [Kton Staking App](https://kton-staking-v2.darwinia.network/).
If you've deposited RING tokens and received KTON, you can leverage those KTON to participate in the Kton staking mechanism. As a bonus, RingDAO allocates 20% of its issuance to KtonDAO, which is distributed to KTON staking participants as an additional reward for their involvement. To get started, visit the [Kton Staking App](https://staking.ktondao.xyz/).

## KtonDAO


KTON holders can do more than just participate in Kton Staking. They can also join a decentralized governance community, where they can discuss and submit proposals on [KtonDAO Tally](https://www.tally.xyz/gov/ktondao). KtonDAO is a community-led initiative, created and driven by KTON holders themselves.
6 changes: 1 addition & 5 deletions docs/learn/collator-staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@
!!! note
The information about the upcoming implementation of Collator Staking DIPs will be updated in this article once those changes are implemented.

Collator staking involves participants locking up their RING tokens to support the network’s operations and security through a nomination mechanism. In this system, users can participate either as nominators or collators to help the chain's liveness, earning rewards in return. To get started with the DApp, visit [Collator Staking App](https://collator-staking.darwinia.network/).

## Interact with Staking

If you want to learn how to interact with these Collator Staking module, please visit the [Staking Precompile Page](../build/precompiles/staking.md), be aware that this contract may be deprecated in future versions.
Collator staking involves participants locking up their RING tokens to support the network’s operations and security through a nomination mechanism. In this system, users can participate either as nominators or collators to help the chain's liveness, earning rewards in return. To get started with the DApp, visit [Collator Staking App](https://collator-staking.darwinia.network/).
19 changes: 9 additions & 10 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ plugins:
"commitment-token-e17a95fb26664e0d8b39d26370847797.md": "learn/collator-staking.md"
"staking-guide-4306a2a3f25f4ea0b41377e267e1d319.md": "community/guide/staking.md"
"staking-6fecd6a66daa44bb828c760f0499ba73.md": "community/guide/staking.md"
"staking-precompile-f301e1fda68f450d8861f3e016c45422.md": "build/precompiles/staking.md"
"staking-precompile-f301e1fda68f450d8861f3e016c45422.md": "learn/collator-staking.md"
"staking-f301e1fda68f450d8861f3e016c45422.md": "learn/collator-staking.md"
"staking-module-9e8584942325478980a3f487b4e1aa14.md": "learn/collator-staking.md"
"pangolin-testnet-1e9ac8b09e874e8abd6a7f18c096ca6a.md": "build/getting-started/networks/pangolin.md"
Expand Down Expand Up @@ -263,7 +263,7 @@ plugins:
"1e9ac8b09e874e8abd6a7f18c096ca6a.md": "index.md"
"builtin-precompiles-98c3e406495043838199aaf8c1b74601.md": "build/precompiles/ethereum.md"
"df814f681ec248438cb762df8aaddbd6?pvs=25.md": "index.md"
"deposit-7d1eb1d33ac442e2a13e75ba2ace5dd3.md": "build/precompiles/deposit.md"
"deposit-7d1eb1d33ac442e2a13e75ba2ace5dd3.md": "learn/collator-staking.md"
"dispatch-f2b979abc1b746fc88cc17062863757a.md": "build/precompiles/dispatch.md"
"dex-8af56cd9f48c4af092987312c4773862.md": "index.md"
"convictionvoting-6bd9c7600aa64a499a6c9e4b53fd8176.md": "build/precompiles/conviction-voting.md"
Expand Down Expand Up @@ -352,11 +352,11 @@ plugins:
"evm/tutorial/smart-contract/verify-contract.md": "build/ethereum-tools/verify-contract.md"
"evm/tutorial/smart-contract/interact-with-hardhat.md": "build/ethereum-tools/interact-with-hardhat.md"
"evm/tutorial/chain/run-relay-chain-testnet.md": "build/getting-started/networks/dev-node.md"
"evm/ethereum-compatibility/precompiles/deposit.md": "build/precompiles/deposit.md"
"evm/ethereum-compatibility/precompiles/deposit.md": "learn/collator-staking.md"
"evm/ethereum-compatibility/precompiles/ethereum.md": "build/precompiles/ethereum.md"
"evm/ethereum-compatibility/precompiles/dispatch.md": "build/precompiles/dispatch.md"
"evm/ethereum-compatibility/precompiles/usdt.md": "build/precompiles/usdt.md"
"evm/ethereum-compatibility/precompiles/staking.md": "build/precompiles/staking.md"
"evm/ethereum-compatibility/precompiles/staking.md": "learn/collator-staking.md"
"evm/ethereum-compatibility/precompiles/conviction-voting.md": "build/precompiles/conviction-voting.md"
"evm/ethereum-compatibility/evm-tracing.md": "learn/ethereum-compatibility/evm-tracing.md"
"evm/ethereum-compatibility/gas.md": "learn/ethereum-compatibility/gas.md"
Expand All @@ -366,7 +366,7 @@ plugins:
"evm/darwinia-staking/deposit.md": "learn/collator-staking.md"
"evm/ethereum-compatibility/precompiles/overview.md": "build/precompiles/overview.md"
"evm/ethereum-compatibility/precompiles/state-storage.md": "build/precompiles/state-storage.md"
"evm/ethereum-compatibility/precompiles/commitment-token.md": "build/precompiles/staking.md"
"evm/ethereum-compatibility/precompiles/commitment-token.md": "learn/collator-staking.md"
"evm/ethereum-compatibility/jsonrpc.md": "learn/ethereum-compatibility/jsonrpc.md"
"docs/en/wiki-us-tokens.md": "community/overview.md"
"docs/zh-CN/crab-tut-nominator.md": "index.md"
Expand Down Expand Up @@ -404,8 +404,8 @@ plugins:
"learn/wallets.md": "build/getting-started/wallets.md"
"learn/ethereum-compatibility/precompiles/overview.md": "build/precompiles/overview.md"
"learn/ethereum-compatibility/precompiles/ethereum.md": "build/precompiles/ethereum.md"
"learn/ethereum-compatibility/precompiles/staking.md": "build/precompiles/staking.md"
"learn/ethereum-compatibility/precompiles/deposit.md": "build/precompiles/deposit.md"
"learn/ethereum-compatibility/precompiles/staking.md": "learn/collator-staking.md"
"learn/ethereum-compatibility/precompiles/deposit.md": "learn/collator-staking.md"
"learn/ethereum-compatibility/precompiles/commitment-token.md": "build/precompiles/commitment-token.md"
"learn/ethereum-compatibility/precompiles/usdt.md": "build/precompiles/usdt.md"
"learn/ethereum-compatibility/precompiles/state-storage.md": "build/precompiles/state-storage.md"
Expand All @@ -432,6 +432,8 @@ plugins:
"build/smart-contract/verify-contract.md": "build/ethereum-tools/verify-contract.md"
"builder/solidity-sdk/constants.md": "index.md"
"builder/solidity-sdk/guides/dispatch-remote-substrate-call.md": "index.md"
"build/precompiles/staking.md": "learn/collator-staking.md"
"build/precompiles/deposit.md": "learn/collator-staking.md"
"community/ringdao.md": "community/orgs/ringdao.md"
"community/dcdao.md": "community/orgs/dcdao.md"
"community/ktondao.md": "community/orgs/ktondao.md"
Expand Down Expand Up @@ -489,9 +491,6 @@ nav:
- KTON: "build/precompiles/commitment-token.md"
- PINK: "build/precompiles/pink.md"
- USDT: "build/precompiles/usdt.md"
- Staking:
- Staking: "build/precompiles/staking.md"
- Deposit: "build/precompiles/deposit.md"
- Governance:
- Conviction Voting: "build/precompiles/conviction-voting.md"
- Utility:
Expand Down
Loading