GithubHelp home page GithubHelp logo

zrowgz / frax-cvx-platform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from convex-eth/frax-cvx-platform

0.0 0.0 0.0 961 KB

Frax-Convex Platform

License: MIT License

JavaScript 31.97% Solidity 68.03%

frax-cvx-platform's Introduction

Convex-Frax Staking Platform

Overview

The Convex-Frax staking platform allows users to trustlessly stake positions on the Frax Finance Gauge system while borrowing Convex's boosting power via veFXS. The Convex system creates unique proxy vaults for each user which only they can control. This isolates deposits and keeps the user in control of their funds without any risk of admin controls gaining access. These proxies are then given permission to share in using Convex's veFXS which increases farming efficiency. In return for this boost, Convex takes a percentage of FXS farmed and distributes to cvxFXS (currently via the cvxFXS/FXS LP pool) and vlCVX.

Pool Creation Flow

Convex Creates Vault Implementation Contracts

This implmentation contract is a proxy staking interface to the Frax gauge. Allowing various implementations allows Convex to adapt to different products and staking contracts. For example, erc20 staking and uniswap v3 nft staking. (Reference: StakingProxyERC20.sol)

Convex Create A Pool And Assigns An Implementation

A pool is created with an implementation address and other important information like frax staking address. A reward contract is also created to allow additional rewards outside of the gauge system. (Reference: PoolRegistry.sol, MultiRewards.sol, Booster.sol)

Pools Can Be Marked Inactive To Stop Vault Creation

User vaults created from pools are immutable and can not be removed. However Convex can halt future product of vaults. This will allow things like migrations if required. (Reference: PoolRegistry.sol, Booster.sol)

General User Flow

User Creates A Personal Vault

A user first clones a pool's implementation contract and assigns themselves as the owner. Only the owner can interact with this proxy vault. (Reference: Booster.sol, PoolRegistry.sol)

Convex Enables User Vault To Use Its veFXS Boosting Power

At time of creation, Convex tells the Frax staking contract that the user vault can share in Convex's boosting power via veFXS. (Reference: Booster.sol)

User Interacts with Vault As A Proxy To Stake On Frax Finance

Users interact with the proxy vault in the same way they would interact with the main Frax staking contract. (Reference: StakingProxyERC20.sol)

User Determines Their Own Lock Timing

Since vaults are unique to each user, each user can decide how long their staking position should be locked for to increase yield. (This is a Frax staking option, not a Convex one) (Reference: StakingProxyERC20.sol)

When User Rewards Are Claimed, A Fee Is Applied To FXS Tokens

Users can claim rewards as they see fit. Any FXS tokens claimed will have a fee applied and sent to the Convex system to be dispersed to various token holders. (Reference: StakingProxyERC20.sol, FeeRegistry.sol )

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.