Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

DARC

> 编程语言
Open source

Decentralized Autonomous Regulated Company (DARC), a company virtual machine that runs on any EVM-compatible blockchain, with on-chain law system, multi-level t

9.2K stars0 likes1 views
WebsiteGitHub

About

Decentralized Autonomous Regulated Company (DARC), a company virtual machine that runs on any EVM-compatible blockchain, with on-chain law system, multi-level t

Decentralized Autonomous Regulated Company (DARC)

Welcome to the official repository for the Decentralized Autonomous Regulated Company (DARC) project. DARC is a project that aims to create a decentralized autonomous company that is regulated by a plugin system based on commercial laws. The project is currently in the early stages of development and is not yet ready for production use.

English | 简体中文 | 日本語

Star History

Join our community

Telegram: https://t.me/projectdarc Discord: https://discord.gg/QzKbTHVgGG

Whitepaper

English: darc-whitepaper.pdf

Chinese(中文版): darc-whitepaper-cn.pdf

What is DARC?

Decentralized Autonomous Regulated Company (DARC) is a company virtual machine that can be compiled and deployed to EVM-compatible blockchains with following features:

  • Multi-level tokens, each level token can be used as common stock, preferred stock, convertible bonds, board of directors, product tokens, non-fungible tokens (NFT), with different prices, voting power and dividend power, which are defined by the company's plugin(law) system.
  • Program composed of a series of DARC instructions that include managing tokens, dividends, voting, legislation, purchasing, withdrawing cash, and other company operations.
  • Dividend Mechanism for distributing dividends to token holders according to certain rules.
  • Plugin-as-a-Law.The plugin system serves as the by-law or commercial contract that supervises all operations. All company operations need to be approved by the plugin system or corresponding voting process.

By-Law Script

By-law script is a JavaScript-like programming language that is used to define the company's commercial rules and operations on DARC. For example:

…

Above By-law Script will be transpiled via code generator and sent to corresponding DARC VM contract. The DARC will execute the program if the plugin system approves. To add plugin and voting rules to the DARC, we can simple compose the plugin conditions and voting rules, then send them via operation add_voting_rule(), add_and_enable_plugins() or add_plugins(), and they will be deployed and effective immediately if the current plugin system approves the operation.

Here is a quick example, assume we need to limit the transfer of tokens by major shareholders (>25%) by asking the board of directors for an all-hand vote (assuming 5 tokens in total), and it requires 100% approval (5 out of 5) in 1 hour. We can add a new plugin and corresponding voting rule to the DARC VM contract:

…

After above By-Law Script is executed, the DARC VM contract will add a new plugin and voting rule, and the plugin will be effective immediately (if there exists any voting procedure related to add_voting_rule() and add_and_enable_plugins(), the plugin will be effective after the voting process is approved). If the operator (addr1) tries to transfer tokens to addr2, the plugin will check the condition and return voting_needed to the DARC VM contract, and the DARC VM contract will ask the board of directors (level-1 token owners) to vote. If the board of directors approves the operation, the operation will be executed in the sandbox, otherwise the operation will be rejected. For example, if there are 3 voting rules are triggerd, the voting operation will be:

javascript
vote([true, true, true])

If the voting process is approved by the existing voting rules and plugins, the new program will be approved to execute in the next execution pending duration (1 hour in this example), and the program owner or any other members can execute the program in the next 1 hour, or the program will be ignored and removed from the pending list.

"Plugin-as-a-Law"

The law of DARC is defined in below pseudo-code:

javascript
if (plugin_condition == true) {
    plugin_decision = allows / denies / requires a vote
}

Each plugin contains a condition expression tree and a corresponding decision (return type). When the condition tree is evaluated to true while the program is submitted before running, the plugin will make a decision by allows, denies or requires a vote. For example:

Example 1: Anti-Dilutive shares

Anti-Dilutive shares is a basic mechanism to prevent the company (including DAO and other on-chain "tokenomics") from issuing too many shares and dilute the ownership of the existing shareholders. In DARC, the company and early-stage investors can define a law of "anti-dilutive shares", and the law can be abolished by certain process.

Law 1 (Anti-Dilutive Shares): Shareholder X should always holds 10% of the total stock.

Design of Plugin: If operation is minting new level-0 tokens, plugin should check the state of token ownerships, X should always keep a minimum total voting power of 10%, as well as dividend power of 10% after executing the operation

In By-law script, we can define the plugin with following conditions:

…

Since it checks the state of token ownerships, the plugin should be executed after the operation is executed inside the DARC's sandbox. If the plugin's condition is evaluated to true, the plugin will deny the operation after executing in the sandbox, and the operation will be rejected to be executed in the real environment. Otherwise, "minting new tokens" will be allowed to execute.

When this plugin is added to the DARC, the operator (the author of current program) must mint extra tokens to address x_addr to satisfy the Law 1 above, otherwise it will be rejected. For example, the DARC has only one level of tokens (level 0, voting power = 1, dividend power = 1), the stock ownerships are:

