DoraID — A Decentralized Identity and Staking Framework

The Goal

DoraID’s goal is to provide a general decentralized autonomous DID framework. The framework should support decentralized applications that have anti-sybil attack demands and identity verification requirements.

Core Features

DoraID implements a smart contract that has the following features:

Identity Proof

From the smart contract, any account can query the following information:

A. Verify if the account has been certified

Some Dapps do not need to verify accounts’ certification status if the Dapp is implementing a use case that is completely public. We do recognize that in most cases, Dapps need to verify accounts’ certification status.

B. Verify if token staking amount is larger than a threshold

Normally a larger staking means more rights in certain applications. Dapps can verify the current staking status from the system.

C. Verify if remaining token staking time is larger than a threshold

A Dapp must verify if the staking period of the current account is longer than required. Otherwise, a Dapp can withdraw tokens from the staking pool and create another staking proof in order to obtain additional rights in the application.

D. (Optional) Check chain of certification

Although the smart contract records all account certification history, it is not recommended to check full account certification history without any specific middleware to facilitate the process, mainly because recursive operations on-chain might imply high gas fees. On the other hand, there is usually no strong relationship between rights a Dapp offers and the certification history of an account. Therefore, a Dapp should verify if it actually needs to use an account’s certification history.

E. (Optional) Publish notes associated with the account

Smart contracts normally do not process the note associated with a staking. For off-chain applications or developers who look up identity of a certain account, the note associated with the staking can be read or published.

The Consensus Behind Identity Verification

Besides providing smart contracts and its frontend services, DoraID is building a consensus mechanism based on the identity service provided by the system.

Other Extensions and Mechanisms

Besides core identity verification features, we are adding a few mechanisms to meet some corner cases in practice. Some of these mechanism will be added to the smart contract as functions, others will be implemented via some middleware smart contracts.

Verification requests with compensations

On the smart contract level, uncertified accounts that want to be certified can send a request with a compensation together with a delegate address. Once the compensation is sent, an account that is already certified can certify this account and get paid with the compensation (in ERC20 token that the smart contract supports). In the same time, if a delegate account is specified, then only the delegate account can certify this account.

Withdraw immature staking

Token staking amount and staking period are self-defined parameters in the smart contract. Before the maturity of a staking, accounts can only increase the number of tokens or prolong the staking period. There is the possibility that users might set a duration that is too long, or send a wrong number (e.g. 10x more than intended) of tokens to the smart contract by mistake. The mistakes might result a near-permanent lose of tokens. As the staking smart contract is admin-free, such mistakes are unrecoverable.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store