PX Architecture

Harnesses the power and security of decentralized storage networks while enabling end-users to access decentralize storage with ease.

The architecture was designed to be as lightweight and modular as possible while retaining core decentralization primitives. With many iterations behind five key components are forming the core PX framework;

(1) smart contract & libraries;

(2) on-chain storage validation;

(3) PX Nodes;

(4) PX sNFT authorisation, and;

(5) PX client.

Zooming out, the architecture is quite straightforward. As shown in the infrastructural layer stack diagram, there are UI clients built on top of the SDK, powered by BTFS, storage nodes, protocols, assets and blockchain networks.

Minting a PX sNFT;

(1) the user mints a new PX sNFT on the blockchain;

(2) the user interacts with the PX sNFT smart contract through the application (dApp) or an explorer*;

(3) the smart contract generates a new PX sNFT token and associates it with the user's wallet address, and;

(4) during the minting process, the smart contract also saves the BTNS key for the minted PX sNFT.

*If PX sNFT is minted directly on a smart contract via blockchain Explorer, the user needs to make PX sNFT registration through registration management to generate the BTNS key.

PX sNFT registration management;

(1) the process generates and allocates a unique BTNS key to PX sNFT which is used to reference storage usage metadata on BTFS.

*IPNS details: https://docs.ipfs.tech/concepts/ipns/#mutability-in-ipfs

Uploading files and saving storage usage metadata;

(1) the user uploads the files on the PX sNFT (prerequisite; available free PX sNFT storage);

(2) the files are saved BTFS (or any other supported decentralized storage network);

(3) upon successful file upload, the PX Node provides the storage usage for the uploaded file and saves storage usage metadata, which includes storage quota, current usage and the CID of the uploaded file, and;

(4) the metadata is stored on BTFS and referenced by PX sNFT assigned BTNS key.

Syncing mechanism;

(1) the user wants to ensure that his storage usage metadata is synchronized with the blockchain, so he triggers a sync operation through the dApp or explorer;

(2) the user calls the synch function on the PX sNFT smart contract providing the PX sNFT token ID;

(3) the PX sNFT smart contract uses Chainlink to fetch the latest metadata from BTFS using the user's PX sNFT BTNS key;

(4) after retrieving the metadata, the PX sNFT smart contract updates users' PX sNFT token on-chain with the latest storage usage information.

When the user chooses not to synch their storage usage metadata;

Users who do not sync their storage usage metadata within the specified timeframe face temporary restrictions on uploading files, and PX sNFT will not allow uploads. After synchronization, PX sNFT will allow uploads again.

Note: While the PX infrastructure is natively interoperable with IPFS and IPNS, the first production integrations are made using BTFS and BTNS frameworks. Other decentralized storage network support will follow according to the project roadmap.

Latest Releases:

Last updated