Idena hard fork: Oracle voting and types of smart contracts

Idena
Idena
Published in
4 min readDec 23, 2020

Dear Idena community,

A new version of the Idena node (0.24.0) has been released.

In this release, besides planned OracleVoting, TimeLock and Multisig smart contracts, there are two additional contracts that allow unblocking coins based on the results of oracle voting (see the information on OracleLock and RefundableOracleLock below).

These are the types of smart contracts that are available in the new node version.

1. OracleVoting smart contract

You can participate in voting if you are a validated participant and receive voting rewards. Rewards can be set either by those who create the votings, or by other smart contracts.

You can also create your own voting, for example:

1. Future fact certification

2. Oracle voting for governance

3. Paid polls

See more details on how to create a voting.

2. TimeLock smart contract

TimeLock smart contract locks coins on the smart contract address until the specified block number appears. Once the block number is mined, the coins can be transferred to the specified address.

3. Multisig M-of-N smart contract

A multisignature wallet address with specified M and N locks coins. In order to send the coins from the multisig, M specific participants out of N have to provide their signatures.

4. OracleLock smart contract

OracleLock is a non-refundable smart contract that locks coins until a decision is made by oracles. If the voting result matches the expected value, coins are transferred to address A, otherwise to address B. Both addresses have to be specified beforehand.

Example: The contractor promises to complete the work by a certain date. The customer creates an oracle voting in order for oracles to vote in the future whether the work is done. The customer blocks the money on the OracleLock contract. If the result of oracle voting confirms that the work is done, the money is transferred to the contractor. Otherwise, the money is sent back to the customer.

5. RefundableOracleLock smart contract

RefundableOracleLock is a refundable smart contract address that can lock coins from multiple users until a decision is made by oracles. It works similarly to OracleLock: if the voting result matches the expected value, coins are transferred to address A (if specified), otherwise to address B (if specified). However, a refund is provided to all users if the destination address A or B is not specified or oracle voting fails to reach a consensus. The amount of the refund is equal to the initial deposit or proportional to the initial deposit if the RefundableOracleLock address has been funded additionally.

Example 1: The contractor promises to complete the work by a certain deadline. The community is ready to fund the work. An oracle voting is created so that oracles at some point in the future confirm whether the work is done. Community members fund the work by depositing money from different wallets to RefundableOracleLock. If the result of the oracle voting confirms that the work is done, the money is transferred to the contractor. Otherwise, all contributors get a refund.

Example 2: Prediction Market. An oracle voting is created so that oracles at some point in the future confirm the occurrence or non-occurrence of the event. Bets on the occurrence or non-occurrence of the event are locked on two linked RefundableOracleLock contracts. According to the results of the oracle voting, one of the two contracts will be the RefundableOracleLock-winner and the other will be the RefundableOracleLock-loser.

All money locked on the RefundableOracleLock-loser contract is sent to the address of the RefundableOracleLock-winner contract. After that, the money from the RefundableOracleLock-winner is returned to the winning users in the form of a refund in proportion to the bets made.

***

Currently, all smart contracts can be created via the node RPC. We are planning to launch a hackathon to create applications based on these smart contracts.

When the hard fork will be activated

The hard fork update will be activated not earlier than 8:00 UTC December 24, 2020. The hard fork update will be activated when the voting criterias are met:

- more than 80% of online mining nodes support the upcoming changes

- more than 66.6% of validated addresses support the upcoming changes

If the voting criteria are not met by December 31, the hard fork update will be blocked.

Please update your node version.

Note: Mining nodes running the previous version will get a mining penalty after the hard fork activation.

--

--

Idena
Idena
Editor for

Proof-of-Person blockchain. Idena is a novel way to formalize people on the web: https://idena.io