10190 matches found
The contract can transfer Ownership to the zero address.
Lines of code Vulnerability details Impact When we use transferOwnership or safeTransferOwnership to transfer contract ownership, there is the possibility of transferring ownership to the zero address. This will cause the owner to lose its ownership permanently. Proof of Concept In Ownable.sol...
baseTokenId variable calculation
Lines of code Vulnerability details Description There is addFounders function in the Token contract. There is the following loop: // Used to store the base token id the founder will recieve uint256 baseTokenId; // For each token to vest: for uint256 j; j founderPct; ++j // Get the available token...
Overflow on _moveDelegateVotes function
Lines of code Vulnerability details Impact A malicious actor can overflow his number of votes Proof of Concept 0. Alice and Kane each have an NFT token 1. Alice uses delegate function to delegate the vote to Kane 2. Kane uses transferFrom to transfer his token to the address Alice 3. Alice uses...
Initial spam of proposals
Lines of code Vulnerability details Impact In the initial phase, when not many tokens are minted, a malicious actor can start submitting proposals and later execute them. E.g. when the first token is minted, this first owner can instantly submit proposals to retrieve all the eth back from the...
The result of getPastVotes can be different time after time
Lines of code Vulnerability details Impact In moveDelegateVotes of ERC721Votes.sol, we write checkpoint every time, so there might be several checkpoints in the same timestamp. In that case, when we get past votes in getPastVotes, we use binary search by timestamp. But there might be several...
createBid call front-running
Lines of code Vulnerability details Description There is createBid function in the Auction contract. The function accept the tokenId, which does not contain any information about the token itself. As a result, transactions of users can be front-runned to enforce user make a bid for the token with...
NFT could be locked in settlement
Lines of code Vulnerability details Impact transferFrom is used to transfer NFT in settlement. If the receiver is a contract without appropriate way to handle the NFT, the NFT might be locked in there and non retrievable. Proof of Concept There is no check if the receiver can deal with NFT if it ...
Contracts that lock Ether
Lines of code Vulnerability details Impact When receive function, hasn't a revert all ethers send contracts will be locked forever. Proof of Concept Bob send ether to contract, funds were locked forever and Bob lost money. Tools Used manually Recommended Mitigation Steps Remove the payable...
NFT flashloan against governance voting
Lines of code Vulnerability details Impact Specifically, to support a proposal, the voting power is counted at the time of the proposal creation time. However, there are multiple services that support NFT flashloan, e.g., NFTuloan . Since the voting power is counted as the proposal creation time,...
User can generate unlimited votes through faulty transfer logic
Lines of code Vulnerability details Impact When tokens are transferred from one user to another, votes should be moved from the delegatee of the sender to the delegatee of the receiver. Instead, they are transferred from the sender to the receiver. Because the moveDelegateVotes function is...
Calling Governor.execute function without sending any ETH can withdraw general ETH funds from the Treasury contract
Lines of code Vulnerability details Impact When calling the following Governor.execute function, the Treasury.execute function is executed. Because Governor.execute is payable, ETH can be sent to the Treasury contract. function execute address calldata targets, uint256 calldata values, bytes...
Malicious pausing the contract
Lines of code Vulnerability details Vulnerability details Description There is a function createAuction in Auction contract. It consist the following logic: /// @dev Creates an auction for the next token function createAuction private // Get the next token available for bidding try token.mint...
Attacker can gain more voting power
Lines of code Vulnerability details Impact An attacker can gain more voting power at a low cost Proof of Concept When voting, voting power is taken from the snapshot at the same block as the proposal was created. The attacker can monitor mempool and borrow NFTs just in time when proposal is made...
Users could keep increasing the voting weight just by one NFT
Lines of code Vulnerability details Impact With only one NFT the user can keep increasing the voting weight on different addresses Proof of Concept 1- let’s say Alice has one NFT 2- he delegate to Bob 3- Alice invoke transferFrom to Richard 4- Richard invoke delegate to Bob So now Bob has two...
Use safeTransfer to send ERC721 tokens
Lines of code Vulnerability details Impact Winner of the auction can lose his NFT Proof of Concept When you settle and auction you transfer the NFT using transferFrom token.transferFromaddressthis, auction.highestBidder, auction.tokenId; Maybe this is just an intended behaviour and is the...
Adversary can gain Infinite voting power due to integer overflow
Lines of code Vulnerability details Impact Specifically, ERC721Votes enables users to delegate their voting power to others. Note that when delegating the voting power, the actual token balance will not change. On the other hand, when transferring tokens, the voting power transfers accordingly:...
The users could duplicate their voting weight
Lines of code Vulnerability details Impact Any user who has an NFT could duplicate their voting weight at any time Proof of Concept 1- Alice has one NFT 2- He invokes delegate and passes to to his address 3- on delegate both of from == to are Alice addresses 4- on moveDelegateVotes from is the...
User can steal their delegate's votes by receiving new tokens and redelegating
Lines of code Vulnerability details Impact A user is able to steal all the votes of any other user by delegating to them, accumulating additional NFTs to increase balance without increasing delegated votes, and then moving their delegates which is performed based on their balance. Proof of Concep...
Its possible to underflow votes using delegate and delegateBySig on ERC721Votes.sol
Lines of code Vulnerability details Impact Is possible to generate an underflow on ERC721Votes.solL216 mainly because its wrapped in an unchecked bracked. prevTotalVotes could be lower than amount so this will generate and underflow; writeCheckpointfrom, nCheckpoints, prevTotalVotes, prevTotalVot...
Use can get unlimited votes
Lines of code Vulnerability details Impact aftertokenTransfer in ERC721Votes transfers votes between user addresses instead of the delegated addresses, so a user can cause overflow in moveDelegates and get unlimited votes Proof of Concept function afterTokenTransfer address from, address to,...
Allowing multiple checkpoints in a single block can be abused to increase voting power on select proposals
Lines of code Vulnerability details Impact Votes can be multiplied allowing for governance attacks Proof of Concept // Get the pointer to store the checkpoint Checkpoint storage checkpoint = checkpointsaccountid; // Record the updated voting weight and current time checkpoint.votes =...
Potential of underflow on _moveDelegateVotes()
Lines of code Vulnerability details Impact Attacker could get typeuint192.max of voting weight So he can create a proposal to withdraw an amount from the Treasury.sol and he can pass the proposalThreshold with no need to anyone Proof of Concept 1- Attacker buy one NFT and transfer it to addr1 2-...
The voting power cannot be returned deterministically, if there are multiple checkpoints sharing the same timestamp
Lines of code Vulnerability details Impact Specifically, when writing a checkpoint, the code does not check whether the latest checkpoint is also in the current block. Consider a user makes multiple times of token transfer, the ERC721Votes contract will record multiple checkpoints with the same...
# _safeMint() should be used rather than _mint() wherever possible
Lines of code Vulnerability details safeMint should be used rather than mint wherever possible Impact In Token.sol.sol, eventually it is called ERC721 mint. Calling mint this way does not ensure that the receiver of the NFT is able to accept them, making possible to lose them. safeMint should be...
Ddos in Governor.sol
Lines of code Vulnerability details Impact An attacker can cancel proposals. Proof of Concept The proposal ID depends on 4 variables:targets, values, calldatas, and descriptionHash. The Problem is that once a proposal is proposed and the proposal ID is stored, no matter if the proposal is execute...
Bids can be created while paused
Lines of code Vulnerability details createBid allows for bid creation while the Auction is paused. As the latter happens on a system error mint failure, this can allow an attacker to interacts with the malfunctioning system. This at least can lead to misallocation of user's funds, i.e. freezing t...
ERC721Votes.sol checkpoints' timestamp is not unique, which leads to manipulation of the amount of votes
Lines of code Vulnerability details Impact getPastVotes uses the binary search algorithm, which returns the result if it encounters the same timestamp, and since timestamps are not unique in the array The number of votes can be controlled by adding checkpoints to locate any one of the same...
It is possible to add more than 15 properties
Lines of code Vulnerability details The total number of properties is now limited to be 15 or less with hard code on the storage structures level. In the same time it is possible to add unlimited number of properties with MetadataRenderer's addProperties. If this happens, with a malicious intent ...
Deployment flow doesn't work
Lines of code Vulnerability details Impact The deployment flow is based on the concept that the ZORA team can deploy implementation contracts and users will be able to deploy proxies. However, because manager is immutably set in the implementation contracts, this entire system will not work. Proo...
possbile griefing using replay attack
Lines of code Vulnerability details users who want to user redeem function has to set a value for amountIn this value cant be more than redeemBase , which is set in contract's constructor. the value of redeemBase will decrease in case of a successful call of redeem . while contract's solidity...
burnFeiHeld() in SimpleFeiDaiPSM burns FEI balance of contract, which includes FEI received because of redeems and FEI transferred or minted for the contract address. contract should only burn FEI received in redeems. this functionality a backdoor to transfer and burn FEI tokens by this contract.
Lines of code Vulnerability details Impact it's possible to burn FEI tokens without receiving DAI tokens, one can transfer FEI tokens to SimpleFeiDaiPSM contract address and then call burnFeiHeld to burn FEI tokens. this is a backdoor to burn FEI tokens. the contract should only burn FEI tokens...
Mint function on the simplefeidaiPSM() might DOS
Lines of code Vulnerability details Impact While a user call mint function it imediately mint fei token by supplying DAI and when a user redeem a token the fei will be transfered to this contract without burning the fei token, this could lead DOS if the total supply of the fei token reach the...
TribeRedeemer.redeem function can possibly revert when block gas limit is reached
Lines of code Vulnerability details Impact As the following constructor shows, when constructing the TribeRedeemer contract, the number of tokens in tokensReceived that is used to set tokensReceived is not capped. When the redeem function below is called, tokensReceived, which is essentially toke...
Contract TribeRedeemer: redeemBase should has setter function
Lines of code Vulnerability details 2022-09-tribe Contract TribeRedeemer: redeemBase should has setter function tags: c4, 2022-09-tribe, high Affected code Impact Contract TribeRedeemer doesn't have setter function for redeemBase. So redeemBase can not be adjusted if it is neccesary. Contract wil...
Can not Claim the second time per Spec requirement
Lines of code Vulnerability details Impact Reading the spec, MerkleReedeemerSpec "The user can claim a configurable amount of each ctoken, or all of them if possible" means, the claim amount can be called multiple times. Meanwhile, in RariMerkleRedeemer.sol, inside the claim function, it requires...
redeem FUNCTION COULD REVERT DUE TO UNDERFLOW
Lines of code Vulnerability details Impact User will not able to redeem the token, because the function will revert due to no check for redeemBase. Proof of Concept User will call redeem function with to and amountIn parameter. There is decrement for the base variable inside the function. Since...
Contract TribeRedeemer: User might not redeem with large amount
Lines of code Vulnerability details 2022-09-tribe Contract TribeRedeemer: User might not redeem with large amount tags: c4, 2022-09-tribe, medium Affected code Impact After many redemptions of contract TribeRedeemer, redeemBase will be reduced and might not be still large. Then users can not rede...
DoS with (Unexpected) revert or Gas Limit DoS on a Contract via Unbounded Operations
Lines of code Vulnerability details Impact According to SWC-113, external calls can fail accidentally or deliberately, which can cause a DoS condition in the contract. To minimize the damage caused by such failures, it is better to isolate each external call into its own transaction that can be...
Tokens with fee on transfer are not supported
Lines of code Vulnerability details Impact There are ERC20 tokens that charge fee for every transfer or transferFrom. If this tokens are unsupported, ensure there is proper documentation about it. Proof of Concept 6 instances in 2 files: contracts/shutdown/fuse/RariMerkleRedeemer.sol...
Contract TribeRedeemer: fund can be locked in contract because contract does not have directly withdraw function
Lines of code Vulnerability details 2022-09-tribe Contract TribeRedeemer: fund can be locked in contract because contract does not have directly withdraw function tags: c4, 2022-09-tribe, high Affected code Impact Contract does not have directly withdraw function, so the only way to withdraw...
FEI Minter can drain SimpleFeiDaiPSM contract DAI balance
Lines of code Vulnerability details Impact The FEI token contract contain a mint function which allow the MINTER to mint a given amount of FEI tokens to any account including his own address. So the Minter can mint to his own account an amount of FEI tokens equivalent to the SimpleFeiDaiPSM...
Missing access control on burnFeiHeld()
Lines of code Vulnerability details Impact The function burnFeiHeld is external, and can be called by everyone. This allows anyone to burn the FEI balance of the contract. This may affect the 1:1 ratio of FEI and DAI of the contract SimpleFeiDaiPSM.sol Proof of Concept Tools Used Manual review...
Deniel of service with block gas limit.
Lines of code Vulnerability details Impact An array of unknown size can lead to Deniel of service with block gas limit. Proof of Concept When smart contracts are deployed or functions inside them are called, the execution of these actions always requires a certain amount of gas, based of how much...
TribeRedeemer has no way of getting the redeemedToken out
Lines of code Vulnerability details Impact TribeRedeemer has no way of getting the redeemedToken out! The tokens in tokensReceived will be sent in exchange for redeemedToken, but then the received redeemedToken are locked forever in the contract. There is no mechanism to take them out! If this is...
Function getRedeemAmountOut can't deliver was it should be
Lines of code Vulnerability details Proof of Concept The fn of getRedeemAmountOut can't be deliver the same as it should be eversince it has @params uint256 amountIn and return amountIn which clearly should be amountFeiIn. So the calculate would be deliver wrong value. Tools Used Manual Review...
A reverting token transfer will lock all payouts.
Lines of code Vulnerability details Impact A reverting fallback function will lock all payouts. Proof of Concept External calls can fail accidentally or deliberately, which can cause a DoS condition in the contract. To minimize the damage caused by such failures, it is better to isolate each...
TribeRedeemer.reedem assets can be lost in case of malicious token
Lines of code Vulnerability details Impact The function redeemaddress to, uint256 amountIn to calculate the amount of redemption tokens in turn calls In case of a malicious token will always revert: contract BadBadERC20 is ERC20, ERC20Burnable constructor ERC20"BadToken", "BDT" function...
in function redeem() of TribeRedeemer users would receive less funds because of rounding error in division in previewRedeem()
Lines of code Vulnerability details Impact Function previewRedeem in TribeRedeemer has been used to calculate the amounts of tokens the user would receive for what the user transfer as redeemedToken. the user would receive a ratio of token balance of the contract which ratio is equal to amountIn ...
SimpleFeiDaiPSM contract user can lose DAI funds after having their FEI tokens burned
Lines of code Vulnerability details Impact The FEI token contract contain a burnFrom function which allow the BURNER account to burn a given amount of FEI tokens from an account. When a user transfers DAI to the SimpleFeiDaiPSM contract he get an equivalent amount of FEI tokens in return, those F...
User's cToken could be locked in _claim()
Lines of code Vulnerability details Impact The function claim can only be called 1 time to set the claims amount, but if later the user's balance of the cToken is updated, whether increase of decrease, the functionality of claim and redeem will break. In the case later some cToken is transferred ...