Code Monkey home page Code Monkey logo

geb's Introduction

GEB

This repository contains the core smart contract code for GEB. GEB is the abbreviation of Gödel, Escher and Bach as well as the name of an Egyptian god.

Check out the more in-depth documentation.

Bug Bounty

There's an ongoing bug bounty program covering contracts from this repo.

Forking Notes

If forking please be aware a dusty safe liquidation issue has been identified.

For a description of the issue as well as a solution (to implement in your fork) please read the following article.

geb's People

Contributors

fabiohild avatar guifel avatar onbjerg avatar piesrtasty avatar stefanionescu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

geb's Issues

Issue with testing - ds-token/delegate.sol not found

Hi,

In attempting to run the build command for testing the contracts -
dapp --use solc:0.6.7 build

Following file not found errors show up, all referencing ds-token/delegate.sol ->

rc/test/shared/Coin.t.sol:21:1: ParserError: Source "ds-token/delegate.sol" not found: File not found. import "ds-token/delegate.sol"; ^-----------------------------^ src/test/single/SingleCollateralAuctionHouse.t.sol:4:1: ParserError: Source "ds-token/delegate.sol" not found: File not found. import {DSDelegateToken} from "ds-token/delegate.sol"; ^----------------------------------------------------^ src/test/single/SingleDebtAuctionHouse.t.sol:4:1: ParserError: Source "ds-token/delegate.sol" not found: File not found. import {DSDelegateToken} from "ds-token/delegate.sol"; ^----------------------------------------------------^ src/test/single/SingleGlobalSettlement.t.sol:23:1: ParserError: Source "ds-token/delegate.sol" not found: File not found. import "ds-token/delegate.sol"; ^-----------------------------^ src/test/single/SingleSAFEEngine.t.sol:5:1: ParserError: Source "ds-token/delegate.sol" not found: File not found. import "ds-token/delegate.sol"; ^-----------------------------^ src/test/single/SingleSaveSAFE.t.sol:5:1: ParserError: Source "ds-token/delegate.sol" not found: File not found. import "ds-token/delegate.sol"; ^-----------------------------^ src/test/single/SingleSettlementSurplusAuctioneer.t.sol:4:1: ParserError: Source "ds-token/delegate.sol" not found: File not found. import {DSDelegateToken} from "ds-token/delegate.sol"; ^----------------------------------------------------^ src/test/single/SingleStakingPoolIntegration.t.sol:4:1: ParserError: Source "ds-token/delegate.sol" not found: File not found. import {DSDelegateToken} from "ds-token/delegate.sol"; ^----------------------------------------------------^ src/test/single/SingleSurplusAuctionHouse.t.sol:4:1: ParserError: Source "ds-token/delegate.sol" not found: File not found. import {DSDelegateToken} from "ds-token/delegate.sol"; ^----------------------------------------------------^

The dapphub repo for ds-token also does not contain the delegate.sol contract. Maybe there was an update or you have this file available in one of the other repos? Thanks.

RAI x Yearn Challenge

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.

RAI x UMA Challenge

Prize

$2000 (in ETH)

Challenge Description

RAI is a non pegged stable asset that is minted against ETH. As opposed to other stable assets which are pegged to one specific value, RAI has a floating “peg” (called the redemption price) that changes according to market forces. The redemption price is changed every second by what we call the redemption rate. Both the redemption price and the redemption rate are stored in a smart contract called the Oracle Relayer.

For this challenge, you’re invited to build a synthetic asset tracking the Kovan RAI redemption rate movements using UMA. Note that the redemption rate can be positive or negative.

We have docs about the Oracle Relayer contract here. You can see the Kovan addresses for UMA’s contracts here. Entrants can join our Discord to talk through their submissions in the #development channel. You should also join UMA’s Discord channel in case you have questions about working with their protocol.

Important Consideration

For this challenge, you must test your solution using Kovan RAI.

Submission Requirements

Your project must be deployed on Kovan. Your project must also have an open-source license.

Submission Deadline

15th of March

Judging Criteria

  • Level of technical implementation (25%)
  • Kovan integration and testing (75%)

Winner Announcement Date

The submission will be reviewed between 15th - 19th of March 2021. The payout and public announcement of the winner will occur before 22nd of March 2021.

