reflexer-labs/geb

RAI x Yearn Challenge

stefanionescu opened this issue · 2 comments

Prize Bounty

4500 RAI

Challenge Description

Reflexer plans to enable any developer to build insurance solutions for RAI. RAI is a non pegged stable asset that is minted against ETH. Anyone can deposit ETH into a Safe and create RAI until they hit the minimum 145% collateralization ratio. If a Safe’s collateralization ratio goes below this threshold, the Safe can be liquidated. In order to protect a Safe, its owner can attach a “saviour” to it: an external smart contract that tries to save the Safe when it gets liquidated.

For this challenge, you’re invited to build two things: a saviour and a Yearn strategy. These two components will work together so that a RAI minter can earn yield and insure their Safe position at the same time.

The user flow should be as follows:

  • The saviour contract takes a user's RAI and it deposits that in the Yearn strategy. The user specifies which Safe they want to protect
  • The Yearn strategy takes RAI and lends it on Cream or Fuse, depending on which platform offers a higher return. The strategy should be periodically rebalanced so users get the best deal at all times
  • In case the Safe that the user covered is getting liquidated, the saviour will try to pull out RAI from the Yearn strategy and repay a portion of the Safe's debt in order to save it. The saviour should also reward the keeper that initially wanted to liquidate the Safe

A simpler version of this flow can be found in this saviour contract that takes a user's RAI and lends it on a Compound-like money market while also protecting a Safe from liquidation.

Here you can see a template used for Yearn strategies and here you can see various strategies that were previously proposed and/or implemented. Here you can see a guide that you can use to build your saviour that interacts with the Yearn strategy.

You should also read Compound's dev guides for supplying and borrowing assets from a money market.

Entrants can join our Discord to talk through their submissions in the #development channel. You should also join Yearn’s Discord server in case you have questions about integrating with their contracts.

Important Considerations

You may need to deploy a new mocked/demo version of Compound on Kovan so that you can create a RAI market.

Separately, you may need to talk with the Yearn team about deploying and testing your strategy. You should contact them and their community on Discord.

Submission Requirements

Your project must abide by the strategy template/s recommended and accepted by Yearn. Your project must have also an open-source license.

Ideal Submission

The ideal submission abstracts away all the technical details from RAI and Yearn and offers a simple interface that anyone can use to deposit RAI in the saviour, lend it and protect their Safes from liquidation.

Submission Deadline

6th of May

Judging Criteria

  • Level of technical implementation (33%)
  • Adherence to Yearn’s docs and templates (33%)
  • Kovan integration and testing (34%)

Winner Announcement Date

The submission will be reviewed between 6th-13th of May. Winners will be privately notified before a public announcement of all hackathon prizes given by Reflexer. The announcements and payouts will occur by 14th of May.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1000.0 RAI (3090.0 USD @ $3.09/RAI) attached to it.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 1000.0 RAI (2990.0 USD @ $2.99/RAI) attached to this issue has been cancelled by the bounty submitter