duneanalytics / duneanalytics/spellbook

[CONTRIBUTION] Add staking_plume.deposits table (Plume staking sector)

Open
#9,535 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
1.4k
Avg merge
3d 16h
Merged PRs (30d)
22

Description

Overview

I would like to contribute a new sector-level table under the staking sub-project for the Plume blockchain:

staking_plume.deposits
This table will provide a canonical record of staking deposit activity on Plume, with one row per staking action.

What this adds

A new incremental model that captures on-chain staking deposits from the Plume staking contract by decoding raw logs.

Each row will represent a single staking event with the following fields:

  • block_time
  • block_number
  • tx_hash
  • evt_index
  • depositor_address
  • validator_id
  • amount_staked
  • contract_address
  • blockchain

Data source (on-chain)

The model is fully derived from on-chain data using:

  • plume.logs

Specifically:

  • Staking contract: 0x30c791E4654EdAc575FA1700eD8633CB2FEDE871
  • Stake event topic0: 0x521d5961e1d8e7e104af28f00e1f7e11655e7cc7e8d7a9b7a07e959a1598e215

Decoded fields:

  • topic1 → depositor address
  • topic2 → validator ID
  • data → staked amount

No off-chain or external dependencies are used.

Sub-project

  • _sector/staking
  • Chain: plume

Why this is useful

Currently, there is no canonical staking dataset for Plume in Spellbook.

This table would:

  • Provide a standardized source of truth for staking activity on Plume

  • Enable analysis of:

    • staking inflows
    • validator participation
    • user-level staking behavior
  • Serve as a foundation table for downstream models such as:

    • staking_plume.withdrawals
    • staking_plume.daily_flows
    • validator and entity mappings
  • It mirrors the structure and purpose of existing tables like:

  • staking_ethereum.deposits

Design considerations

  • Follows Spellbook conventions:
    • One row per on-chain action
    • No aggregation or pricing logic
    • Incremental model with tx_hash + evt_index as unique key
  • Fully reproducible from raw on-chain logs
  • Keeps logic minimal and protocol-agnostic

Contributor guide

Open the contributing guide

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.

Research direction

Start in the _sector/staking sub-project and compare the requested model with staking_ethereum.deposits. Use plume.logs, the stated contract address, and event topic to verify the decoded fields and incremental key. Done means a staking_plume.deposits table with one row per deposit and all listed columns, including tx_hash plus evt_index uniqueness.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
blockchain, data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.