RAI Liquidation Pool

Prize Bounty

1500 RAI

Challenge Description

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. Currently, a Safe is liquidated in a fixed discount auction similar to the ones used in protocols such as Compound and Aave.

For this challenge, you’re invited to build a liquidation pool where anyone can deposit RAI in order to be the first in line to liquidate Safes. This pool should be called by the RAI liquidation engine before it starts a new fixed discount auction. When the pool liquidates a Safe, the ETH proceeds should be distributed pro-rata among all the pool depositors. If the pool doesn’t have enough RAI to settle the Safe’s debt, the liquidation engine will continue with a normal auction.

You can read more about the liquidation engine in our docs.

Entrants can join our Discord to talk through their submissions in the #development channel.

Submission Requirements

Your project must have several unit and integration tests showing how your solution can be integrated in the GEB framework.

Submission Deadline

30th of June

Judging Criteria

  • Level of technical implementation (33%)
  • Unit and integration tests (67%)

Winner Announcement Date

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

Article about Using Fuse Pools and Aave in Combination with RAI Farms

Prize

5 FLX

Challenge Description

Write an article detailing strategies to use in combination with Rari Fuse pools 46 and 64 as well as RAI borrowed on Aave in order to farm.

Focus especially on Fuse pools where projects can borrow RAI against DeFi tokens or ETH derivatives. Some strategies you can write about:

  • Borrow RAI from Fuse/Aave to farm in Uniswap v3 RAI/DAI
  • Borrow RAI from Aave and lend on Fuse
  • Borrow RAI from Aave, sell for a DeFi token which can then be staked

Overall looking for 3-4 strategies in a beefy article. You should use a mix of text and images.

Submission Deadline

31st of October

Winner Announcement Date

The submission will be reviewed between 1st-4th of November. The announcements and payouts will occur by 6th of November.

Articles About Optimizing RAI Yield on Uniswap v3

Prize

10 FLX

Challenge Description

The Reflexer community requested an ELI5 article that explains how someone can LP in a Uniswap v3 RAI pair and maximize their FLX token rewards.

For this challenge, you can choose to make one or two articles:

  • The first article is an ELI5 explaining how someone can LP in a stables pool such as RAI/DAI as well as a pool such as RAI/ETH. For RAI/DAI you should explain how LPs can maximize their FLX rewards. This dashboard with APYs may help. For unincentivized pools such as RAI/ETH, you can explain the risks and reward of concentrating liquidity and collecting fees
  • An advanced article detailing strategies that focus on maximizing LP fees (not FLX rewards) for RAI pools. Reference more in-depth research and explain the reasoning behind certain LP strategies

We want to see top notch articles that contain images and references to other sources LPs can use to document themselves.

The best ELI5 article gets 2.5 FLX and the advanced article gets 7.5 FLX. Prior to submitting your article/s, you can DM the Reflexer team on Discord and be ready to share a private link to your article/s.

Submission Deadline

22nd of November

Winner Announcement Date

The submission will be reviewed between 23rd-25th of November. The announcements and payouts will occur by 26th of November.

RAI x UMA Challenge

Prize

$2000 (in ETH)

Challenge Description

RAI is a non pegged stable asset that is minted against ETH. As opposed to other stable assets which are pegged to one specific value, RAI has a floating “peg” (called the redemption price) that changes according to market forces. The redemption price is changed every second by what we call the redemption rate. Both the redemption price and the redemption rate are stored in a smart contract called the Oracle Relayer.

For this challenge, you’re invited to build a synthetic asset tracking the Kovan RAI redemption rate movements using UMA. Note that the redemption rate can be positive or negative.

We have docs about the Oracle Relayer contract here. You can see the Kovan addresses for UMA’s contracts here. Entrants can join our Discord to talk through their submissions in the #development channel. You should also join UMA’s Discord channel in case you have questions about working with their protocol.

Important Consideration

For this challenge, you must test your solution using Kovan RAI.

Submission Requirements

Your project must be deployed on Kovan. Your project must also have an open-source license.

Submission Deadline

15th of March

Judging Criteria

  • Level of technical implementation (25%)
  • Kovan integration and testing (75%)

Winner Announcement Date

