modular blockchain framework adding financial primitives to commonware-based chains
The Nunchi SDK is an easy-to-use modular blockchain framework offering financial primitives for commonware-based chains. The core of the framework can be found in the nunchi-coins crate
A chain built with the Nunchi SDK adopts our coin model, account model, dkg resharing, and bridging setup. The SDK is handcrafted for the requirements of specialized low-latency finance.
Genesis is split across two layers:
coins/src/genesis.rsdefines the coin-module genesis state:CoinsGenesiscollectsaccount_policiesandtokensTokenGenesisdefines a token plus its initialallocations- allocations are validated against the token's
initial_supply
examples/coins-chain/src/genesis.rsdefines the chain-level wrapper:ChainGenesiscomposesauthoritygenesis with optionalcoinsgenesisapply_to_stateapplies the full genesis to chain state and fingerprints it to prevent mismatched re-initialization
In other words, token allocations live in the coins module, while the top-level genesis entry point lives one layer above it in the chain.
This repository will contain modules for building public and private blockchains, as well as sequencer systems / rollups.
coins- defines what a coin and account are. Also contains other basic financial functionscrypto- defines key primitives and wrappers around commonware cryptographic primitivesrpc- core abstractions for modular RPCdkg- contains dkg resharing ceremony logic and a consensus engine orchestatorbridge- moves coins between chainsoracle- takes in price feeds and provides them to other moduleschat- allows humans or agents to publish to permanent on-chain public conversationsfactory- wrapper of coins for mass issuance
authority- provides a proof of authority setup for a chainpos- provides a proof of stake security setup for a chain
margin- user has BTC + nunchi and doesn't want to sell, and deposits BTC+nunchi and gets a stablecoin. Could be backed by other coins, not just btc and nunchi.securities- Non-synthetic perps contracts (delivery of tokenized stock)vaults- a module for running vaults composed of many types of capital, traded by an authorised offchain partyclob- used on the global chain, provides liquidity between local chain tokensderivatives- ingests a price feed and creates derivatives productsstablecoin- a wrapper of coins special for the needs of stablecoins
