feat(community): xPNTs economic-credibility disclosure page (CC-33) - #433
feat(community): xPNTs economic-credibility disclosure page (CC-33)#433jhfnetboy wants to merge 1 commit into
Conversation
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
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
clestons
left a comment
There was a problem hiding this comment.
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)
What
New
/community/credibilitypage + 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/sdk0.43.0:xPNTsFactoryActions().getAllTokens()+xPNTsTokenActions().getCredibility()(5 views pinned to one block). Factory from SDK canonical (guarded), not hardcoded.*USDfields are 18-dec fixed-point →formatUnits(v,18)display, rawbigintcompares 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 DVTdocs/AUDIT_SLASH_MODEL.md(three penalties SLASH/JAIL/REPUTATION + all four rules + credibility formula). No wallet/signing.credibilityPagesection; hub entry card.Review
Codex reviewed (fresh thread) → 2 findings fixed (missing rule ④ in disclosure copy; guard
.xPNTsFactoryfield) → re-review APPROVE.Gates
frontend type-check + build (
/community/credibilityprerendered static) + lint--max-warnings 0all green.Note
Stacked on
chore/bump-sdk-0.43.0(needs the 0.43.0getCredibilityAPI). Base will retarget to master once #432 merges.https://claude.ai/code/session_01RajETCvboSvhadpqMbekNx