Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pyropy
left a comment
There was a problem hiding this comment.
Hey @davidgasquez let's start a discussion on metrics here 🙌🏻
METRIC-DEFINITIONS.md
Outdated
|
|
||
| #### FIL Burned | ||
| - **Definition:** Total FIL burned from three sources: | ||
| 1. Settling USDFC |
There was a problem hiding this comment.
Settling USDFC does not inherently burn any FIL, rather the settled USDFC is set for auction and the FIL is burned only after successful bid.
There was a problem hiding this comment.
This seems like a good note. Add it inline?
METRIC-DEFINITIONS.md
Outdated
| - **Formula:** `Σ(account.userTokens.lockupCurrent)` converted from wei (18 decimals) to USDFC | ||
| - **Note:** Same metric as GA Mode. Displayed between Active Payers and USDFC Settled. | ||
|
|
||
| #### Total Settled (USDFC) |
There was a problem hiding this comment.
Are we only interested in displaying USDFC settlement? What about native (FIL) settlements? Do we need separate metric for those?
There was a problem hiding this comment.
Is this also a duplicate metric (there is USDFC Settled (Cumulative) above)?
METRIC-DEFINITIONS.md
Outdated
| - **Source:** Sum of `Rail.totalSettledAmount` across all rails with settlements | ||
| - **Formula:** `Σ(rail.totalSettledAmount)` converted from wei (18 decimals) to USDFC | ||
|
|
||
| #### Settled (7d) |
There was a problem hiding this comment.
Do settlements include one-time payments? These two seem different, although we (FilBeam) are using one-time payments for egress settlements.
Perhaps this could be another metric (i.e. Transfers (7d) ) ?
METRIC-DEFINITIONS.md
Outdated
| 1. Settling USDFC | ||
| 2. Settling FIL | ||
| 3. Auction |
There was a problem hiding this comment.
METRIC-DEFINITIONS.md
Outdated
| - **Sortable:** Yes | ||
|
|
||
| ### Data Size | ||
| - **Definition:** Total data size in GB across all payees' PDP proof sets |
There was a problem hiding this comment.
Seems like we're expanding functionality of Filecoin Pay explorer here. Maybe it's time to rename the project to Filecoin Services Explorer? :D
There was a problem hiding this comment.
+1 to this. The scope here feels broader than “Filecoin Pay Explorer” at this point.
Also, why does data size on payer accounts aggregate payee datasets? If that’s intentional, the column should reflect 'data the payer is paying for,' or be renamed.
There was a problem hiding this comment.
Checking my assumption here. Would the event data for this be in pdp contract/ABI?
METRIC-DEFINITIONS.md
Outdated
| - **Sortable:** Yes | ||
|
|
||
| ### Proven | ||
| - **Definition:** Proof submission status for the payer's payees |
There was a problem hiding this comment.
| - **Definition:** Proof submission status for the payer's payees | |
| - **Definition:** Proof submission status for the payer's payment rails |
Payees might submit proofs for other non-related payment rails (one payee might have multiple payers). I propose only displaying proofs for payers payment rails.
METRIC-DEFINITIONS.md
Outdated
| ## Data Sources | ||
|
|
||
| ### Filecoin Pay Subgraph (Goldsky) | ||
| - **Endpoint:** `https://api.goldsky.com/api/public/project_cmj7soo5uf4no01xw0tij21a1/subgraphs/filecoin-pay-mainnet/1.1.0/gn` | ||
| - **Entities Used:** Account, Rail, Settlement, PaymentsMetric, UserToken, Token | ||
| - **Purpose:** Payment rails, settlements, account balances | ||
|
|
||
| ### PDP Explorer Subgraph (Goldsky) | ||
| - **Endpoint:** `https://api.goldsky.com/api/public/project_cmdfaaxeuz6us01u359yjdctw/subgraphs/pdp-explorer/mainnet311/gn` | ||
| - **Entities Used:** Provider | ||
| - **Purpose:** Storage provider proof status and data sizes | ||
| - **Correlation Key:** `Provider.address` matches `Rail.payee.address` | ||
|
|
||
| --- | ||
|
|
||
| ## Constants | ||
|
|
||
| | Constant | Value | Description | | ||
| |----------|-------|-------------| | ||
| | `EPOCH_DURATION_SECONDS` | 30 | Duration of one Filecoin epoch | | ||
| | `EPOCHS_PER_DAY` | 2880 | 24 × 60 × 60 / 30 | | ||
| | `EPOCHS_PER_24_HOURS` | 2880 | Used for proof freshness check | | ||
| | `FILECOIN_GENESIS_TIMESTAMP` | 1598306400 | 2020-08-25 00:00:00 UTC | | ||
| | `TOKEN_DECIMALS` | 18 | USDFC decimal places | | ||
| | `BYTES_PER_GB` | 1073741824 | 1024³ | |
There was a problem hiding this comment.
To other reviewers I propose ignoring this for now until we sort the metric definitions.
METRIC-DEFINITIONS.md
Outdated
| - **Formula:** `Σ(account.userTokens.lockupCurrent)` converted from wei (18 decimals) to USDFC | ||
| - **Note:** This represents the total amount of USDFC that has been deposited and is locked to secure active payment rails. Displayed between Active Payers and USDFC Settled. | ||
|
|
||
| #### USDFC Settled (Cumulative) |
There was a problem hiding this comment.
Are we interested in native token settlements?
METRIC-DEFINITIONS.md
Outdated
| - **Display:** Formatted as currency (e.g., "$1.23K", "$456.78") | ||
| - **Sortable:** Yes | ||
|
|
||
| ### Settled (7d) |
There was a problem hiding this comment.
Should this be a single number or time series?
|
@timfong888 I went over your dashboard prototype and reviewed some of the metrics and stuff displayed over there. It's more of a general feedback / questions on what we want to display as that will shape what we put into the METRICS-DEFINITIONS.md file Main page (Dashboard)
Payer accounts page
Payee accounts page
Payer Details
Payee details
cc @geomatrick I know Tim and you have worked on this quite a bit, so maybe you have also some feedback on what metrics we'd like to display? |
This reverts commit 54115f3.
METRIC-DEFINITIONS.md
Outdated
|
|
||
| #### USDFC Settled (Cumulative) | ||
| - **Definition:** Cumulative sum of all USDFC settled across all payment rails since inception | ||
| - **Source:** Sum of `Rail.totalSettledAmount` across all rails with settlements |
There was a problem hiding this comment.
Should one-time payments count toward the “settled amount” for a rail?
I think they should. I didn’t treat them as settlements earlier, but if that’s the intended behavior, #86 addresses it. Otherwise, we should be explicit about excluding them.
There was a problem hiding this comment.
Judging by the @timfong888 's implementation one-time payments are counted towards total settled amount.
Reason I have asked this same question is that one-time payments are not used only for settlements, but for example one may use it to charge a one-time fee for data set creation to prevent sybil attacks.
Edit: @timfong888 's implementation does not count one-time payments towards settlements which in my mind is a right thing to do.
There was a problem hiding this comment.
Yes, that's right we should. I only used the recurring rails. Do we want to differentiate between the sybil fee and one-time payments? We should include that total.
METRIC-DEFINITIONS.md
Outdated
| #### Settled (7d) | ||
| - **Definition:** Total USDFC settled in the last 7 days (rolling window) | ||
| - **Source:** `Settlement` events from Goldsky subgraph filtered by timestamp | ||
| - **Formula:** `Σ(settlement.totalSettledAmount)` where `settlement.settledUpto >= (now - 7 days)` |
There was a problem hiding this comment.
This formula looks incorrect. Settlements should only include rails using the USDFC token.
Also, we should use settlement.createdAt instead of settlement.settledUpto here.
| - **Formula:** `Σ(settlement.totalSettledAmount)` where `settlement.settledUpto >= (now - 7 days)` | |
| - **Formula:** `Σ(settlement.totalSettledAmount)` where `settlement.rail.token == USDFC_TOKEN_ADDRESS AND settlement.blockNumber >= (now - 7 days)` |
There was a problem hiding this comment.
What are we excluding if not using USDFC token for settlement? I know the definition or objective was USDFC settled, so this is correct; but should we as a fast-follow break out to show other tokens? I think it's a good idea to constrain to the token address as indicated.
There was a problem hiding this comment.
There are some rails using the FIL token today, those would be excluded with the current USDFC-only logic.
I agree we should constrain this to USDFC for now, but design it with multi-token support in mind.
There was a problem hiding this comment.
I don't have context here but, why constrain to USDFC? Trying to understand if I have to support a multi-token metrics or USDFC is the expected token for the foreseable future.
METRIC-DEFINITIONS.md
Outdated
| - **Sortable:** Yes | ||
|
|
||
| ### Data Size | ||
| - **Definition:** Total data size in GB across all payees' PDP proof sets |
There was a problem hiding this comment.
+1 to this. The scope here feels broader than “Filecoin Pay Explorer” at this point.
Also, why does data size on payer accounts aggregate payee datasets? If that’s intentional, the column should reflect 'data the payer is paying for,' or be renamed.
METRIC-DEFINITIONS.md
Outdated
| ### Settled (7d) | ||
| - **Definition:** USDFC settled by this payer in the last 7 days | ||
| - **Source:** `Settlement` events filtered by payer address and timestamp | ||
| - **Formula:** `Σ(settlement.totalSettledAmount)` where `settlement.rail.payer.address == payerAddress AND timestamp >= now - 7 days` |
There was a problem hiding this comment.
| - **Formula:** `Σ(settlement.totalSettledAmount)` where `settlement.rail.payer.address == payerAddress AND timestamp >= now - 7 days` | |
| - **Formula:** `Σ(settlement.totalSettledAmount)` where `settlement.rail.payer.address == payerAddress AND settlement.rail.token == USDFC_ADDRESS AND timestamp >= now - 7 days` |
METRIC-DEFINITIONS.md
Outdated
| - **Purpose:** Payment rails, settlements, account balances | ||
|
|
||
| ### PDP Explorer Subgraph (Goldsky) | ||
| - **Endpoint:** `https://api.goldsky.com/api/public/project_cmdfaaxeuz6us01u359yjdctw/subgraphs/pdp-explorer/mainnet311/gn` |
There was a problem hiding this comment.
Who’s maintaining this going forward?
Also, if the scope is expanding beyond just Filecoin Pay contract (toward full FOC), should we consider indexing PDPVerifier alongside the Filecoin Pay contract in a single subgraph?
There was a problem hiding this comment.
Who’s maintaining this going forward?
Are you referring to subgraph or the project as a whole? Response we got from @jennijuju is that the pod is responsible for the explorer.
Also, if the scope is expanding beyond just Filecoin Pay contract (toward full FOC), should we consider indexing PDPVerifier alongside the Filecoin Pay contract in a single subgraph?
That's also question I had. Looks like we're transitioning to a Filecoin Services explorer.
There was a problem hiding this comment.
I was referring to PDP Explorer Subgraph - Looks like pod is responsible for that too.
There was a problem hiding this comment.
@silent-cipher : to make sure we aren't losing track of it operationally, where does this subgraph definition live in code? Acutally, if you don't mind, it would be good to get a full list of our subgraphs and their source code links added to https://www.notion.so/filecoindev/FOC-Operational-Excellence-2b7dc41950c1802aa432fff8ecb801cc?source=copy_link#2e1dc41950c18031a285cf6f826a4c28
BigLep
left a comment
There was a problem hiding this comment.
I'm not a blocking approver here. I wanted to read it to be more aware of how things worked, but please feel free to proceed without further review from me.
METRIC-DEFINITIONS.md
Outdated
| - **Definition:** Total USDFC currently locked across all accounts for future payments | ||
| - **Source:** Sum of `Account.userTokens.lockupCurrent` from Goldsky subgraph | ||
| - **Formula:** `Σ(account.userTokens.lockupCurrent)` converted from wei (18 decimals) to USDFC | ||
| - **Note:** This represents the total amount of USDFC that has been deposited and is locked to secure active payment rails. Displayed between Active Payers and USDFC Settled. |
There was a problem hiding this comment.
I don't know what "Displayed between Active Payers and USDFC Settled" menas.
METRIC-DEFINITIONS.md
Outdated
|
|
||
| #### FIL Burned | ||
| - **Definition:** Total FIL burned from three sources: | ||
| 1. Settling USDFC |
There was a problem hiding this comment.
This seems like a good note. Add it inline?
METRIC-DEFINITIONS.md
Outdated
| 1. Settling USDFC | ||
| 2. Settling FIL | ||
| 3. Auction | ||
| - **Status:** Coming soon (placeholder metric) |
There was a problem hiding this comment.
Link to tracking issue (and then update the tracking issue to have a note to update this doc)?
METRIC-DEFINITIONS.md
Outdated
| - **Definition:** Total USDFC currently locked across all accounts for future payments | ||
| - **Source:** Sum of `Account.userTokens.lockupCurrent` from Goldsky subgraph | ||
| - **Formula:** `Σ(account.userTokens.lockupCurrent)` converted from wei (18 decimals) to USDFC | ||
| - **Note:** Same metric as GA Mode. Displayed between Active Payers and USDFC Settled. |
There was a problem hiding this comment.
If this is a duplicate metric in a prototype, why even document it?
There was a problem hiding this comment.
Yeah, I think this is the same as the one on top!
METRIC-DEFINITIONS.md
Outdated
| - **Source:** Engineering will drive implementation | ||
| - **Note:** Non-functional in current release - displays placeholder value | ||
|
|
||
| ### Prototype Mode Metrics |
There was a problem hiding this comment.
If we're going to document "prototype mode" metrics (I'm not even sure that's important), do we document where someone goes to see these "prototype mode" metrics?
(But again I'm wondering if we even want to document these in our public docs unless we expect others to access "prototype mode".)
METRIC-DEFINITIONS.md
Outdated
|
|
||
| ### Address | ||
| - **Definition:** The wallet address of the payer account | ||
| - **Display:** Truncated address (`0x1234...abcd`) or ENS name if resolved |
There was a problem hiding this comment.
Link/describe how ENS name is resolved?
METRIC-DEFINITIONS.md
Outdated
| - **Purpose:** Payment rails, settlements, account balances | ||
|
|
||
| ### PDP Explorer Subgraph (Goldsky) | ||
| - **Endpoint:** `https://api.goldsky.com/api/public/project_cmdfaaxeuz6us01u359yjdctw/subgraphs/pdp-explorer/mainnet311/gn` |
There was a problem hiding this comment.
@silent-cipher : to make sure we aren't losing track of it operationally, where does this subgraph definition live in code? Acutally, if you don't mind, it would be good to get a full list of our subgraphs and their source code links added to https://www.notion.so/filecoindev/FOC-Operational-Excellence-2b7dc41950c1802aa432fff8ecb801cc?source=copy_link#2e1dc41950c18031a285cf6f826a4c28
METRIC-DEFINITIONS.md
Outdated
| --- | ||
|
|
||
| ## Removed Metrics | ||
|
|
||
| ### Monthly Run Rate (MRR) | ||
| - **Status:** Removed as of v0.11.0 | ||
| - **Reason:** Replaced with actual settlement data (Settled 7d) for more accurate activity representation | ||
| - **Previous Definition:** Projected monthly payment volume based on active rail payment rates | ||
| - **Previous Formula:** `Σ(activeRail.paymentRate) × EPOCHS_PER_MONTH (86,400)` |
There was a problem hiding this comment.
Given we haven't hit GA yet or had a v1 of this document before, maybe not even worry about this?
There was a problem hiding this comment.
Consider putting a "changelog" at the top of the file that gets short updates when changes are made after v1?
## Status
* 2026-01-28 - Initial GA metric set definitions.
There was a problem hiding this comment.
Left a couple of questions. Thanks for opening starting the discussion @pyropy, it's been helpful
We should either leave total active payers chart or just display the number of total active payers, I don’t see the need for both
I think the chart might be "incorrect" as it is looking at the current state so historical values will change. It'll be always growing and monotonic even if from one day to another it goes down by 10 active payers.
METRIC-DEFINITIONS.md
Outdated
| - **Definition:** Total USDFC currently locked across all accounts for future payments | ||
| - **Source:** Sum of `Account.userTokens.lockupCurrent` from Goldsky subgraph | ||
| - **Formula:** `Σ(account.userTokens.lockupCurrent)` converted from wei (18 decimals) to USDFC | ||
| - **Note:** Same metric as GA Mode. Displayed between Active Payers and USDFC Settled. |
There was a problem hiding this comment.
Yeah, I think this is the same as the one on top!
METRIC-DEFINITIONS.md
Outdated
| - **Formula:** `Σ(account.userTokens.lockupCurrent)` converted from wei (18 decimals) to USDFC | ||
| - **Note:** Same metric as GA Mode. Displayed between Active Payers and USDFC Settled. | ||
|
|
||
| #### Total Settled (USDFC) |
There was a problem hiding this comment.
Is this also a duplicate metric (there is USDFC Settled (Cumulative) above)?
METRIC-DEFINITIONS.md
Outdated
| #### Settled (7d) | ||
| - **Definition:** Total USDFC settled in the last 7 days (rolling window) | ||
| - **Source:** `Settlement` events from Goldsky subgraph filtered by timestamp | ||
| - **Formula:** `Σ(settlement.totalSettledAmount)` where `settlement.settledUpto >= (now - 7 days)` |
There was a problem hiding this comment.
I don't have context here but, why constrain to USDFC? Trying to understand if I have to support a multi-token metrics or USDFC is the expected token for the foreseable future.
METRIC-DEFINITIONS.md
Outdated
| - **Sortable:** Yes | ||
|
|
||
| ### Data Size | ||
| - **Definition:** Total data size in GB across all payees' PDP proof sets |
There was a problem hiding this comment.
Checking my assumption here. Would the event data for this be in pdp contract/ABI?
|
In case it is helpful, I'm working on the same metrics using the existing definition but deriving everyghing from the FEVM logs.
|
|
Linking this comment here. We might want to wait with metric definitions until we have subgraph ready. Depending on the subgraph formulas to get the metrics might change. As for definitions, we'd only need three:
|
|
@davidgasquez for myself to understand the stack, what is pipeline you have set up to use EVM Logs? REgarding the other questions, I belive the PDP verifier contract was where I found data size. It is not in the pay contract. |
I'm working on the pipeline but for now, Riba has published the result of the I'm ingesting these and then decoding all the events from any contract ABI I can get my hands into. That gives me all the events with their With this pipeline, I just need to tweak the SQL transformations and rerun it (1 second) to tweak the metrics. |

Copies METRICS-DEFINITIONS.md from https://github.com/timfong888/filecoin-pay-console
Closes #85