Introducing Proto RAI

Stefan Ionescu
Oct 29, 2020 · 6 min read

A stepping stone in on-chain control theory

Image for post
Image for post

After months of research and building, we’re excited to unveil our first, full Ether backed asset called Proto RAI!

What is Proto RAI?

Proto RAI (PRAI) is an unaudited mainnet demo of our upcoming reflex index called RAI. PRAI is managed and repriced by a primitive version of our on-chain, autonomous PID controller. Check our whitepaper for a description of the controller and for the system as a whole.

The purpose of this demo is to test and improve our tooling and smart contracts, bootstrap an initial group of keepers that liquidate undercollateralized positions as well as gather live data which can help us update our market model and simulations. This is why in the first couple of weeks we will focus exclusively on developers. After we finish our initial audits we will invite more people to join.

If you would like to monitor the system, you can use this simple dashboard.

How Do I Create PRAI?

In order to create PRAI, you need to deposit Wrapped ETH into a smart contract and open a new position which we call a “Safe”.

At this stage we do not have a webapp to facilitate the creation of PRAI although we encourage developers to use our Typescript and Python libraries as well as our CLI in order to interact with the system. This video guide and our documentation walk you through using the Typescript library with proxy contracts in order to generate PRAI backed by (W)ETH.

We advise everyone to exercise caution and avoid using large amounts of Ether when they test the system. Do not risk more than you can afford to lose.

What Can I Do with PRAI?

Currently you can trade PRAI for ETH using this Uniswap V2 pool. Please be aware that the pool does not have a lot of liquidity.

Key System Parameters

There are several system parameters that everyone should be aware of:

  • Debt ceiling: 10200 PRAI. This is the maximum amount of PRAI that can be issued at the moment using Safes

What if Something Goes Wrong?

In case of a fatal bug or a black hat draining all (or part of) the system collateral, we will announce on Discord, Telegram and Twitter that we are shutting down the protocol. We will also coordinate next steps with the community on Discord.

Bumpy Start

After we deployed the system, we discovered that we did not properly set authorized addresses inside the ERC20 PRAI contract. Because of this, we were not able to add new authed accounts or remove old ones.

We decided to disable the original CoinJoin contract which allows users to transfer PRAI between the core system and the ERC20 contract. Users (mostly bots that traded in the old Uniswap pool) who hold old PRAI tokens can now call the old CoinJoin in order to join() tokens inside the system. They can then use the latest CoinJoin and Coin contracts in order to get new PRAI tokens and trade using the new Uniswap PRAI/ETH pool.

We also had to disable the old treasury and abandon the initial Uniswap v2 PRAI oracle in favor of new versions that are integrated with the latest Coin/CoinJoin.

Next Steps

We are planning to run this demo for at least 3 months, at which point we will trigger Global Settlement. We will then gather all the mainnet data and analyze it in order to re-evaluate our models and further tune the controller.

We may decide to extend the duration of the demo although at this point the community can assume that it will only be a temporary system.

As outlined above, in case an exploit is found or someone manages to game the controller, we will need to shut down earlier than planned. Whatever happens, we will announce the shutdown on all our channels so that the community is kept up to date.

General FAQ

How does the PID controller currently work?

At this moment the PID is disabled because we launched earlier than initially planned and did not yet finish our initial R&D. We plan to start the controller in the next 2–4 weeks and will inform the community about this change beforehand.

Where can I find the controller code?

For now we are keeping the controller code (as well as the simulations/market model) closed source. As we move forward, we will let the community know when we plan to release details about our research.

All the other contracts are open-source and you can find their addresses here.

What is the status of your PID research?

We have the basic smart contract and simulation infrastructure in place which can help us choose initial parameters for the controller as well as validate the behavior of our Solidity implementation compared to the Python models.

The next steps consist in stress testing our models, building a system that allows us to visualize on-chain data in real time and analyzing the data coming from this demo in order to inform our design revisions.

When do you expect to open-source the remaining code and research?

When we’ll launch and announce RAI we will also publish a schedule where we say exactly when we will open-source the remaining Solidity code as well as start to publish articles about our research and show our models.

What are the risks of using Proto RAI?

There are several risks associated with using PRAI:

  • A bug in the controller that destabilizes the system (e.g sets the redemption price to zero) and puts everyone’s collateral in danger of liquidation

You can find our more about system risks in our documentation. Every sub-section is continuously updated with more edge cases and undesirable scenarios that users should be aware of.

How do you plan to minimize the above mentioned risks?

We have several ongoing initiatives:

  • There are boundaries for the redemption rate so that it cannot be set to unexpected values

Where can I find out more about the project?

Join our Discord channel!

Do you have a bug bounty program?

Right now we do not have a bug bounty program although we plan to create one after we finish the first round of smart contract audits.

Is there a governance or protocol token?

There isn’t any token apart from Proto RAI (PRAI) which can be found at this address. PRAI holders do not have governance rights.

Do you have yield farming/liquidity mining?

We do not have any yield farming or liquidity mining initiative.

Where can I find the deployed smart contracts?

The latest contract addresses can be found here. You can also see the full deployment history in our changelog.

How do you change protocol parameters?

We’re using a multisig deployed at this address.

Resources

Whitepaper: https://github.com/reflexer-labs/whitepapers
Documentation: https://docs.reflexer.finance/
Video Guide on How to Create PRAI: https://www.youtube.com/watch?v=6rD7MjUaJUA
Stats Dashboard: https://stats.reflexer.finance/
Mainnet Subgraph: https://thegraph.com/explorer/subgraph/reflexer-labs/prai-mainnet
Uniswap PRAI/ETH Pool: https://info.uniswap.org/pair/0xEBdE9F61e34B7aC5aAE5A4170E964eA85988008C
Discord: https://discord.gg/QYBEw6Z
Twitter: https://twitter.com/reflexerfinance

Reflexer Labs

Research publication and newsletter about reflex indexes

Stefan Ionescu

Written by

Reflexer Labs

Reflexer Labs are the creators of RAI: a dampened version of ETH meant to be used as collateral in other DeFi protocols. RAI is part of a new asset class called “reflex indexes”.

Stefan Ionescu

Written by

Reflexer Labs

Reflexer Labs are the creators of RAI: a dampened version of ETH meant to be used as collateral in other DeFi protocols. RAI is part of a new asset class called “reflex indexes”.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

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