Skip to content

Adapt Curve v1 Base Pool to Work with RAI #6

@stefanionescu

Description

@stefanionescu

Prize Bounty

20 FLX

Challenge Description

Adapt the Curve v1 two coin pool implementation so it can work for a pool with a peggie and a non-peggie (such as RAI). Template code for this pool type can be found here. You can take inspiration from the RAI Metapool code.

Curve gained lots of momentum in the Ethereum space with their efficient design used to swap similar tokens such as DAI and USDC. Reflexer would like to integrate RAI in Curve v1 but there's an issue: RAI is not pegged to $1 similar to tokens such as DAI. Instead, RAI has a "moving peg" called the redemption price.

In order to fetch RAI's redemption price, one has to first update it and then retrieve it. This is why the redemption price getter is not a view function. To make it easier to fetch the redemption price, you can use this contract that stores a slightly older version of the price or you can update and fetch the latest price from here.

Submission Requirements

Your code must be written in Vyper. You must write thorough tests for all contracts you work on. You must also describe in detail all the modifications you brought to vanilla Curve contracts as well as describe the test cases you covered.

Lastly, your final submission must be in a PR where you acknowledge that the code will be under Curve's license.

Submission Deadline

23rd of December 2021

Winner Announcement Date

The submission will be reviewed between 24th - 28th of December. The announcements and payouts will occur by 31st of December.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions