Lucene search
K
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
β€’added 2022/09/19 12:0 a.m.β€’10 views

rewards stuck in StakingRewards because of division rounding error in notifyRewardAmount() and rewardPerToken() and updateReward()

Lines of code Vulnerability details Impact In all functions notifyRewardAmount and rewardPerToken and updateReward there is a division which cause division rounding error and make some rewards to stuck in contract and users don't get their rewards and so users would lose funds. Proof of Concept...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/19 12:0 a.m.β€’10 views

Divide before multiply may lead to loss of precision

Lines of code Vulnerability details Impact Solidity integer division might truncate. As a result, performing multiplication before division can sometimes avoid loss of precision. Details This would affect the dynamicQuorumVotes vote logic correct functioning Proof of Concept...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/19 12:0 a.m.β€’10 views

splitRecipient resulting voting power tend to be overstated

Lines of code Vulnerability details When burn computes the contributor's share via getFinalContribution and contributor = splitRecipient it transfers the whole share to the splitRecipient in advance, even when not all the voting power were allocated. I.e. some contributors might not burn and the...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/18 12:0 a.m.β€’10 views

Governance NFT Voting power can be distributed unfairly after the party purchase the NFT because voting power distribution depends on the contribution NFT burning order

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Voting power can be distributed unfairly after the party purchase the NFT because voting power distribution depends on the contribution NFT burning order. For example, the NFT is purchased at price 1.5...

7.1AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/18 12:0 a.m.β€’10 views

ArbitraryCallsProposal.sol and ListOnOpenseaProposal.sol safeguards can be bypassed by cancelling in-progress proposal allowing the majority to steal NFT

Lines of code Vulnerability details Note: PartyDAO acknowledges that "canceling an InProgress proposal mid-step can leave the governance party in a vulnerable or undesirable state because there is no cleanup logic run during a cancel" in the "Known Issues / Topics" section of the contest readme. ...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/15 12:0 a.m.β€’10 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/15 12:0 a.m.β€’10 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/15 12:0 a.m.β€’10 views

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...

6.6AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/15 12:0 a.m.β€’10 views

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-...

6.7AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/15 12:0 a.m.β€’10 views

Users can grief the auction and win it

Lines of code Vulnerability details Impact Users can grief the auction and win it anytime. Proof of Concept A malicious actor who create bids through his/her smart contract can grief the Auction.sol's createBid function. Let's say that the attacker's contract has a fallback function that griefs t...

6.6AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/15 12:0 a.m.β€’10 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/15 12:0 a.m.β€’10 views

founderPct variable cast

Lines of code Vulnerability details Description There is a function addFounders in Token contract. It accepts array of FounderParams as an input. For each of founders it uses founderPct as an variable to store percent ownership for such founder. It is unsafe to cast it to from uint256 to uint8 in...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/15 12:0 a.m.β€’10 views

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:...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/15 12:0 a.m.β€’10 views

Auction.sol : Treasury(payable) typecasting is missed before setting the treasury address

Lines of code Vulnerability details Impact The contract address will not be set with relevant properties, like payable and contract type. Proof of Concept Auction.solL79 : settings.treasury = treasury; Whereas, in Governor.sol, it is set properly. refer the line, Governor.solL74 : settings.treasu...

7.1AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/15 12:0 a.m.β€’10 views

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...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/12 12:0 a.m.β€’10 views

Redeem fails when DAI is not enough

Lines of code Vulnerability details Impact In SimpleFeiDaiPSM.sol, redeem fails when DAI amount of the contract is less than input FEI amount. But it can succeed if minAmountOut is less than the DAI amount of the contract. Proof of Concept Let us say amountFeiIn DAI amount of SimpleFeiDaiPSM...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/12 12:0 a.m.β€’10 views

There is no time lock mechanism in RariMerkleRedeemer and constructor of RariMerkleRedeemer contract don't check for maximum value for cTokenExchangeRates, if high value have been set by mistake then attacker can withdraw most of baseToken balance of contract immediately

