PuzzleX, the BTFS on Demand Out-of-the-box Solution

Project Name: PuzzleX, the BTFS on Demand Out-of-the-box Solution

Project Track: Web3

Team Name: PuzzleX Team

Team Member(s): 4

DevPost URL: https://devpost.com/software/puzzlex-the-btfs-on-demand-out-of-the-box-solution

Project Goal: To enable out-of-the-box API & SDK access to unparalleled security, where every file is encrypted, split into puzzle pieces and stored on a global network of BTFS nodes, making data breaches and downtime a thing of the past. Furthermore PuzzleX strives to enable IPFS to BTFS backup alternative and BTFS storage payments supported with BTTC, TRON, EVM & FIAT assets.

Project documentation: PuzzleX BTFS on demand API samples - Google Docs

Project Website: https://twitter.com/PuzzleXsolution

Project Test Instructions:
Step 1: Login to PuzzleX TestNet
Step 2: Click the login button (i.e. username and email are already prefilled)
Step 3: Check node info, by clicking the Node Info button. Access additional on-chain data by following the BTFS scan link
Step 4: Upload the desired data file
Step 5: Check the BTFS uploaded data file by following the provided link
Step 6: Download the data file to your computer
Step 7: Test the PuzzleX APIs

:link: PuzzleX TestNet

Inspiration

Data is becoming the new digital oil. The time for reliable, permissionless, decentralized and secure data storage is now. Furthermore, it is time to retail data ownership and control within the remote storage process. With just a few solutions on the market, the BTFS (i.e. BitTorrent File System) offers a scalable and affordable solution, but the integration process is highly demanding. PuzzleX harnesses the power of BTFS and enables easy access via custom APIs & SDKs while enabling multi-asset storage settlement.

What is BTFS

BTFS (i.e. BitTorrent File System) is the next-generation decentralized file storage system built for Web3 Applications. BTFS provides a global decentralized storage service with high reliability. Interoperability with smart contracts based on BTTC, ETH & TRON, makes BTFS Web3 native while becoming more scalable along with low cost and high security. The BTFS network is primarily composed of BTFS nodes, including renters and hosts. Renters can upload files by paying WBTT while hosts provide storage in the network for BTT rewards.

What is PuzzleX

A suite of back-end protocols and services that enable developers to connect to PuzzleX BTFS custom nodes via dedicated service APIs & SDKs, while utilising the read and write methods of BTFS out-of-the-box. Besides the native BTFS compatibility with the BitTorrent Chain (i.e. BTTC), the integrated underlying swap mechanism will enable further interoperability with Tron and other EVM networks, as it will enable the storage rent payments in Tron and other EVM assets (i.e. multi-chain support will be added gradually). Furthermore, the IPFS to BTFS backup module will enable easy and accessible migration of the current IPFS data (i.e. NFTs, data files, media) to BTFS, providing a reliable and true decentralized storage alternative.

Solution key points:

  • Out-of-the-box access to unparalleled security, where every file is encrypted, split into puzzle pieces and stored on a global network of BTFS nodes, making data breaches and downtime a thing of the past.
  • Multi-chain APIs & SDKs ready to support any Web2 or Web3 decentralized storage needs.
  • Storage payment supported with BTTC, TRON, EVM & FIAT assets.
  • IPFS to BTFS backup.

How we built it

Simplicity by design was our guiding approach, that simply means that we put into consideration how we could enable easy BTFS access and usage for any Web2 or Web3 project. The full project framework consists of eight main parts;

  • (1) Kubernetes single click BTFS node setup
  • (2) Node backup protocol
  • (3) APIs (new wallet registration, authorisation, upload, download)
  • (4) SDK (new wallet registration, authorisation, upload, download)
  • (5) Tokenization (BTFS storage payments, PuzzleX fee collection, end user subscription framework)
  • (6) Back-end token swap (used as an underlying payment method - Token X to BTT)
  • (7) IPFS to BTFS migration module
  • (8) End user UI

Node link:
PuzzleX BTFS TestNet

Contract link:
PuzzleX BTTC TestNet

Integration Process:

  • :arrow_right: Step 1 - Upon user registration, API key is assigned
  • :arrow_right: Step 2 - User chooses between API & SDK (GitHub repository URL) integration
  • :arrow_right: Step 3 - User authentication via API or SDK with a response in a form of a JWT (i.e. JSON web token) auth token
  • :arrow_right: Step 4 - Calling upload & download methods

API upload file snippet

