lordshashank / DealFlow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues


Logo

DealFlow

DealFlow: Unlocking Decentralized File Storage on Filecoin with Seamless Autonomy, Verifiable Security, and Robust, Scalable Solutions for Users and Storage Providers.
Explore the project »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. How we built it?
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

Storing Files in a decentralized way, not having to trust centralized servers, and having the same accessibility, who doesn’t want that?

Filecoin has been leading in the space of decentralized storage and presents a perfect solution to the problem, at least on the protocol level. Still, there are many blockers in connecting users who want to store files and Storage providers who want to store them. Moreover, many of the existing solutions to store data in Filecoin have centralized points, are non-retrievable on-chain and there’s no way to verify the storage easily.

DealFlow aims to solve these problems. It is an on-chain solution for the complete verifiable flow of storing files in Filecoin for SPs and end-users. It aims to give complete autonomy to both SPs to decide on their needs and specs and users to choose from different miners having various deliverables.

The main features of DealFlow are:-

  • IPC for scaling: It's on-chain 🙂. However, having single transaction for each file on mainnet is not at all feasible. IPC comes to the rescue here. Miners can set up their own subnets on-chain from the DealFlow contract, decide its specs, and change or delete them. They can set up their hardware in coherence with subnet for robust deal making process.
  • Stablecoin payment for Storage Providers: SPs can register for payment in native or any other on-chain stablecoin. They can configure their subnet specs like collateral, etc with same coin, giving them complete autonomy.
  • Verifiable storage and Retrieval: If you thought deal making so intensive, there’s another problem, how to verify that your file is actually stored? Typical solutions to this are PODSI or retrievability. User wants his data to be retrievable throughout the deal. DealFlow enables it with help of TELLOR oracles. User can challenge any deal, and tellor reporters would post CID on-chain, which can then be verified and miner can be slashed if not validated. With IPC miner can opt to post PODSI on-chain for deal verifiability as well.
  • Easy UI: In the Filecoin network, there’s no one perfect place for miners and users to get all the options they need. With DealFlow, miner can register themselves with their asks (easily updatable), handle the subnets, view deal status, etc. Users would be able to see all available miners with their specs to choose from and verify retrieval and storage. With DealFlow, we aim to flow deals into Filecoin network, make a free-flowing experience for SPs and miners, and solve the universal problem of centralized storage.

(back to top)

Built With

(back to top)

Getting Started

You can look and interact with our frontend and backend code here. The frontend is built using Next.js and the backend is built using Hardhat and Solidity.

Prerequisites

  • Node.js
  • npm

Installation

  1. Clone the repo
    git clone https://github.com/lordshashank/dealflow.git
  2. Initialize the backend (You would have to put wallet private key in .env file to deploy, etc)
    cd contracts
    npm install
    npm hardhat compile
  3. Initialize the frontend (you would need beryx jwt token in .env to fetch data from beryx APIs)
    cd ../frontend
     npm install
     npm run dev
  4. Open the frontend on localhost:3000

(back to top)

Usage

We have used various technologies to make DealFlow functional.

Filecoin and FVM

As being on-chain we used a lot of Filecoin-solidity library to get on-chain data on deals, miners, etc. We implemented deal-making through Filecoin-client contracts, keeping deals on-chain.

IPC

IPC helps us scale everything on-chain. We spin subnets directly from our contract for each registered miner. The miner can handle the whole deal-making process through this subnet, and have a choice of tokens, collateral, consensus, etc. IPC gives us options for on-chain PODSI verification, etc with its infinite scaling capabilities. While integrating IPC, had to do it manually due to lack of package, thus collaborated with IPC team, and helped resolve few bugs to unblock package publishing through PRs leading to the first smart contract IPC package.

Tellor

Tellor comes into play for verification, FileCid and DealStatus specs of tellor help to challenge miner retrieval and deals and slash them in case of failure compensating the user.

Beryx

We don’t like backends in our dApps but this was not possible without Beryx APIs, they provided us directly usable APIs to fetch metadata for deals, miners, getting deals by tipsets, etc. Moreover, the filecoin solidity library, that is core to DealFlow has been developed by Zondax only, making it integral part of our dApp.

Fleek

Building a dApp and deploying only on centralized services don’t seem apt, we used Fleek to decentralize our deployments. You can view our deployment at https://deal-flow.on-fleek.app/

For more info, please refer to the project

(back to top)

Roadmap

We look forward to building more features and making DealFlow more robust and scalable. Some of the features we plan to add are:-

  • Miner implemenatation of IPC stack for easy to onboard miners
  • Make dApp cross-chain compatible using axelar, etc
  • File privacy encryption and
  • FIle sharing by giving access to files to other accounts

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - 0xlord_forever - shashanktrivedi1917@gmail.com

Project Link: https://github.com/lordshashank/dealflow

(back to top)

Acknowledgments

  • Thanks to Ethglobal mentors for guiding us through the project
  • Thanks to Filecoin, FVM, IPC and Tellor for helping us throughout the project, solving bugs, etc.

(back to top)

About


Languages

Language:Solidity 89.5%Language:JavaScript 7.9%Language:CSS 2.6%