Skip to content

feat(indexer): add Olas DAO integration#1761

Draft
alextnetto wants to merge 4 commits intodevfrom
feat/olas-dao-integration
Draft

feat(indexer): add Olas DAO integration#1761
alextnetto wants to merge 4 commits intodevfrom
feat/olas-dao-integration

Conversation

@alextnetto
Copy link
Copy Markdown
Member

Summary

  • Integrate Olas DAO into the indexer: OLAS ERC20 token for supply metrics + Governor OLAS for proposals/votes
  • OLAS uses a vote-escrow (veOLAS) governance model — voting power from locking tokens, not delegation
  • Adds OLAS to DaoIdEnum, contract addresses, ABIs, Ponder config, event handlers, and all address category records
  • Includes INTEGRATION.md documenting architecture, integration status, and pending work (veOLAS indexing, CEX/DEX addresses)

Contracts

Contract Address Start Block
OLAS ERC20 0x0001A500A6B18995B03f44bb040A5fFc28E45CB0 15,049,891
Governor OLAS 0x8E84B5055492901988B831817e4Ace5275A3b401 17,527,057
Timelock 0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE — (treasury)

Indexed events

Handler Events
OlasToken:Transfer 350,534
OlasGovernor:ProposalCreated 50
OlasGovernor:VoteCast 188
OlasGovernor:ProposalExecuted 49
OlasGovernor:ProposalQueued 49

Known gaps (documented in INTEGRATION.md)

  1. veOLAS not indexeddelegatedSupply, accountPower, and votingPowerHistory are empty. Governance power comes from veOLAS locks (Deposit/Withdraw/Supply events), which requires custom handler logic not used by any other DAO.
  2. No CEX/DEX/Lending addresses — not available yet; those supply buckets are 0.
  3. API/Gateway/Dashboard — only the indexer is covered in this PR.

Test plan

  • pnpm indexer typecheck passes
  • pnpm indexer lint passes
  • Full backfill completed against local reth node (350k+ transfers, 50 proposals, 188 votes, 42k accounts)
  • Indexer reached live/realtime mode

🤖 Generated with Claude Code

alextnetto and others added 4 commits March 20, 2026 08:35
Add `dotenv --` to indexer, api, gateway, and gateful scripts (matching
dashboard) so the root .env is injected into turbo child processes.

Bundle OpenTelemetry dependencies into the observability package to avoid
the ESM/CJS resolution conflict in @opentelemetry/resources@1.30.x that
broke ponder and other consumers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Step-by-step guide covering all five components (indexer, API, gateway,
dashboard, enum sync) with concrete file paths, code patterns, and a
verification checklist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…kill

Add mandatory Step 0 that verifies the governor's voting token on-chain
before writing code. This catches non-standard governance patterns like
vote-escrow (veToken) DAOs where the ERC20 token differs from the
voting token. Also adds an INTEGRATION.md template for per-DAO status
tracking and a new veToken variation row.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Index the OLAS ERC20 token (0x0001A500...E45CB0) for supply metrics and
Governor OLAS (0x8E84B505...3b401) for proposals and votes.

OLAS uses a vote-escrow (veOLAS) governance model — voting power comes
from locking tokens, not delegation. The ERC20 token has no
DelegateChanged/DelegateVotesChanged events. veOLAS indexing for
per-account voting power tracking is documented as pending work in
INTEGRATION.md.

Verified against local RPC: 350k transfers, 50 proposals, 188 votes,
42k accounts indexed successfully.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
anticapture Ready Ready Preview, Comment Mar 20, 2026 0:06am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
anticapture-storybook Skipped Skipped Mar 20, 2026 0:06am

Request Review

@claude
Copy link
Copy Markdown

claude bot commented Mar 20, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 006aa5277f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +109 to +111
case DaoIdEnum.OLAS: {
OlasTokenIndexer(token.address, token.decimals);
OlasGovernorIndexer(blockTime);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Index the actual IVotes token before enabling OLAS

DaoIdEnum.OLAS is now fully wired here, but the new integration only indexes ERC20 transfers plus governor events. The verified GovernorOLAS contract is a GovernorVotes governor whose constructor takes an IVotes governanceToken, and in this codebase the only writers for accountPower.votingPower / votingPowerHistory are the delegation-style handlers (apps/indexer/src/eventHandlers/delegation.ts). As a result, OLAS holders will never get non-zero current voting power, so downstream queries that filter on accountPower.votingPower > 0—for example getProposalNonVoters() and the general voting-power rankings in the API—will return empty/incorrect results as soon as DAO_ID=OLAS is used.

Useful? React with 👍 / 👎.

Comment on lines +14 to +24
ponder.on(`OlasGovernor:VoteCast`, async ({ event, context }) => {
await voteCast(context, daoId, {
proposalId: event.args.proposalId.toString(),
voter: event.args.voter,
reason: event.args.reason,
support: event.args.support,
timestamp: event.block.timestamp,
txHash: event.transaction.hash,
votingPower: event.args.weight,
logIndex: event.log.logIndex,
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle VoteCastWithParams for OLAS votes

This listener only subscribes to OlasGovernor:VoteCast, but the verified GovernorOLAS contract also exposes castVoteWithReasonAndParams / castVoteWithReasonAndParamsBySig, and its _castVote emits VoteCastWithParams whenever params.length > 0. Because the OLAS ABI and handlers omit that event, any vote submitted through those entrypoints will be silently missing from votesOnchain and the proposal tallies.

Useful? React with 👍 / 👎.

@pikonha pikonha marked this pull request as draft March 20, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant