# Can Vote Multiple Times By Transferring NFT In Same Block As Proposal

### Summary:

<https://code4rena.com/reports/2022-09-party/#h-01-partygovernance-can-vote-multiple-times-by-transferring-nft-in-same-block-as-proposal>

<https://www.trustindistrust.com/post/c4-audit-report-partydao>

To make sure users don't vote twice, every proposal has `hasVoted` mapping to keep note of votes. Users are able to transfer their voting power by transferring their PartyGovernanceNFT. This is not an issue by itself, because if user A votes on proposal P, and then transfers his voting powers to user B and tries to vote on proposal P from user B's context, the number of votes calculated for B's vote is his power at proposal time. But the one critical weakness in this validation system is that *during* the proposal creation block, the same votes may be re-used by different users.

### Mitigation:

Add additional check in `accept()` function:

```solidity
if (proposal.proposedTime == block.timestamp) {
require(proposal.votes == 0);
```

This will not allow `accept()` to be called in the sensitive block except to register the proposer's votes.

### TAGS: #proposals


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://simones-organization-4.gitbook.io/hackbook-of-a-hacker/smart-contracts-security/code4rena/high-risk-findings/can-vote-multiple-times-by-transferring-nft-in-same-block-as-proposal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