Lines of code Vulnerability details Impact Exchange rates are used to calculate baseToken amounts that are going to be transferred to the user, if exchange rates are set as a very high number by mistake, an attacker can withdraw baseToken balance of the contract. there should be some checks in th...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/12 12:0 a.m.β€’10 views

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...

6.7AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/12 12:0 a.m.β€’10 views

Contract TribeRedeemer: function previewRedeem() might unable to be called forever because of devide by 0

Lines of code Vulnerability details 2022-09-tribe Contract TribeRedeemer: function previewRedeem might unable to be called forever because of devide by 0 tags: c4, 2022-09-tribe, medium Affected code Impact After redemptions, redeemBase can be 0. Then function previewRedeem always revert when be...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/08 12:0 a.m.β€’10 views

ATTACKER COULD PREVENT ANY OTHER USERS FROM MINTING SYNTHETIC TOKENS

Lines of code Vulnerability details An attacker can repeatedly call mint followed by burn after depositing some collateral with deposit. If this is appropriately sized and timed, it can cause the mint call to fail for another user due to the check here that is called during mint here. Every time ...

6.7AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/08 12:0 a.m.β€’10 views

The skim function allows to withdraw tokens for any address

Lines of code Vulnerability details Impact Any address can call the skim function and remove tokens that are in excess of the reserves of those tokens. This would lead to the loss of token 0 and 1. Recommended Mitigation Steps You should have an access control so that only the factory, for exampl...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/08 12:0 a.m.β€’10 views

Oracle may be relying on a low reserves pair, which is easy to manipulate

Lines of code Vulnerability details Impact While the observations isn't easy to manipulate, it's still possible to manipulate some of them using an MEV bot and some tokens. In case of a pair with low reserves, the manipulation is going to be cheaper and might be worth for an attacker. Since there...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/08 12:0 a.m.β€’10 views

[M03] Incorrect price calculation for non-stablecoin pairs marked as stable

Lines of code Vulnerability details Impact Pairs that don't have NOTE token but that are still marked as stable will always have an incorrect price calculated for them. Proof of Concept As it can be concluded from the code, stablecoin pairs are pairs with NOTE token: However, there's a separate...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/08 12:0 a.m.β€’10 views

Sudden price fluctuations occuring at a call to _update() will not be reflected by reserves(), sampleReserves() and sampleSupply() until after periodSize seconds

Lines of code Vulnerability details Impact Consider the situation where a token suddenly drops drastically in price in the market. Consider a call to BaseV1Pair.swap which makes a very large swap between the two tokens accurately reflecting the change in price and also causes a new observation to...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/08 12:0 a.m.β€’10 views

Comparison of tokens

Lines of code Vulnerability details Impact In function named getUnderlyingPrice the BaseV1Router01 contract desides price of the token by comparing tokens' symbol name with predefined constant. By passing custom token attacker can force returned value of getUnderlyingPrice function to be incorrec...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/08 12:0 a.m.β€’10 views

Two-step change of privileged roles

Lines of code Vulnerability details Impact Lack of two-step procedure for critical operations is error-prone and can lead to irrevocable mistakes, might leave the system operationally with no/malicious privileged role. For example, when transfer admin role, in a single-step change, if the current...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/08 12:0 a.m.β€’10 views

Stable/non-stable pair creation mistake could be abused

Lines of code Vulnerability details Impact Stable and non-stable pair use different formula to calculate the invariant k. If a non-stable pair is treated as stable, or vice versa. $x^3y+y^3x$ behave quite differently compare with $xy$, on the edge of relative stable price range, price volatility...

6.7AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/01 12:0 a.m.β€’10 views

possibility of front-run on swap()

Lines of code Vulnerability details Impact The user swapper could lose all their money Proof of Concept 1- the user invokes swap with tokenIn == ohm 2- on this line MINTR.burnOhmaddressthis, amountIn; this user send their money to the TRSRY.sol 3- keeper invoke beat to update the price 4- here...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/01 12:0 a.m.β€’10 views

The users are not able to withdraw the swapped amount

Lines of code Vulnerability details Impact The user will invoke swap from Operator.sol to swap their OHM tokens. But he will transfer their OHM and will never get the AmountOut Proof of Concept On Operator.sol: 1- invoking swap with tokenIn == ohm 2- the ohm.safeTransferFrommsg.sender, addressthi...

7.2AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/01 12:0 a.m.β€’10 views

User with 33% votes held can execute self-endorsed Proposal

Lines of code Vulnerability details Impact Two issues here with one being low/medium and another being high severity. Not sure if it should be put into 2 separate reports. For OlympusGovernance contract in Governance.sol , a Proposal submitter can self-endorse a proposal they submitted themselves...

7.2AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/01 12:0 a.m.β€’10 views

TRSRY.sol is susceptible to ERC20 approve functionality front-running exploit

Lines of code Vulnerability details Proof of concept The problem is perfectly described here The tldr; is that if you approved a person to spend 100 tokens and then you want to decrease his allowance to 50, if he spends his 100 tokens allowance before you set his allowance to 50 he will be able t...

6.6AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/01 12:0 a.m.β€’10 views

Privilege Escalation

Lines of code Vulnerability details Impact An attacker with permissions to the INSTR.store function can obtain the "executor" and "admin" role. This implementation also gives space to human error because when the Kernel's executor changes, the permissions to INSTR.store needs to be changed manual...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/01 12:0 a.m.β€’10 views

User can get loan without dept

Lines of code Vulnerability details Impact User can get loan without permission and dept Proof of Concept TRSRY.withdrawReserves does same validation with TRSRY.getLoan and TRSRY.withdrawReserves does not have permissioned modifier, so anyone can get loan from Treasury without any permission and...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/01 12:0 a.m.β€’10 views

getLastPrice() return wrong price

Lines of code Vulnerability details Impact operate and addObservation both of them use PRICE.getLastPrice but it will return wrong price. So all the updates are just random prices Proof of Concept 1- keeper invoke beat on Heart.sol 2- this operator.operate; to trigger price range update and marke...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/01 12:0 a.m.β€’10 views

Lock of voting power

Lines of code Vulnerability details Description There is a function vote in OlympusGovernance smart contract. It contains the logic for voting on proposals. In the case of failed vote voters' tokens will remain on the balance of OlympusGovernance until the activation of the new proposal. But for...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/01 12:0 a.m.β€’10 views

Check additional fields returned by latestRoundData to ensure price data is not stale/incorrect

Lines of code Vulnerability details Impact Not checking additional fields returned by Chainlink might cause incorrect prices being processed. Proof of Concept The only values being check from latestRoundData are price and updatedAt. File: src/modules/PRICE.sol 161: , int256 ohmEthPriceInt, ,...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/09/01 12:0 a.m.β€’10 views

Reentrancy in repayLoan

Lines of code Vulnerability details Reentrancy in repayLoan Impact token.safeTransferFrom is called and after that state with the value is calcualted, if token can be a wrong or compromised contract this would lead to a clasic reentrancy attack that would transfer more from the balance than...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/31 12:0 a.m.β€’10 views

Upgraded Q -> M from 253 [1661943600779]

Judge has assessed an item in Issue 253 as Medium risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/27 12:0 a.m.β€’10 views

users could not queue a proposal of state succeeded

Lines of code Vulnerability details Impact When a user tries to invoke queue to queue a successful proposal the transaction will fail, the same thing with execute. so there is no execution even if the queued proposal is passed the eta This error effect also: -Emitting ProposalCreated event on...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/27 12:0 a.m.β€’10 views

Update initializer modifier to prevent reentrancy during initialization

