6 releases (breaking)

0.6.0 Aug 8, 2023
0.5.0 Jun 6, 2023
0.4.0 Apr 4, 2023
0.3.0 Mar 21, 2023
0.1.0 Feb 22, 2023

#2686 in Magic Beans

Download history 3/week @ 2024-02-09 60/week @ 2024-02-16 12/week @ 2024-02-23 9/week @ 2024-03-01

84 downloads per month
Used in 4 crates

Apache-2.0

20KB
512 lines

The Nym Privacy Platform

The platform is composed of multiple Rust crates. Top-level executable binary crates include:

  • nym-mixnode - shuffles Sphinx packets together to provide privacy against network-level attackers.
  • nym-client - an executable which you can build into your own applications. Use it for interacting with Nym nodes.
  • nym-socks5-client - a Socks5 proxy you can run on your machine and use with existing applications.
  • nym-gateway - acts sort of like a mailbox for mixnet messages, which removes the need for direct delivery to potentially offline or firewalled devices.
  • nym-network-monitor - sends packets through the full system to check that they are working as expected, and stores node uptime histories as the basis of a rewards system ("mixmining" or "proof-of-mixing").
  • nym-explorer - a (projected) block explorer and (existing) mixnet viewer.
  • nym-wallet - a desktop wallet implemented using the Tauri framework.

Build Status

Building

Platform build instructions are available on our docs site. Wallet build instructions are also available on our docs site.

Developing

There's a .env.sample-dev file provided which you can rename to .env if you want convenient logging, backtrace, or other environment variables pre-set. The .env file is ignored so you don't need to worry about checking it in.

For Typescript components, please see ts-packages.

Developer chat

We used to use Keybase for developer chats, but we have since migrated to Matrix and Discord. We no longer check the old nymtech.friends Keybase team.

You can chat to us in two places:

  • The #dev channel on Matrix
  • The various developer channels on Discord

Rewards

Node, node operator and delegator rewards are determined according to the principles laid out in the section 6 of Nym Whitepaper. Below is a TLDR of the variables and formulas involved in calculating the epoch rewards. Initial reward pool is set to 250 million Nym, making the circulating supply 750 million Nym.

Symbol Definition
global share of rewards available, starts at 2% of the reward pool.
node reward for mixnode i.
ratio of total node stake (node bond + all delegations) to the token circulating supply.
ratio of stake operator has pledged to their node to the token circulating supply.
fraction of total effort undertaken by node i, set to 1/k.
number of nodes stakeholders are incentivised to create, set by the validators, a matter of governance. Currently determined by the reward set size, and set to 720 in testnet Sandbox.
A Sybil attack resistance parameter - the higher this parameter is set, the stronger the reduction in competitiveness for a Sybil attacker.
declared profit margin of operator i, defaults to 10%.
uptime of node i, scaled to 0 - 1, for the rewarding epoch
cost of operating node i for the duration of the rewarding epoch, set to 40 NYMs.

Node reward for node i is determined as:

where:

and

Operator of node i is credited with the following amount:

Delegate with stake s receives:

where s' is stake s scaled over total token circulating supply.

This is a monorepo and components that make up Nym as a system are licensed individually, so for accurate information, please check individual files.

As a general approach, licensing is as follows this pattern:

  • applications and binaries are GPLv3
  • libraries and components are Apache 2.0 or MIT
  • documentation is Apache 2.0 or CC0-1.0

Again, for accurate information, please check individual files.

Dependencies

~3–4.5MB
~102K SLoC