Git Product home page Git Product logo

lfei-core's Introduction

LFei - Marketplace between Fei token holders and arbitrageurs

These contracts provide a marketplace for Fei holders who want to sell but:

  1. Don't have enough capital to quickly convert at a favorable price
  2. Don't want to get involved into the complexities of an arbitrage

and, arbitrageurs who need enough capital to make their trades profitable.

Several contracts will be deployed each with a unique conversionRate, the contracts guarantee that amountFei of Fei will be converted to conversionRate*amountFei USDC.

These contracts can be treated as limit orders, where the execution is happening via arbitrageurs instead of an exchange.

Contract Flow

  1. depositFei(uint256 amountFeiIn): Deposit amountFeiIn Fei into the contract and receive an equivalent amount of LFei tokens (used by Fei holders) . Deposit transaction
  2. withdrawFei(uint256 amountFeiOut) : Can withdraw amountFeiOut Fei by returning amountFeiOut LFei tokens (used by Fei holders). Withdraw Fei transaction
  3. swap(uint256 amountFeiOut, address to, bytes calldata data): Can flash loan amountFeiOut Fei tokens from the contract but has to return atleast conversionRate*amountFeiOut USDC tokens + 0.3% in fees. Any extra USDC can be claimed by the arbitrageur, the marketplace will give 0.3% of USDC tokens to the contract creator for each USDC withdrawal.(used by Arbitrageurs). Arbitrage transaction
  4. withdrawUSDC(uint256 amountUSDCOut): Can withdraw USDC by returning LFei tokens, will burn amountUSDCOut/conversionRate lFei tokens from the user and will return amountUSDCOut USDC tokens. (used by Fei holders) Withdraw USDC transaction

Contracts

Mainnet:

  1. ConversionRate = 0.9FEI<>1USDC: 0x7a3b15ee0d0884804f6e846f1f597175ea4631a8

Ropsten:

  1. ConversionRate = 1FEI<>1USDC: 0xE95b5622410e56ea876fFed00C3f63c6EF3D56A6
  2. ConversionRate = 0.95FEI<>1USDC: 0xfECB7F0e191Feefabd85361F91E830e88f304D2F
  3. ConversionRate = 0.9FEI<>1USDC: 0xAfc6CC6ec62E0E76b03B763E36E27b055F273cdb
  4. ConversionRate = 0.85FEI<>1USDC: 0x26Ba4e093122e0327971EC34811c24aF3B4b7AC5
  5. ConversionRate = 0.8FEI<>USDC: 0xC8551200257aD83bbC01fE82984c815908B0Fe8C
  6. ConversionRate = 0.75FEI<>USDC: 0xB2D62330ed55E23e517f6e2d48989dE8d1d1e3b2

lfei-core's People

Contributors

ankitchiplunkar avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.