Scheme of smart-contracts organization
- Migrations(Standard)
- Sonm Token
- DAO(Standard)
- Hub wallet factory
- Hub wallet
- Whitelist prototype
- RegApp (Simple React/Webpack App to work with hub registrations)
- PayOut App (already implemented for DD@H project) https://github.com/sonm-io/drugdiscovery-token
Outline of the smart-contracts system which will be implemented in SONM network is presented. More info about network and contracts interaction can be found in the whitepaper
Before hub started to payout tokens to miners and recive payments from buyers, he must create a hub wallet โ simple contract with fixed amount of frozen funds. If hub is caught on cheating, DAO can initiate process of blacklisting this hub and expropriate its frozen funds.
Those expropriated funds will also be frozen at the DAO account for some specified time. This is to protect against malicious descisions of the DAO: tokens can drop in price during freeze, therefore there is no motivation to 'raskulachivat' (expropriate) every hub.
Hub wallet can be created only by Hub wallet factory (which is actually simplified replication factory), which create new hub wallet contract and register it in 'whitelist' contract.
Whitelist contract is a registry contract containing info about hubs and their statuses. All hub wallet created by hub wallet factory are registered in this contract. It supposed to be simple registry with a special mapping for 'trusted' hubs. Initially, 'trusted' hubs will be checked by SONM developers manually / be official SONM hubs. Later, it supposed to be also a rating list โ everyone could check hub and rate it (betting some amount of SONM tokens to prevent rating fraud).
React.js application which is simple web application (web-page) with the purpose of user friendly hub registration process.
Application to proceed miners token payout mechanism. For now it is implemented to work with BOINC statistic mechanism.