Filecoin Onchain Cloud makes decentralized storage simple and programmable by providing a verifiable, sovereign, and content addressable cloud infrastructure. Filecoin Onchain Cloud modular architecture enables the creation of various services with different payment models and storage assurances between storage providers and clients. These services are built on a foundation of cryptographic storage proofs powered by PDP and automated payments powered by Filecoin Pay.
In this document, we'll explore the underlying stack of Filecoin Onchain Cloud - beginning with the foundational cryptographic storage layer, progressing through the economic infrastructure, and culminating in a complete service implementation with its developer SDK.
Let's explore each layer, starting from the PDP protocol:
Provable Data Possession (PDP) is a protocol that allows storage providers to prove they possess specific data without revealing the data itself. The system operates through a set of smart contracts that manage data sets, verification, and fault reporting. PDP serves as the backbone of Filecoin Onchain Cloud.
PDP exposes the PDPListener interface, enabling external services and contracts to define custom handlers for proof success and failure events. This modularity allows different storage services to implement their own penalty and reward mechanisms based on proof outcomes.
Learn more about PDP
PDP Explorer (PDP Scan)
The Filecoin Pay smart contract provides flexible streaming payment infrastructure that can be used by any service implementation. It creates payment rails between payers and payees with automated processing and customizable validation logic.
Each service can create multiple payment rails with different configurations:
Filecoin Pay contract exposes the IValidator interface, enabling external services and contracts to define custom handlers that validate payment settlement requests and handle payment rail termination notifications. This enables custom payment arbitration logic:
Learn more about FilecoinPay
FilecoinWarmStorageService represents a complete implementation of the Filecoin Onchain Cloud stack, demonstrating how to combine PDP and the FilecoinPay contracts to create a marketplace for warm storage with instant retrieval guarantees powered by FilBeam.
dataSetCreated() hook is called by the PDP contract to get handled by the Listener here the FilecoinWarmStorageService contract which in turn:
piecesAdded() hook is called by the PDP contract to get handled by the Listener here the FilecoinWarmStorageService contract which in turn:
possessionProven() hook is called by the PDP contract to get handled by the Listener here the FilecoinWarmStorageService contract which in turn:
validatePayment() hook is called by the Payments contract to determine the actual payout - it checks each epoch in the payment range to see if valid proofs were submitted, then calculates the reduced payment and logs the fault informationrailTerminated() hook - either the payer (client) or payee (storage provider) can manually terminate a dataset's payment railsgraph LR
A[FilecoinWarmStorage<br/>Service]
B[PDP Verifier]
C[FilecoinPay]
D[Storage Providers]
A <--> B
A <--> C
B <--> D
C --> D
This implementation represents one SLA model - the Filecoin Onchain Cloud ecosystem enables countless other service level agreements yet to be discovered.
Learn more about FilecoinWarmStorage
Synapse SDK provides a developer-friendly TypeScript interface that abstracts the complexity of interacting with FilecoinWarmStorage contracts and the underlying Filecoin Onchain Cloud stack, enabling rapid integration while providing fine-grained control when needed for specific functionalities.
graph TB
subgraph "Developer Applications"
WebApp[Web Applications]
NodeApp[Node.js Applications]
CLI[CLI Tools]
end
subgraph "Synapse SDK"
MainAPI[High-level APIs]
DatasetAPI[createDataset]
StorageAPI[upload/download]
PaymentAPI[managePayments]
end
WebApp --> MainAPI
NodeApp --> MainAPI
CLI --> MainAPI
MainAPI --> DatasetAPI
MainAPI --> StorageAPI
MainAPI --> PaymentAPI
Learn more about SynapseSDK
FS-Upload-dApp demonstrates complete integration with the Synapse SDK