The submission will be reviewed between 15th - 19th of March 2021. The payout and public announcement of the winner will occur before 22nd of March 2021.

RAI x Aave Challenge

Prize Bounty

850 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 an insurance solution where Safe owners can deposit ETH on Aave and keep the received aETH in a saviour contract. When a Safe gets liquidated, the saviour should redeem ETH from Aave and add it in the Safe.

We have detailed docs where you can see all the requirements needed to build a new saviour as well as an example implementation. You can see the Kovan addresses for Aave’s contracts here and their aTokens documentation here.

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

Important Consideration

During this hackathon, our insurance program will only be available for Kovan RAI. Contact us on our Discord if you would like to integrate your solution with our Kovan system and receive extra points for your submission!

Submission Requirements

Your project must implement the official interface for saviours. You should also follow the guidelines in our documentation regarding every core function. Lastly, your project must have an open-source license.

Ideal Submission

The ideal submission abstracts away the interaction with Aave and allows anyone to deposit ETH to protect a specific safe. The deposited ETH should be added in Aave and the receiving aETH should be left in the saviour.

Safe owners should also be able to choose the desired collateralization ratio that each of their Safes should have after they get saved.

Submission Deadline

31st of March

Judging Criteria

  • Level of technical implementation (33%)
  • Adherence to docs and interfaces (33%)
  • Kovan integration and testing (34%)

Winner Announcement Date

The submission will be reviewed between 1st-4th of April. Winners will be privately notified before a public announcement of all hackathon prizes given by Reflexer. The announcements and payouts will occur by 5th of April.

Dollar Pegged Coin Wrapper for RAI

Prize Bounty

2000 RAI

Challenge Description

RAI is a 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. As opposed to dollar pegged stablecoins, RAI is not pegged to any particular value. Rather, it has a moving peg.

For this challenge, you’re invited to build an ERC20 wrapper for RAI that rebases balances so that it becomes a dollar pegged stablecoin. The way to do this is to allow anyone to deposit RAI in the wrapper and issue an amount of wrapped tokens according to the latest RAI moving peg (otherwise called the redemption price).

As an example: if the RAI redemption price is currently $3, one RAI deposited in the wrapper would give back three wrapped tokens. After the initial deposit, if the redemption price changes to $6, the wrapped token holder will have six wrapped tokens which can be used to redeem the one RAI they deposited.

The redemption price can be fetched from this contract. Note that before you can read the redemption price, the contract will try to update it.

Entrants can join our Discord to talk through their submissions in the #development channel.

Submission Requirements

Your project must have several unit and integration tests showing how your solution can be integrated in the GEB framework.

Submission Deadline

9th of July

Judging Criteria

  • Level of technical implementation (33%)
  • Unit and integration tests (67%)

Winner Announcement Date

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

RAI x Compound Challenge

Prize Bounty

850 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 an insurance solution where Safe owners can deposit ETH on Compound and keep the received cETH in a saviour contract. When a Safe gets liquidated, the saviour should redeem ETH from Compound and add it in the Safe.

We have detailed docs where you can see all the requirements needed to build a new saviour as well as an example implementation. You can see the Kovan addresses for Compound’s contracts here and their cTokens documentation here.

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

Important Consideration

During this hackathon, our insurance program will only be available for Kovan RAI. Contact us on our Discord if you would like to integrate your solution with our Kovan system and receive extra points for your submission!

Submission Requirements

Your project must implement the official interface for saviours. You should also follow the guidelines in our documentation regarding every core function. Lastly, your project must have an open-source license.

Ideal Submission

The ideal submission abstracts away the interaction with Compound and allows anyone to deposit ETH to protect a specific safe. The deposited ETH should be added in Compound and the receiving cETH left in the saviour.

Safe owners should also be able to choose the desired collateralization ratio that each of their Safes should have if they get saved.

Submission Deadline

31st of March

Judging Criteria

  • Level of technical implementation (33%)
  • Adherence to docs and interfaces (33%)
  • Kovan integration and testing (34%)

Winner Announcement Date

The submission will be reviewed between 1st-4th of April. Winners will be privately notified before a public announcement of all hackathon prizes given by Reflexer. The announcements and payouts will occur by 5th of April.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.