Skip to content

Commit

Permalink
add: power user metric (#1534)
Browse files Browse the repository at this point in the history
* add: power user metric

* chore: add metric to consolidate model

* fix: linting in new metric

* chore: update rf4 metrics blog post
  • Loading branch information
ccerv1 authored May 27, 2024
1 parent accb705 commit ddbfbdb
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 4 deletions.
8 changes: 7 additions & 1 deletion apps/docs/blog/2024-05-16-impact-metrics-rf4/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The round is expected to receive applications from hundreds of projects building

At Open Source Observer, our objective is to help the Optimism community arrive at up to 20 credible impact metrics that can be applied to projects with contracts on the Superchain.

This page explains where the metrics come from and includes a working list of all metrics under consideration for badgeholders. We will update it regularly, at least until the start of voting (June 23), to reflect the evolution of metrics. The first version metrics was released on 2024-05-16 and the most recent version (below) was released on 2024-05-22.
This page explains where the metrics come from and includes a working list of all metrics under consideration for badgeholders. We will update it regularly, at least until the start of voting (June 23), to reflect the evolution of metrics. The first version metrics was released on 2024-05-16 and the most recent version (below) was released on 2024-05-26.

<!-- truncate -->

Expand Down Expand Up @@ -180,3 +180,9 @@ Recurring addresses are a proxy for recurring users. It is especially relevant t
Count of trusted users who have interacted with the project in at least 3 separate months over the RF4 scope period (October 2023 - June 2024).

Many crypto natives are curious to try out new protocols. But churn and user retention are major issues. Recurring users represent the most loyal and committed segment of a project's user base. This metric considers users who have interacted with a project over the course of at least three distinct calendar months during the RF4 scope period. Thus, it is intended to reflect sustained interest and ongoing engagement over time. A high count of recurring users signals strong project loyalty and a good user experience, and helps separate the fads from the future.

### Power User Addresses

Count of 'power user' addresses that have interacted with the project over the RF4 scope period (October 2023 - June 2024).

This metric reflects the degree which a project has attracted attention from the most active and engaged users on the Superchain. A `power user` is defined as an address that has made at least 100 transactions, across at least 10 different projects, on at least 30 days, over the RF4 scope period. A project is counted by this metric if has at least one interaction from a power user. Power users are critical early adopters for the ecosystem.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
with txns as (
select
project_id,
from_artifact_name,
bucket_day,
amount
from {{ ref('rf4_events_daily_to_project') }}
where
event_type = 'CONTRACT_INVOCATION_SUCCESS_DAILY_COUNT'
and bucket_day >= '2023-10-01'
),

address_stats as (
select
from_artifact_name,
COUNT(distinct bucket_day) as days_count,
COUNT(distinct project_id) as project_count,
SUM(amount) as txns_count
from txns
group by
from_artifact_name
),

power_users as (
select from_artifact_name
from address_stats
where
days_count >= 30
and project_count >= 10
and txns_count >= 100
)

select
txns.project_id,
'power_user_addresses' as metric,
COUNT(distinct txns.from_artifact_name) as amount
from txns
left join power_users
on txns.from_artifact_name = power_users.from_artifact_name
where
power_users.from_artifact_name is not null
group by
txns.project_id
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ with metrics as (
select * from {{ ref('rf4_trusted_recurring_users') }}
union all
select * from {{ ref('rf4_recurring_addresses') }}
union all
select * from {{ ref('rf4_power_user_addresses') }}
),

pivot_metrics as (
Expand Down Expand Up @@ -61,7 +63,10 @@ pivot_metrics as (
) as trusted_recurring_users,
MAX(
case when metric = 'recurring_addresses' then amount else 0 end
) as recurring_addresses
) as recurring_addresses,
MAX(
case when metric = 'power_user_addresses' then amount else 0 end
) as power_user_addresses
from metrics
group by project_id
)
Expand All @@ -83,7 +88,8 @@ select
pivot_metrics.monthly_active_addresses,
pivot_metrics.trusted_monthly_active_users,
pivot_metrics.recurring_addresses,
pivot_metrics.trusted_recurring_users
pivot_metrics.trusted_recurring_users,
pivot_metrics.power_user_addresses
from pivot_metrics
left join {{ ref('projects_v1') }}
on pivot_metrics.project_id = projects_v1.project_id
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ models:
**Event Type**: A label for the type of event that has been aggregated. Examples include: `CONTRACT_INVOCATION_DAILY_COUNT`, `CONTRACT_INVOCATION_SUCCESS_DAILY_COUNT`, `CONTRACT_INVOCATION_DAILY_L2_GAS_USED`.
- name: amount
description: >
**Amount**: The amount or value associated with teh event. This is a count or sum depending on the event type.
**Amount**: The amount or value associated with the event. This is a count or sum depending on the event type.
- name: trusted_user_id
description: >
**Trusted User ID**: A unique identifier for a trusted user (generated by OSO). If the `from_artifact_name` is not a trusted user, this field will be null.
Expand Down Expand Up @@ -106,3 +106,8 @@ models:
**Trusted Recurring Users**: Count of trusted users who have interacted with the project in at least 3 separate months over the RF4 scope period (October 2023 - June 2024).
Many crypto natives are curious to try out new protocols. But churn and user retention are major issues. Recurring users represent the most loyal and committed segment of a project's user base. This metric considers users who have interacted with a project over the course of at least three distinct calendar months during the RF4 scope period. Thus, it is intended to reflect sustained interest and ongoing engagement over time. A high count of recurring users signals strong project loyalty and a good user experience, and helps separate the fads from the future.
- name: power_user_addresses
description: >
**Power User Addresses**: Count of 'power user' addresses that have interacted with the project over the RF4 scope period (October 2023 - June 2024).
This metric reflects the degree which a project has attracted attention from the most active and engaged users on the Superchain. A `power user` is defined as an address that has made at least 100 transactions, across at least 10 different projects, on at least 30 days, over the RF4 scope period. A project is counted by this metric if has at least one interaction from a power user. Power users are critical early adopters for the ecosystem.

0 comments on commit ddbfbdb

Please sign in to comment.