ShareHolders Number of tokens Percentage
CEO 400 40%
CTO 300 30%
CFO 200 20%
VC X 100 10%
Total 1000 100%

If the operator want to mint 200 tokens and issue them to VC Y, the operator must mint 20 tokens to address x_addr to satisfy the Law 1 above, otherwise the operation will be rejected. Here is a sample investment program by VC Y:

javascript
pay_cash(1000000000000)  // pay 1000 ETH to the DARC
mint_tokens(20, 0, x_addr)  // mint 20 level-0 tokens to address x_addr
mint_tokens(180, 0, y_addr)  // mint 180 level-0 tokens to address y_addr
add_and_enable_plugin([new_law_1, new_law_2, new_law_3])  // investment laws by VC Y

After the operation, the stock ownerships are:

ShareHolders Number of tokens Percentage
CEO 400 33.33%
CTO 300 25%
CFO 200 16.67%
VC X 120 10%
VC Y 180 15%
Total 1200 100%

Also another plugin should be added to the DARC to define the legislation of the "Abolish Law 1":

Law 1.1(Law 1 Appendix): Both Law 1 and Law 1 Appendix (current Law) can be abolished if and only if the operator is X

Design of Plugin: If operation is "disable_plugins", and the plugin that to be disabled is with id == 1 or id == 2, and the operator is not X, then the plugin should reject the operation (assume the anti dilutive law index is 1, and the appendix law index is 2, both are before-operation plugins)

javascript
const law_1_appendix = {

    // define the trigger condition
    condition:
        (operation == "disable_plugins")
        & ((disable_after_op_plugin_id == 1) | (disable_after_op_plugin_id == 2))
        & (operator != x_addr),

    // define the decision
    return_type: no,

    // define the priority
    return_level: 100,

    // reject the operation before sandbox
    is_before_operation: true,
}

Example 2: Bet-on Agreement/Valuation-Adjustment Mechanism(VAM) Agreement

Law2: If total revenue < 1000 ETH by 2035/01/01, shareholder X can take over 75% of total voting power and 90% of dividend power.

Design of Plugin: After executing in sandbox, check the following conditions:

  • timestamp >= 2035/01/01

  • revenue since 2000/01/01 < 1000 ETH

  • operation is "mint_tokens"

  • total voting power of x <= 75%

  • the dividend power of x <= 90%

then the plugin should approve the operation

In By-law script, we can define the above plugin as following:

javascript
const bet_on_2 = {

    // define the trigger condition
    condition:
        (timestamp >= toTimestamp('2035/01/01')) &
        (revenue_since(946706400) < 1000000000000) & // 1000000000000 Gwei = 1000 ETH
        (operation == "mint_tokens") &
        (total_voting_power_percentage(x) < 75) &
        (total_dividend_power_percentage(x) < 90),

    // define the decision
    return_type: yes,

    // define the priority
    return_level: 100,

    // approve the operation after executing in sandbox
    is_before_operation: false,
}

Example 3: Employee Payroll

Law 3: The payroll for employees with role level X should be 10 ETH per month.

Design of Plugin: If operation is "add withdrawable cash", the amount is less than or equals to 10 ETH, and the last operation was at least 30 days, then this operation should be approved and skip sandbox check

In By-law script, we can define the plugin with following conditions (for example, level X = 2 can withdraw 10 ETH per 30 days):

…

With the plugin above, the operator can add withdrawable cash to the employee's account with amount less than or equals to 10 ETH, and the last operation was at least 30 days. The plugin will approve the operation and skip the sandbox check. When the employee address is disable, removed from role level X, or other plugins with higher priority deny the operation, these operations will be rejected.

Example 4: Voting and legislation

For daily operations, the board of directors can be defined as a group of addresses, and the voting mechanism can be used to make decisions. For example, let's design the voting mechanism for the following scenario:

  1. Any address X with more than 10% total voting power can be added to the board by minting 1 token (level 2, board voting token), if and only if the behavior is approved by 2/3 of all the board members (voting rule 1).
…
  1. Any operator with more than 7% of all voting power can submit enable_plugins() , and it needs to be approved by 100% of all the board members. Each operator can try to activate plugin per 10 days.
…
  1. To disable plugins 2,3 and 4, the operator needs to hold at least 20% of total voting power, and the operation needs to be approved by 70% of all common stock token(level-0) voters as relative majority(voting rule 2). For each member of DARC, this operation can be executed once per 15 days (1296000 seconds).
…

Example 5: Multi-level Tokens: Product tokens and Non-fungible tokens

Here is an example of how to design a token with different levels of voting power and dividend power. The voting power and dividend power are used to calculate the voting power and dividend power of each token holder. Here is the table of the token levels:

Level Token Voting Power Dividend Power Total Supply
0 Level-0 Common Stock 1 1 100,000
1 Level-1 Stock 20 1 10,000
2 Board of Directors

Issues· 2 open

View all issuesOpen on GitHub
  • #80

    New GitHub Issue Submission Guidelines (提交新issue前必读内容)

    Updated Dec 31, 2023

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言