project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

Sapo

Sapo is your gateway to decentralized computation on fevm using Bacalhau

Sapo

Created At

FVM Space Warp

Winner of

trophy

🔥 Filecoin & IPFS — 🏊 FVM Jetpacks

trophy

🏆 FVM Space Warp Finalist

Project Description

Sapo is a decentralized cloud computing platform that leverages the Filecoin EVM and Bacalhau compute over data ecosystem. The main goal of Sapo is to provide an easy way to perform fully decentralized computation, enabling users to create more value from their data stored on Filecoin.

Sapo offers a one-stop solution and opens up new opportunities for Data Daos, researchers, and developers to harness the power of decentralized cloud computing with enhanced security, privacy, and control over their data and applications. It provides a complete and convenient solution for both generic and custom computing jobs.

Filecoin and IPFS distribute datasets across storage providers globally, increasing data redundancy and resiliency. However, executing computation jobs or data pipelines on globally distributed data is challenging. The decentralized compute solution offered by Sapo pushes the compute over data to a new level by coordinating jobs execution through a custom FEVM Bridge actor to the Bacalhau network.

Currently, the Sapo bridge actor only distribute workloads to bacalhau and ensure a fair remuneration. In the future, we plan to incentivize compute execution and prove the validity of the computation's result. Storage providers could enroll in these new compute networks, and clients can post jobs to the FVM actor for execution. The mechanism assigns jobs to providers, and once executed, the provider can claim rewards by posting a proof.

How it's Made

Sapo was built in 1 week!

We first built a main contract for the project called 'SapoBridge', where users can request job executions for a small fee. The job execution consists of an IPFS CID for the input, a docker image, and a string of arguments. The SapoBridge creates a new small contract (a SapoJob) for each job and emits an event. We forked the lilypad work-in-progress fevm-bacalhau integration from the Bacalhau team. We then made our own bridge to listen to the events on the SapoBridge contract, distribute the workload to a Bacalhau node, get the result and set it in the corresponding JobContract. The funds are released on the contract if the job fails, and a small fee is deducted if it succeeds.

The frontend of the project was built using Next.js to provide an easy-to-use experience for the user. We also created a dataDao specification to allow users to get all files stored in a dataDao directly on the app with the address of the Dao. The job specifications are managed and stored using LightHouse and stored as Json. The user can request a job execution by paying a small fee and can fetch their job history and execution results.

The team had a hard time making it all work together and there are a few areas for improvement in the project such as better result formatting and fetching in the frontend, estimating computation price based on job complexity, verifying computation on-chain, and Bacalhau GPU support for various jobs. However, despite the challenges, we are incredibly proud of what we've built and it serves as a example of the possibilities of decentralized computation on Filecoin with FEVM in the near future.

background image mobile

Join the mailing list

Get the latest news and updates