Skip to content

feat(community): xPNTs economic-credibility disclosure page (CC-33) - #433

Open
jhfnetboy wants to merge 1 commit into
chore/bump-sdk-0.43.0from
feat/cc33-credibility-page
Open

feat(community): xPNTs economic-credibility disclosure page (CC-33)#433
jhfnetboy wants to merge 1 commit into
chore/bump-sdk-0.43.0from
feat/cc33-credibility-page

Conversation

@jhfnetboy

Copy link
Copy Markdown
Member

What

New /community/credibility page + community-hub entry card: lists every community xPNTs with its on-chain credibility score (0–100 backing coverage), an over-issued warning, and the backing/issued/cap USD figures, then discloses the audit/slash rules behind the score.

Pieces

  • lib/sdk/credibility.ts — read-only SDK boundary over @aastar/sdk 0.43.0: xPNTsFactoryActions().getAllTokens() + xPNTsTokenActions().getCredibility() (5 views pinned to one block). Factory from SDK canonical (guarded), not hardcoded. *USD fields are 18-dec fixed-point → formatUnits(v,18) display, raw bigint compares for the over-issue verdict. Per-token failure → null (one bad token can't blank the page).
  • app/community/credibility/page.tsx — client-side list (score bar + over-issue red warning + USD) + rules-disclosure section sourced from DVT docs/AUDIT_SLASH_MODEL.md (three penalties SLASH/JAIL/REPUTATION + all four rules + credibility formula). No wallet/signing.
  • i18n zh/en credibilityPage section; hub entry card.

Review

Codex reviewed (fresh thread) → 2 findings fixed (missing rule ④ in disclosure copy; guard .xPNTsFactory field) → re-review APPROVE.

Gates

frontend type-check + build (/community/credibility prerendered static) + lint --max-warnings 0 all green.

Note

Stacked on chore/bump-sdk-0.43.0 (needs the 0.43.0 getCredibility API). Base will retarget to master once #432 merges.

https://claude.ai/code/session_01RajETCvboSvhadpqMbekNx

New /community/credibility page + entry card on the community hub: lists every
community xPNTs with its on-chain credibility score (0–100 backing coverage),
an over-issued warning, and the backing/issued/cap USD figures — then discloses
the audit/slash rules behind the score.

- lib/sdk/credibility.ts: read-only SDK boundary over @aastar/sdk 0.43.0
  xPNTsFactoryActions().getAllTokens() + xPNTsTokenActions().getCredibility()
  (5 views pinned to one block). Factory address from SDK canonical, not
  hardcoded. *USD fields are 18-dec fixed-point → formatUnits(v,18) for display,
  raw bigint compares for the over-issue verdict. Per-token failures degrade to
  null so one bad token can't blank the page.
- app/community/credibility/page.tsx: client-side list (score bar + over-issue
  red warning + USD figures) + rules-disclosure section sourced from DVT
  docs/AUDIT_SLASH_MODEL.md (three penalties SLASH/JAIL/REPUTATION + corrected
  four-rule model + credibility formula). No wallet/signing.
- i18n zh/en credibilityPage section; community hub entry card.

Depends on the @aastar/sdk 0.43.0 bump (getCredibility API landed 0.41.0).
Gates: frontend type-check + build (/community/credibility prerendered static)
+ lint --max-warnings 0 all green.

Claude-Session: https://claude.ai/code/session_01RajETCvboSvhadpqMbekNx
@jhfnetboy
jhfnetboy requested a review from fanhousanbu as a code owner July 14, 2026 06:10
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@clestons clestons left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

APPROVE — clean read-only disclosure page, no trust-critical logic client-side.

lib/sdk/credibility.ts is a thin read-only SDK wrapper (no signing/writes), factory address from the SDK canonical table (not hardcoded), 5 views pinned to one block for a self-consistent snapshot. Fail-soft throughout: per-token errors surface as null and are filtered so one bad token can't blank the page; ERC-20 name/symbol reads fall back gracefully.

The authoritative over-issue verdict (isOverIssued) and score come from on-chain — the client does no float-based solvency math. Number(formatUnits(v,18)) is display-only; precision loss on very large USD figures is cosmetic (raw bigint drives nothing consequential). Score clamped to 0–100.

— clestons (Opus review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants