Skip to content

[OpenAI Codex] [ Crypto ] Fix GovernanceToken tx.origin delegation#4431

Closed
justusaugust wants to merge 1 commit into
UnsafeLabs:mainfrom
justusaugust:codex/crypto-governance-912
Closed

[OpenAI Codex] [ Crypto ] Fix GovernanceToken tx.origin delegation#4431
justusaugust wants to merge 1 commit into
UnsafeLabs:mainfrom
justusaugust:codex/crypto-governance-912

Conversation

@justusaugust
Copy link
Copy Markdown

@justusaugust justusaugust commented May 25, 2026

/claim #912

Summary

  • Replace all tx.origin delegation/admin paths with msg.sender-based authorization and OpenZeppelin Ownable for snapshot.
  • Keep delegated voting accurate through token transfers by updating delegatedPower in the ERC20 update hook.
  • Add a Solidity runtime test that proves a phishing contract cannot delegate a victim's votes, legitimate contract-held delegation works, owner-only snapshot is enforced, and proposal voting still uses the corrected voting power.

Verification

  • npm install --no-package-lock
  • npm test

Demo Video

@github-actions
Copy link
Copy Markdown
Contributor

Unfortunately the changes in this PR didn't fully resolve the issue. Please rework your solution and submit a new pull request.

Make sure to review the acceptance criteria in the linked issue and verify all conditions are met before resubmitting. See CONTRIBUTING.md for guidelines.

@github-actions github-actions Bot closed this May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant