The staking contract recalculates a token's voting power at unstake time using current admin-set parameters, rather than the value recorded at stake time. If the admin changes a multiplier between staking and unstaking, the recalculated value can exceed the stored voting power, causing an underflow revert and preventing the user from unstaking.
The unstake function removes voting power from the caller instead of the token owner when an approved third party unstakes on behalf of the owner. This can leave the caller with zero votes and their NFT permanently trapped, and allows manipulation of voting power.
The staking contract uses `_mint` instead of `_safeMint` when minting a proof-of-staking NFT to `msg.sender`. If `msg.sender` is a contract that cannot handle ERC721 tokens, the NFT could become stuck in that contract.
The getCommunityVotingPower function in Staking.sol performs division by PERCENT after each multiplication, causing precision loss that accumulates across three terms. This leads to incorrect community voting power calculations, which could affect governance decisions.
The governance contract's vote casting function did not check whether the caller had any voting power, so anyone could vote with zero votes. Because each address receives a gas refund for voting, an attacker could use many addresses to drain the vault set aside for refunds.
A delegate can repeatedly open proposals so that their delegatees are always locked and cannot unstake or redelegate. This traps users indefinitely in the delegation.
The total community voting power is updated incorrectly when a user delegates their staked tokens, because the update logic does not check whether the delegator or delegatee already had voting power. This can cause the total community voting power to be wrong.
The staking contract did not enforce a maximum unlock time, allowing an attacker to set an extremely large unlock time and receive an enormous staked time bonus. This could give the attacker a huge number of votes and let them dominate voting.
The staking contract hardcoded the monster multiplier when calculating the staked time bonus, so any governance update to the multiplier via setMonsterMultiplier would not affect that bonus. An attacker could exploit this to receive a higher staked time bonus than intended, potentially gaining more voting power.
The unstake function uses transferFrom instead of safeTransferFrom, so if a user specifies a recipient contract that cannot handle ERC721 tokens, the NFT becomes stuck in that contract. An attacker could cause a user's NFT to be frozen by tricking them into unstaking to such a contract.
The queue() function incremented the proposalsCreated counters for the proposer and the community instead of the proposalsPassed counters. Because the two counters can have different multipliers, the proposer's voting power bonus was calculated incorrectly.
The staking contract stores a time-based bonus at stake time, so later changes to the bonus parameters create a permanent voting-power advantage or disadvantage for existing stakers. An attacker could exploit this by staking before a bonus decrease to gain a lasting advantage over new stakers.
The quorum threshold for a proposal is fixed at creation based on total community voting power, which can be artificially lowered by delegating votes away. A group of users can delegate to each other to reduce total votes, create a proposal with a lower quorum, then self-delegate to regain voting power and more easily meet quorum.
When a malicious proposal is vetoed, the proposer keeps the voting-power bonus earned from creating and passing that proposal. An attacker could therefore submit and pass proposals, get them vetoed, and still retain the extra community score.
FR
FrankenDAO
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.