Skip to content

Draft: Preserve KlerosJudgeV2 work in progress#2

Draft
krandder wants to merge 1 commit into
mainfrom
preserve-kleros-v2
Draft

Draft: Preserve KlerosJudgeV2 work in progress#2
krandder wants to merge 1 commit into
mainfrom
preserve-kleros-v2

Conversation

@krandder

Copy link
Copy Markdown
Contributor

Summary

  • preserve the local KlerosJudgeV2 work on a reviewable branch
  • add the KlerosJudgeV2 contract, deploy script, and Hardhat test coverage
  • carry the related frontend integration in frontend/index.html

Verification

  • npx hardhat test test/KlerosJudgeV2.test.js
  • result: 47 passing

Notes

  • this is opened as a draft because the goal here is preservation and review of the existing work, not an assertion that it is production-ready yet

@netlify

netlify Bot commented Mar 18, 2026

Copy link
Copy Markdown

Deploy Preview for zippy-halva-280c00 ready!

Name Link
🔨 Latest commit e00d069
🔍 Latest deploy log https://app.netlify.com/projects/zippy-halva-280c00/deploys/69bb1689fd86c00008b6de08
😎 Deploy Preview https://deploy-preview-2--zippy-halva-280c00.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

krandder pushed a commit that referenced this pull request May 21, 2026
Stake step inputs flip from sUSDS to USD ('Bond amount ($)', 'Challenge
amount ($)', 'Judge fee max ($)'). Each input has a small monospace
footnote showing the sUSDS equivalent at the current ERC-4626 rate.
Footnote refreshes on every keystroke (off the cached rate) and updates
again once the live rate read resolves.

submitCreate converts USD strings to sUSDS BigInts via
usdStringToSusdsBigInt() before calling createBond — the on-chain
bondAmount stays denominated in sUSDS shares.

New collapsible 'About sUSDS' card under the stake inputs explains the
yield model in two sentences and links to sky.money / docs.sky.money /
DeFiLlama / MakerDAO→Sky transition. No editorial defense from us.

Review step shows '$10 / $3 / $0.5 (locked as sUSDS)' instead of
'10 / 3 / 0.5 sUSDS'.

Browse list cards: bond and challenge amounts shown as '$X' (USD via
the cached rate, fetched once per data refresh in loadBrowseData).

Bond detail view: token amounts shown via new fmtUsdAndSusds helper —
'$X.XX (Y sUSDS)' with the sUSDS as small grey text.

Tests:
- new poster-flows test asserts the USD labels + sUSDS footnote +
  About-sUSDS card are visible
- 27/27 e2e local + 613/613 hardhat green
krandder pushed a commit that referenced this pull request Jun 5, 2026
Closes RCA gap #2. Browse now consumes the /api/bonds freshness meta:
below STALE_THRESHOLD (50 blocks, > the ~12 confirmation margin) it
renders indexer rows as-is; above it, it shows a small non-alarming
banner ("Indexed data may be ~N blocks behind; showing a live on-chain
read") AND transparently falls back to the existing direct-RPC
enumeration (no new getLogs — G4 clean). So a stale/lagging indexer can
never be silently served as truth.

Loop iteration 4: implemented + adversarially verified (3/3, both
branches proven with mutation tests). New browse-staleness.spec.js (2
tests) + full local e2e 40 passed; mirrored to v6. Bonus: the refactor
dropped an empty catch → G1 baseline 42→41 (locked). rcaOpenGaps 9→8.
krandder pushed a commit that referenced this pull request Jun 5, 2026
…y Bonds (backlog #2)

v0.7 C2 made refunds pull-only (credits/claim) but claim() was only surfaced
per-bond, so owed users couldn't discover funds. Added a global 'You have ~$X
claimable' banner to My Bonds: new pure frontend/credits-banner.js, loadMyBonds
reads credits(account, approvedToken) behind isV7 (try/catch -> no banner on
error), and a My-Bonds-scoped doClaimCreditMyBonds(token) claims + re-renders so
the banner clears. v6/mainnet byte-identical at runtime (bondVersion===7-gated).

Adversarial panel 3/3 (non-vacuous: mutate->unit RED, remove->13 surface RED).
Gates re-run locally (sequential): hardhat 996/0 (x2), lint EXIT=0, docker e2e 60
passed incl. new My-Bonds banner journey, all 7 capabilities true.
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.

1 participant