-
Notifications
You must be signed in to change notification settings - Fork 2
chore: add metric definitions #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b2c8119
chore: copy METRIC-DEFINITIONS.md from timfong888/filecoin-pay-console
pyropy 54115f3
chore: default to client over server components
pyropy 32701e7
Revert "chore: default to client over server components"
pyropy 7b6b6de
chore: leave only GA metric definitions
pyropy 752f70f
chore: change total locked metric formula
pyropy fe3b333
fix: total buren description & total locked formula
pyropy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Metric Definitions | ||
|
|
||
| This document defines the hero metrics displayed in the Filecoin Pay Console dashboard. | ||
|
|
||
| ## Status | ||
|
|
||
| * 2026-02-09 - Initial GA metric set definitions. | ||
|
|
||
| --- | ||
|
|
||
| ## 1. Total Locked (USDFC & FIL) | ||
|
|
||
| - **Definition:** Total amount of USDFC and FIL currently locked across all payment rails | ||
| - **Display:** FIL and USDFC displayed separately (no conversion) | ||
| - **Purpose:** Represents funds deposited and locked in active payment rails | ||
| - **Source:** `Token` entities from Goldsky subgraph | ||
| - **Formula:** | ||
| ``` | ||
| For each token (USDFC, FIL): | ||
| totalLocked = token.lockupCurrent + token.lockupRate * (blockNumber - token.lockupLastSettledUntilEpoch) where token == tokenAddress | ||
| ``` | ||
| - **Conversion:** Divide by 10^18 (TOKEN_DECIMALS) for human-readable values | ||
|
|
||
| --- | ||
|
|
||
| ## 2. Total Transacted (USDFC & FIL) — Cumulative | ||
|
|
||
| - **Definition:** Cumulative sum of all USDFC and FIL transacted across all payment rails since inception | ||
| - **Includes:** Settlement payments + one-time payments | ||
| - **Display:** FIL and USDFC displayed separately (no conversion) | ||
| - **Source:** `Token.totalSettledAmount` and `Token.totalOneTimePayment` from Goldsky subgraph | ||
| - **Formula:** | ||
| ``` | ||
| For each token (USDFC, FIL): | ||
| totalTransacted = (token.totalSettledAmount + token.totalOneTimePayment) where token == tokenAddress | ||
| ``` | ||
| - **Conversion:** Divide by 10^18 (TOKEN_DECIMALS) for human-readable values | ||
|
|
||
| --- | ||
|
|
||
| ## 3. Total FIL Burned — Cumulative | ||
|
|
||
| - **Definition:** Cumulative sum of FIL burned across all payment rails since inception | ||
| - **Sources:** | ||
| 1. **Direct burn from FIL transfers:** When a payment rail settles in FIL or when a one-time payment occures, a portion of transffered FIL is burned | ||
| 2. **Auction burn (`burnForFIL`):** FIL burned via Filecoin Pay Auction mechanism | ||
| - **Source Entity:** `PaymentsMetric` from Goldsky subgraph | ||
| - **Formula:** | ||
| ``` | ||
| totalFilBurned = paymentsMetric.totalFilBurned | ||
| ``` | ||
| - **Conversion:** Divide by 10^18 for human-readable FIL values |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.