Skip to content

feat(contracts): add multisig perjury denylist via rejectAppealAsPerjury (#688) #1016

Closed

Description

@alpergundogdu

Sub-issue of #688. Mechanism B — perjury denylist (loss of filing standing for adjudicated bad-faith appeals). Complexity M. Independent of C/D.

Problem

ADR-031 anticipates that a filer who submits an egregiously bad-faith appeal or a false sworn declaration ("perjury") should lose the right to file new appeals for an extended period. No such mechanism exists in the as-built contract. The rejection cooldown (mechanism A) handles volume abuse (3 strikes → 90-day window) but not a single adjudicated act of bad faith.

Decision (resolved)

  • Population path: a multisig-gated rejectAppealAsPerjury(uint256 appealId) function — NOT a raw governance setter. The denylist entry is tied to a concrete finalized appeal (auditable). ADR-031 line 277 already documents this as a sub-mode of the existing EMERGENCY_MULTISIG_ROLE (capability 3, same 3-of-5 threshold as fastTrackBlacklistAppeal) — no new role is introduced.
  • Duration: fixed constant PERJURY_DENYLIST_DURATION = 365 days. No governance setter.
  • The off-chain adjudication criteria for "egregious bad-faith / false sworn declaration" live in ADR prose, not contract logic.

Solution / scope (ContentBlacklist.sol)

  • Add mapping(address filer => uint64 until) public perjuryDenylistUntilAt.
  • In openBlacklistAppeal, add a gate: if (perjuryDenylistUntilAt[msg.sender] > block.timestamp) revert FilerPerjuryDenylisted(until); (place alongside the existing rejection-cooldown gate).
  • Add function rejectAppealAsPerjury(uint256 appealId) external onlyRole(EMERGENCY_MULTISIG_ROLE):
    • Must target an Open/FastTracked appeal (reuse the existing status guards).
    • Set perjuryDenylistUntilAt[a.filer] = uint64(block.timestamp) + PERJURY_DENYLIST_DURATION.
    • Finalize the appeal as rejected and burn the bond (reuse the existing token.burn(bondBurned) adverse-path pattern; if the appeal was fast-tracked, also run the cap decrement + un-suspend, mirroring rejectBlacklistAppeal).
    • emit AppealRejectedAsPerjury(appealId, a.filer, until) before any revert-free finalize. Use emit-before-revert discipline only where applicable.
  • Add the FilerPerjuryDenylisted(uint64 until) error and AppealRejectedAsPerjury event; add a perjuryDenylistUntilAt is auto-getter (public mapping).

Test plan (test/ContentBlacklist.t.sol)

  • rejectAppealAsPerjury sets the denylist 365d out, burns the bond, and finalizes the appeal.
  • A denylisted filer is blocked from openBlacklistAppeal until the window lapses; lifts after 365d.
  • Role-gating: non-EMERGENCY_MULTISIG_ROLE caller reverts.
  • Fast-tracked appeal path: perjury-reject also decrements the relief cap(s) and un-suspends the entry.
  • Denylist isolation: one filer's denylist doesn't affect another.

CI notes

Watch solc W5740 / --deny warnings: keep rejectAppealAsPerjury clearly state-mutating (it writes state before any revert). Slither/aderyn disable directives, if needed, must be the immediate predecessor line.

ADR reconciliation

Document rejectAppealAsPerjury, the denylist, and the 365d constant in ADR-031; confirm the multisig-sub-mode cross-reference to ADR 009 capability 3.

Agent-suitable: yes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions