RealityAware Tokens

Hrishikesh Huilgolkar
Razor Network
Published in
4 min readMay 21, 2020

Razor Network team is proud to announce a new paradigm of decentralized finance.

RealityAware Tokens are a new lean way to do finance. We are bringing a new standard for tokens, which can be used for creating next-generation decentralized applications with less effort.

RealityAware Tokens are aware of real-world events and can react differently depending on real-world events or data. Let’s take a look at traditional finance and how it compares to the current and next-gen DeFi.

Traditional Finance

Traditional finance consists of counterparties who sign an agreement and the Judicial system, which interprets the contract and enforces it.

Traditional finance

Traditional finance has counterparty risks. Paper contracts can be ambiguous and expensive to prepare. It can take a lot of time and financial resources to resolve disputes.

Current generation Decentralized Finance

The challenges of traditional finance can be overcome using DeFi.

Current generation decentralized finance

Decentralized finance attempts to remove counterparty risk by making some changes to traditional finance. However, Smart contracts are not aware of real-world data. Another entity called “oracle” must be introduced to report real-world data to the DeFi smart contracts. The oracle is often a centralized entity. This pretty much erases the biggest benefit of the DeFi.

Putting entire architecture in a single monolithic application is very time and resource-intensive. This has lead to long development times and many security holes in DeFi apps. Many applications end up reinventing the wheel and rewriting many parts of the application, which may have already been developed by other application developers.

Next-gen DeFi using RealityAware tokens

Most decentralized applications depend on real-world data. Since ERC20 tokens do not have access to real-world data, their use-cases are limited without complex logic to acquire that real-world data. RealityAware tokens are aware of real-world data and can perform various functions that depend on that data easily.

RealityAware tokens are new primitives for creating next-gen DeFi applications. These can be used for many use cases without even writing a smart contract.

Complex contracts and applications can be developed using them. These primitives are standards with ready-made audited code. This means the applications created with them should not take a long time to audit and debug.

Reality aware tokens use Razor Network Oracle to get data from the real world. The logic is built-in within the tokens, and no additional effort is required to develop an application and integrate it with an oracle solution. Razor network is truly decentralized and solves the counterparty risk.

Simple bet using RealityAware tokens

The above example shows how simple bet can be made using RealityAware tokens and without writing a new smart contract.

Features of RealityAware tokens

RealityAware tokens are modified ERC20/ERC721 contracts, which can allow and disallow certain functions depending on real-world data.

Some of such functions are:

  • transfer
  • tranferFrom
  • approve
  • wrap
  • unwrap
  • transferCollateral

As you can see, these tokens can be used to wrap or unwrap any supported tokens. In this way, any ERC20/ERC721 tokens can be wrapped in RealityAware tokens to make those tokens sensitive to the real-world data. Functions will be added/removed before finalizing the standard.

Building complex applications using RealityAware tokens

Using RealityAware tokens, complex applications can be built without a lot of effort.

Here is an example where Alice and Bob, and many other participants are betting where Donald Trump wins the US 2020 election.

Prediction market using RealityAware tokens
  1. Alice wraps DAI in Trump-win token contract and mints Trump-win RealityAware tokens.
  2. Bob does the same with Trump-Lose token contract to mint Trump-lose tokens
  3. Both Trump-win and Trump-lose contracts are reality aware token contracts.
  4. Let’s assume Trump wins. In this case, anyone can transfer the locked collateral from the Trump-lose contract to the Trump-win contract.
  5. Hence, Trump-lose tokens become worthless and Trump-win tokens increase in value since more collateral is backing is token.
  6. Since the event is resolved, the tokens can be redeemed for the collateral backing them.

We will publish the standard along with the sample code soon. Please follow us on Github and telegram for updates.

--

--

Hrishikesh Huilgolkar
Razor Network

Founder @razor-network. Decentralized oracles for the decentralized future.