Lines of code Vulnerability details package.json L32-33 The solution uses: "@openzeppelin/contracts": "^4.1.0", "@openzeppelin/contracts-upgradeable": "^4.1.0", The current implementation of initialize function in both NounsDAOLogicV1.sol and NounsDAOLogicV2.sol are not using initializer modifier...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/27 12:0 a.m.β€’10 views

User can lose all governance power

Lines of code Vulnerability details Impact Contract is missing self delegation in case of delegateBySig function. This means if delegateBySig is called with zero address delegatee then User votes will be burned instead of setting delegatee to signatory Proof of Concept 1. User calls delegateBySig...

7.2AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/27 12:0 a.m.β€’10 views

quorumvotes() on LogicV2 changed its signature.

Lines of code Vulnerability details Impact The team states: // NounsDAOLogicV2 removes: // - quorumVotes has been replaced by quorumVotesuint256 proposalId. But the signature of the function changed. It is a read-only function and it is hard to imagine a bad transaction flow with it. But is a bad...

6.8AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/27 12:0 a.m.β€’10 views

check if the refundGas() is successful or not

Lines of code Vulnerability details The user can lose their refundAmount in the transaction field Recommended Mitigation Steps Add check bool refundSent, = msg.sender.call value: refundAmount ''; requirerefundSent, "Transfer failed."; --- The text was updated successfully, but these errors were...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/27 12:0 a.m.β€’10 views

MISSING INPUT CKECK WHEN SETTING NEW **QuorumCoefficient**

Lines of code Vulnerability details Impact In the setQuorumCoefficient , setDynamicQuorumParams functions when the admin sets a new QuorumCoefficient, there is no check on the newQuorumCoefficient parameter which means that a wrong QuorumCoefficient could be set either being very big or very smal...

6.7AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/17 12:0 a.m.β€’10 views

Borrower can pay very little collateral for a huge amount of more valuable asset.

Lines of code Vulnerability details Impact When an approved borrower calls borrowAsset , they are able to borrow as much asset as possible and passing the user controlled collateralAmount input with a lesser value worth of collateral. For example, a user can pay 1 USDC collateral and receive 1000...

6.7AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/17 12:0 a.m.β€’10 views

ERC20.approve can be error prone. It is known issue. ERC20.sol could not be safe.

Lines of code Vulnerability details Impact ERC20 - approve is not safe. Proof of Concept For approve, the entire contract depend on ERC20.approve assetContract.approveswapperAddress, borrowAmount; collateralContract.approveswapperAddress, collateralToSwap; Refer following articles for this issue...

7AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/17 12:0 a.m.β€’10 views

Possible frontrunning attack in Vault.

Lines of code Vulnerability details Impact First depositor will have the control of the vault and drain user funds. Proof of Concept The project uses VaultAccount.sol library for math implementations. To determine the number of shares to mint to a depositor, shares = amount total.shares /...

6.7AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/17 12:0 a.m.β€’10 views

Different SafeERC20 contracts are being used

Lines of code Vulnerability details Impact Two different contracts with the name SafeERC20 are being used. Proof of Concept Tools Used Vim Recommended Mitigation Steps Use a different name for the contract. --- The text was updated successfully, but these errors were encountered: πŸ‘Ž 1 0xA5DF react...

6.9AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/17 12:0 a.m.β€’10 views

Owner can change timelock at any time

Lines of code Vulnerability details Contract FraxlendPair implements logic for changing timelock and protocol fee. The functionality of changing fee is reserved to TIMELOCKADDRESS which is expected to be a timelock contract that protects users from accidental changes of fee while using the...

7AI score
Exploits0
Code423n4
Code423n4
β€’added 2022/08/15 12:0 a.m.β€’10 views

Unsafe usage of ERC20 transfer and transferFrom

Lines of code Vulnerability details Impact Some ERC20 tokens functions don't return a boolean, for example USDT, BNB, OMG. So the VotingEscrow contract simply won't work with tokens like that as the token. Proof of Concept The USDT's transfer and transferFrom functions doesn't return a bool, so t...

6.8AI score
Exploits0
Total number of security vulnerabilities5000