* Fixed typo in node_status_cache constant * ibid * Moved some caching stuff around so I can see what depends on what * Finishing merge of conflicted files * Minor smoothing * Got cache reads working for circ supply and refactored common cache * Refactored nyxd client usages to make things bit more clear * Moved caching support stuff into the support folder * Moved storage code into support module * Removed dead code * Tweaks * Handling cases a little more nicely in circulating supply api * Renamed nymd_client to nyxd_client * Pulled CacheNotification into the caching support module * Pulled some domain-specific helpers out of cache refresher * Moving some more helper methods out of the cache refresher * Deleting unused code * Extracted a few more functions out of the cache refresher * A few comments as breadcrumbs * Renaming the anemic "helpers" to "node_sets" * Renaming the validator_cache module to nym_contract_cache * Renaming nym contract cache stuff to make things clearer * Renamging a few things in comments * Renaming validator_cache to nym_contract_cache * foomp * Started refactoring http and cli * Extracted cli arg parsing into its own module * Cleanup * Extracted start methods into various modules to clean main up * WIP commit * Build working, swagger not * Fixed swagger docs metadata * Removed log statement * Circulating supply cache now working with simple logic * Fixed up circulating supply method names * Starting to work in some (wrong) constants * Documented the cache * Renaming circulating-supply route * nym-api compiling after the rebasing but most likely not fully working yet * removed unused imports * only starting RewardedSetUpdater if the config flag is set * nym-api compiling with coconut feature * removed redundant process_runner * removed generic aspect of nym-api nyxd::Client * signle entry point for starting nym_contract_cache * do not eagerly grab instances of managed state * inlining openapi route spec * CirculatingSupplyResponse type * fixed compilation of coconut tests * calculating circulating supply based on mixmining reserve and vesting tokens * separated different variants of caching intervals * allow nym-api to specify address of the vesting contract * fixed types export * renamed the query on the vesting contract * reorganised startup procedure and made all start methods independent from rocket * cleaned up startup procedure for nym-api * startup checks for rewarding permisssions * updated changelog * added config flag to control whether circulating supply should be updated Co-authored-by: Dave Hrycyszyn <futurechimp@users.noreply.github.com>
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.
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
You can chat to us in Keybase. Download their chat app, then click Teams -> Join a team. Type nymtech.friends into the team name and hit continue. For general chat, hang out in the #general channel. Our development takes places in the #dev channel. Node operators should be in the #node-operators channel.
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.
Node reward for node i is determined as:
and
Operator of node i is credited with the following amount:
Delegate with stake s recieves:
where s' is stake s scaled over total token circulating supply.
Licensing and copyright information
This program is available as open source under the terms of the Apache 2.0 license. However, some elements are being licensed under CC0-1.0 and MIT. For accurate information, please check individual files.