iodlt-ants-sdk
v0.0.7
Published
ANT$ protocol
Downloads
79
Readme
ANT$ Protocol SDK
⚠️ Please note this is an EARLY, alpha version of ANT$. It more represents a Proof of Concept rather than a final product.
ANT$ is a decentralized, permissioned data aggregation protocol. It is a second layer protocol that utilizes the Symbol blockchain to both incentivize, store and keep track a wide variety of information. This SDK implements ANT$ as a second protocol solution. The SDK can be implemented in a website, backend service, IoT device, or a mobile app.
While still in development, we have developed a good base. Future plans experimenting with homomorphic encryption for sensitive data, secret sharing mechanisms to better shard / distribute data, and distributed storage for a more persistent big data store.
Example Implementations
The choice of writing this SDK in Typescript offers many possible and useful implementation of the ANT$ protocol
Example site: ants.iodlt.com
JSU Data Logging Bot: https://github.com/CrackTheCode016/jsu-covid-ants-bot
Installation & Running
The package is available via npm:
npm install iodlt-ants-sdk
To run the code, clone this repo, npm install
, and you can run npm test
to run the tests.
Vision
ANT$ is a decentralized, incentivization based data reporting protocol. Users, referred to as the “ants”, are able to be rewarded by contributing to an open data market. Much like the biological ant, the ANT$ system depends on the distribution of users, or "ants", over a given area to report and relay information.
Through the ANT$ protocol, anyone can have an on-chain data repository, set rules for what should be sent to it, and if / when a user should be paid for that data. The data submitter can be either completely anonymous or authenticated, depending on the objective of the entity creating the call-to-action for real time information.
Future Plans & Additional Notes
ANT$ currently logs directly to the Symbol blockchain. This works well for smaller amounts of data, however for massive datasets, we are looking into a way to integrate a distributed storage solution to link directly to Symbol.
It's worth noting that the blockchain is not really designed for holding mass amounts of information like images, videos, or audio. It should be used as a record keeping, state management, and reward system. We hope to update ANT$ to reflect these concepts.
Concepts / Features
Data Archives
Data Archives represented via on-chain accounts. These archives are able to send and recieve transactions, as well as be owned by multiple entites via a multisignature account. Using Symbol Account restrictions, archives are able white and black list certain addresses from reporting information. These cryptographic accounts act aw containers for the data, as well as store Schemas in a key-value state on the account.
Data Schemas
Multiple, on-chain JSON schemas can be assigned to an archive. Each schema represents a set of fields specified by the archive owner. These fields can be a JSON object (Typescript Interface, checked for type-correctness), string, number, or boolean.
Incentivization
Each field can also be assigned specific token id and value. An archive owner's external service can evaluate users based on the validity of the data, including specifying a bonus if all data is submitted. This incentivization scheme is entirely optional and configurable.
Archive Restrictions
Archives are able to black or whitelist addresses from logging to it. This enables Archive owners to only allow certain members to log information, which is useful in some scenarios.
Data Reports
Data reports are sent to data archives by users, where they must conform to the schema specified in the transaction. Reports can be validated against the target schema.
Symbol Usage / Detailed Explanation
ANT$ is a second layer protocol, meaning it utilizes Symbol's features to build the protocol,
Namespaces are used to establish a human-readable name for a data “Archives”. Data reports are sent and added to the Archive.
Along with the initial establishment of the namespace, a list of owners are declared and own this Archive account via a Symbol multi-signature account.
These owners have sovereignty over what comes in and out of the Archive through Account Restrictions. Account Restrictions can either declare an “Authorized User” on a whitelist, or a “Certification Restriction” (an account has to own a certain token).
Each Archive has a set of data “Schemas” associated via Namespace Metadata. These schemas declare how the dataset submitted to the archive should look like, what the required fields are and what types they should be. One Archive can contain multiple schemas to represent multiple datasets, i.e “Overall COVID Cases”, or “Testing Results By Region”.
Data Schemas can be updated by owners of the archive to reflect new information. New schemas can also be added to the archive to represent new datasets.
Data Reports are submitted in the form of Complete Aggregate Transactions with TransferTransactions within containing the report in chunks in each subsequent transaction.