Documentation
Larefe docs
Everything you need to go from a program address to funnels that count people. Most teams are done with setup in under ten minutes.
Quickstart
- Open the app, connect a Solana wallet and sign in once (a signature, not a transaction).
- Add your program addresses. Larefe decodes their instructions and events from the published interface and backfills history.
- Install the web SDK so page views, clicks and wallet connects join the same timeline.
npm i @larefe-protocol/sdk
import { Larefe } from "@larefe-protocol/sdk";
const larefe = Larefe.init({
projectKey: "pk_live_…", // Project settings → Keys
host: "https://api.…",
autocapture: true, // page views, clicks, wallet connects
});
// optional: name a custom event
larefe.capture("quest.completed", { quest: "season-3-week-2" });The first 1M events each month are free on every plan. Backfilled history counts once, when it is first indexed.
Sources
Three kinds of data land in one event stream: decoded onchain activity from the programs you register, frontend events from the web SDK, and offchain tables you bring yourself — CSV uploads, a read-only Postgres connection, or webhooks. More than 40 connectors are listed in the app under Sources.
Event model
| Event | From | What it means |
|---|---|---|
$pageview | web SDK | A page view, with UTM tags and referrer |
$autocapture | web SDK | A click on a button or link |
$wallet_connect | web SDK | A wallet connected; links the visitor to an address |
first signature | program | The first transaction a wallet submitted (it pays the priority fee) |
deposit, claim, … | program | Decoded instructions, e.g. vault::deposit(amount: u64) |
$tx_failed | program | A transaction that failed, with the reason |
Intent, submission and success are separate events, so a failed transaction never counts as a conversion.
Wallet clusters
One person often runs several wallets, so raw address counts overstate users — industry-wide, roughly 181M monthly active addresses sit on an estimated 40–70M people (a16z, State of Crypto 2025). Larefe groups wallets into likely-same-owner clusters using shared funding sources, shared deposit addresses, device continuity from the web SDK and timing.
A cluster is an estimate of common control. It is never a name, an email or an identity, and every chart shows estimated users next to raw wallets.
Sybil filter
Clusters that look like farming are flagged with a confidence level. The default heuristic is published and editable:
- a common funder within two hops;
- claims or deposits inside the same short window (90 seconds by default);
- cluster size above 20 wallets — the cut-off one large airdrop used for its own filter.
No filter catches every farmer, and a strict one also removes real users. The default is conservative; you choose the threshold, and flagged wallets are excluded only where you ask for it.
Attribution
First-touch and last-touch attribution credit a confirmed onchain conversion to the campaign a visitor saw first or last, inside a lookback window you set (7, 30 or 90 days). Attribution is not causation: when you need lift, run a holdout and compare the groups in Funnels.
Paths & lifecycle
Paths show the most common sequences between any two events. Lifecycle splits each period's active wallets into new, returning, resurrecting and dormant.
Wallet replay
Click any wallet in Funnels or Live events to see its full timeline — page views, connect, signatures, decoded instructions, failures — and the other wallets in its cluster.
Priority fee analytics
Box plots for compute units used, value per deposit, time to first deposit and priority fee paid (in SOL), per program and per instruction. Useful for spotting the wallets that fail their first transaction because they hold no SOL; sponsoring that first priority fee through a fee payer is the most common fix.
Monitors & alerts
Monitors watch a funnel, a cohort or an event rate and open an alert when it moves outside its usual range. Each alert carries the query, the wallets and the events behind it, so a teammate or an agent can pick it up. Resolve alerts from the inbox on the Trends page.
Points programs
Track points earned and claimed per wallet and per cluster, and see how much of a season went to flagged clusters before you finalise rewards.
SQL
-- deposits by estimated user, last 30 days, flagged clusters excluded
select cluster_id, count(*) as deposits, sum(value_native) as deposited
from events
where event = 'deposit'
and timestamp > now() - interval 30 day
and not cluster_flagged
group by cluster_id
order by deposited desc
limit 50;MCP for agents
Give your coding or analysis agent the same data you see. The MCP server exposes read tools and the alerts inbox.
npx @larefe-protocol/sdk mcp add
# tools your agent gets
query_trends query_funnel query_retention
list_wallets query_wallet_replay inbox_reports_getREST API & webhooks
curl https://api.…/v1/funnels/query \
-H "Authorization: Bearer sk_…" \
-d '{
"steps": ["$wallet_connect", "first_signature", "deposit"],
"window": "24h",
"count": "estimated_users",
"exclude": ["flagged_clusters"]
}'Webhooks push alerts and decoded events to your own endpoint:
POST https://your-app.example/hooks/larefe
{
"type": "alert.opened",
"alert": { "id": 1188, "priority": "P2", "title": "Cluster #77 is farming season points" },
"evidence": { "wallets": 412, "funder_hops": 2, "window_seconds": 90 },
"query": "https://api.…/v1/alerts/1188"
}
# program events arrive the same way: type "event.decoded"Coverage & freshness
This deployment indexes Solana. New slots appear in roughly 2 seconds; backfills run at a lower priority. Coverage is published per chain with its freshness — we would rather list fewer chains than claim all of them.
$LAREFE
- Pay any invoice in $LAREFE and take 20% off.
- Stake 25,000 $LAREFE to add 1M free events every month.
- Vote on which chains and decoders ship next.
$LAREFE is for access and discounts. There is no yield, and nothing here is a promise about its price. Storage keys in your browser are prefixed larefe:.