Skip to content

Feat/tally audit remediations#678

Merged
NicoSerranoP merged 6 commits into
mainfrom
feat/tally-audit-remediations
Oct 10, 2025
Merged

Feat/tally audit remediations#678
NicoSerranoP merged 6 commits into
mainfrom
feat/tally-audit-remediations

Conversation

@JohnGuilding

@JohnGuilding JohnGuilding commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator

Description

This PR addresses the audit issues raised by Haskcloak for the audit of Tally.sol The initial audit report is attached as part of this PR, so these changes can be reviewed against it. The issues were:

  1. MACI-1: Pausable imported but not used
  2. MACI-2: getAllocatedAmounts does not take into account the updated alpha
    and may give incorrect result
  3. MACI-3: tallyResults for a given index is fetched without checking isSet for a
    given index
  4. MACI-4: deposit function allows 0 amount deposits
  5. MACI-5: Inconsistency in code comment and MAX_VOICE_CREDITS definition

We fixed 1, 4 and 5. After discussing with the auditor, we decided to mark issues 2 and 3 as wont fix as they were not necessary.

Issue 2 was marked as unnecessary as the function is meant to be a view function so should not modify state. Any calculations can be done off-chain if requiring an updated alpha and it is not updated yet on-chain.

Issue 3 was marked as unnecessary as we already implicitly check tallying is done and results are added when calling these functions

We normally raise PRs with a single commit, but since reviewing each audit issue is simpler with a specific commit, I've opted to add separate commits here. Once approved, we can squash all commits on merge.

Additional Notes

Related issue(s)

Confirmation

Important

We do not accept minor grammatical fixes (e.g., correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical error feel free to message the team.

@JohnGuilding JohnGuilding marked this pull request as ready for review October 10, 2025 07:21
@NicoSerranoP NicoSerranoP merged commit fbcd3c7 into main Oct 10, 2025
14 checks passed
@NicoSerranoP NicoSerranoP deleted the feat/tally-audit-remediations branch October 10, 2025 19:15
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