application-research / outercore-eng-kb

Official Knowledge base repo of Estuary
https://estuary.tech
5 stars 0 forks source link

EstuaryPinningContract on FEVM #11

Open alvin-reyes opened 1 year ago

alvin-reyes commented 1 year ago

Idea/Proposal: EstuaryPinningContract on FEVM

Contributors @alvin-reyes  
Status Draft
Revision  

Proposal/Overview

Create an EstuaryPinningContract to allow users to request CIDs to be processed by Estuary.

image

jimmylee commented 1 year ago

As long as the user in this case can also be a service, therefore the service can charge its consumers whatever it needs to justify the FIL per CID price.

alvin-reyes commented 1 year ago

The payment here may or may not be per CID. It can be denominated based on FIL per GB.

E.i: if we have a price of 1GB = 1FIL, 2 CIDs that’s 0.5GB in size will cost 1 FIL. If someone wants to store 3.5GB worth of CIDs, they’ll have to pay 3.5 FIL. We would need an Oracle to get the FIL/USD to GB price.

kelindi commented 1 year ago

Does the user paying per cid mean that estuary would be charging for storage if accessed through the FVM vs our api?

gmelodie commented 1 year ago

Why not have something more general? PinningContract to which you can pass a peerID and that contract will try to have that peer to pin your content.

alvin-reyes commented 1 year ago

@kelindi this assumes that we will only strictly serve paying customers all APIs are authenticated via subscription service.

@gmelodie we can. The contract can accept a CID and we will store it in an array mapping of index, cid, address and status. We will then expose a function to get the list of CID so that an external service can call the function and grab the CIDs and pass it to /pinning/pins.

Once we have those dealt with (storage deal), we will need to call the contract ourselves to add the completed CIDs to a complete mapping on the contract.