App builders earn revenue: integrator fee recipients on FWSS rails

Open
#656 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
solidity

Research direction

Start with LibRails.createRails, which the issue identifies as the place where storage rails are created with commission 0 and FWSS as serviceFeeRecipient; read the related filecoin-pay issues #303 and #300 for the v2 rail context. The proposal leaves the recipient interface and cap to be designed. Done means integrators can receive a capped share of validated settlements, payers can see the total rate, and recipients cannot affect proving, termination, or the payer's escape hatch.

Written by the indexing model from the issue text.

Description

user story: as an app builder who brings users to FWSS, i want rails created through my app to pay a capped share of settlement to my address, so i only earn while my users' data is actually stored and proven.

why it doesn't work today
only the rail creator sets commission, and FWSS creates every storage rail itself with commission 0 and itself as serviceFeeRecipient (LibRails.createRails). an app can take a cut of deposits, but can't earn on ongoing storage.

why v2 is the moment
with FilOzone/filecoin-pay-v2#6 (and rail logic moving into FWSS), who gets paid on settlement is FWSS code. so this is mostly a question of whether FWSS's rails accept extra recipients at creation.

rough proposal

  • data set creation accepts optional {recipient, bps}[], with a total cap enforced on-chain (e.g. 5%, just as an example)
  • recipients are paid from validated settlement only, same as the SP
  • payer sees the total rate (SP + recipients) before approving
  • recipients are readable from the rail / data set, for attribution and explorers

acceptance

  • a data set created through an integrator pays that integrator on every validated settlement
  • the cap can't be exceeded
  • recipients can't affect proving, termination, or the payer's escape hatch

related: FilOzone/filecoin-pay-v2#6, FilOzone/filecoin-pay-v2#5, "app builders earn revenue" row on the v2 use-case page

Dominant language
Solidity
Stars
8
Forks
27
Avg merge
2d 5h
Merged PRs (30d)
12

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FilOzone/filecoin-services

All issues in FilOzone/filecoin-services

Similar issues

More Blockchain issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.