curl --request POST \
  --url https://api.datavallis.com/v1/storage/btfs \
  --header 'Content-Type: multipart/form-data' \
  --header 'Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50X2lkIjoxLCJlbWFpbCI6ImRlbW9AYnRmcy5pbyIsImFjY291bnRfdHlwZV9pZCI6MiwidGltZSI6MTY2NzQxMTg2MX0.Jed7_9Dv960070FN1ppGKAfjA4ZT_Y5emAeByekyEL8' \
  --form file=@myOfficeDemoImage.jpg

API download file snippet

curl --request GET \
  --url 'https://api.datavallis.com/v1/storage/btfs?fileHash=QmbHBcAZn9WNHMX7NhoNxUZXVBSdsEH3uNXXujGM7dx87J' \
  --header 'Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50X2lkIjoxLCJlbWFpbCI6ImRlbW9AYnRmcy5pbyIsImFjY291bnRfdHlwZV9pZCI6MiwidGltZSI6MTY2NzQxMTg2MX0.Jed7_9Dv960070FN1ppGKAfjA4ZT_Y5emAeByekyEL8' --output ./myOfficeDemoImage.jpg

:bulb:Access full documentation: PuzzleX wiki

First use case

The PuzzleX is already used by the Tron & BTTC dMail & dChat developed by 4thTech (i.e. Tron Hackathon Season 2 Web3 track winner). In the case of 4thTech, the BTFS decentralized storage is used for the temporary or permanent storage of encrypted data files, media and JSON files (i.e. dMail, subject & content attachment location) that are exchanged between wallets in the dMail or dChat process. The decryption and access to the data files are possible only with a private key of the user

Tokenization & Monetization

There are a few basic costs connected with PuzzleX de-storage service;

  • (1) Base BTFS storage cost per GB;
  • (2) BTTC settlement transaction cost, and;
  • (3) PuzzleX fee.

After significant testing, ruining our own BTFS nodes and executing transactions on the BTTC TestNet, we have come to the conclusion that the average price for 1GB storage on BTFS is 3750.00 WBTT/Month, while the average BTTC transaction cost per one event is 50 BTT. With the estimated price of $0.0000007 (i.e. recorded on the 9th of November 2022) for one BTT, the cost of an event (i.e. data file upload or download) is neglable. Further BTFS & BTTC MainNet testing will be done to produce more accurate results. With main goal to enable easy access to BTFS no matter of the native project chain, new fees such as;

(1) cross chain asset bridging transactions, and;
(2) asset swap transaction.

will have to be added to enable any user to use BTFS and settle the storage cost in the token of his/her choice. The PuzzleX end-user UI will enable BTFS storage usage in a user-friendly GUI, offering Freemium subscription including Fiat payments.

Challenges we ran into

The challenge was to enable BTFS out-of-the-box as a multi-chain solution, while also enabling the storage multi-asset payment (while the native BTFS service payments are settled in BTT, the underlying swap will enable the storage payments in the token of the user’s choice).

What’s next for BTFS on Demand

:arrow_right: Q4 2022 PuzzleX TestNet (done)
:arrow_right: Q1 2023 PuzzleX tokenization module
:arrow_right: Q1 2023 Back-end token swap
:arrow_right: Q2 2023 PuzzleX SKD & API MainNet
:arrow_right: Q3 2023 IPFS to BTFS backup migration module
:arrow_right: Q3 2023 PuzzleX end-user UI

The Meaning behind the “PuzzleX” brand

When you add a file to decentralized storage, your file is split into smaller chunks and distributed between various nodes. The small data chunks puzzle can be glued back together only with the user’s private key. The letter “x” is often used in algebra to mean a value that is not yet known. The evergrowing value of data is yet unknown and hard to predict, so the letter “X” fits the brand perfectly.

20 Likes

Great . Would like to use this

3 Likes

Great to see projects building on BTTC and boosting the use of BTT :+1:

3 Likes

Nice and ambitious project! Keep on the good work! :slight_smile:

3 Likes

Thanks for comments. It’s nice to see interest and nice words around the project.

2 Likes

Great. You can already use it with images or videos on TestNet link.

3 Likes

Oh, that’s cool. I’ll try it soon

3 Likes

What a great project this is… great mind

2 Likes

Thanks, we really appreciate it :fire: :fire:

2 Likes

Good project… Keep it up👍

5 Likes

This is a good work. Keep it up

2 Likes

Thank you all for positive outlook and support :+1::+1:

This is really a great project…I hope it goes well

This is indeed a great project for the ecosystem. We need more of this here!

Is it live on the mainnet?

What a fantastic project …love it