Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•6 views

Audit Findings for BYTES Token Contract - Burn Function Vulnerabilities

Lines of code Vulnerability details Impact BYTES2.burn: The function burn allows authorized callers to burn BYTES tokens from a specific address and mint DAO taxes. However, the function does not check if the from address actually has enough BYTES tokens to burn. This means that an attacker could...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•9 views

Wrong accounting of share leading to incorrect amount of BYTES be minted per second

Lines of code Vulnerability details Impact In NeoTokyoStaker, staker is a competitive system where stakers compete for a fixed emission rate in each of the S1 Citizen, S2 Citizen, and LP token staking pools. For each staking pool, there are some reward windows. Each reward window has different...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•11 views

User can cause the points of their LP stake position to underflow

Lines of code Vulnerability details Impact This vulnerability allows a user to cause their LP position points to underflow which will then allow a user to receive a massively disproportionate amount of the emission rewards relative to their stake because they now practically have an infinite amou...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•10 views

Possible loss of rewards when staking non-component vaults

Lines of code Vulnerability details Impact Users could gain less rewards if they stake a non-component vault, as compared to reassembling their S1 Citizen with the vault and and staking it as a component vault. Vulnerability Details From the repository's README.md: S1 Citizens without a component...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•7 views

Use safeTransferFrom() instead of transferFrom() in function NeoTokyoStaker._assetTransferFrom()

Lines of code Vulnerability details Impact Some ERC-20 tokens do not revert on failure such as ZRX. Instead, they would just return a boolean false. In function NeoTokyoStaker.assetTransferFrom, the check success is only checking whether the low-level call is successful or not. If the ERC-20 toke...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•13 views

Unclaimed rewards will be stuck unrecoverable

Lines of code Vulnerability details Impact The vulnerability relies in: unchecked uint256 share = points PRECISION / pool.totalPoints totalReward; uint256 daoShare = share pool.daoTax / 100 DIVISOR; share /= PRECISION; daoShare /= PRECISION; return share - daoShare, daoShare; The problem is that ...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•12 views

ZERO TRUNCATION COULD LEAD TO UNEXPECTED RESULTS

Lines of code Vulnerability details Impact Precision issue leading to zero truncation due to numerator smaller than denominator in a ratio or a division happens readily in Solidity if extra cares have not been given to it. Arithmetic operations running into this incident are typically associated...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•10 views

Huge over calculating user rewards

Lines of code Vulnerability details Impact Huge over calculating user rewards When user claim rewards for the first time rewards over calculated Proof of Concept getPoolReward function uses ''uint256 timeSinceReward = block.timestamp - lastRewardTime'' formula to calculate period of time that...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•20 views

Malicious users can claim BYTES rewards after withdrawing all of their LP stake

Lines of code Vulnerability details Impact Users are able to continue claiming BYTES rewards indefinitely on their initials points after withdrawing all of their LP stake. Proof of Concept A user can withdraw all of their LP staked tokens in multiple steps with an amount 1e16. If the amount is...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•9 views

BYTES can be used to increase points by staking them immediately before withdrawing them

Lines of code Vulnerability details Impact When staking BYTES, users don't need to lock them for any specific time. BYTES are locked in a Citizen, and they are withdrawn together with the Citizen. Users can stake all the BYTES they own before withdrawing the citizen, increasing their points in th...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•21 views

User can call getReward multiple times causing 51% attack

Lines of code Vulnerability details Impact The Neo Tokyo staking program operates as follows: The staker is a competitive system where stakers compete for a fixed emission rate in each of the S1 Citizen, S2 Citizen, and LP token staking pools. Stakers "may" choose to lock their assets for some...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•15 views

Unvalidated input in setManagerRight function

Lines of code Vulnerability details Impact The setManagerRight function takes managedRight and managerRight as inputs without validating them This could potentially lead to unexpected results if the input values are not what the function expects. Tools Used Recommended Mitigation Steps Provide...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•11 views

Staking BYTES to Citizen does not extend timelock, allowing attacker to manipulate totalPoints with flash loan

Lines of code Vulnerability details Impact In NeoTokyoStaker, BYTES token can be staked into a Citizen. First, the Citizen must be staked, it will be locked for a timelock duration in Staking contract. Staker want to stake BYTES can specify this Citizen ID and stake into it. However, when users...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•4 views

TIMELOCK OPTION'S DURATION AND MULTIPLIER INACCURATELY DECODED

Lines of code Vulnerability details Impact The implementation of bitwise operations, i.e. and & in decode the timelock option's duration and multiplier does not seem to return results as expected. This could affect all other variables dependent on them. Proof of Concept These affect the function...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•14 views

Attacker can abuse rounding down to get reward without depositing anything in LP pool

Lines of code Vulnerability details Impact In function withdrawLP, it calculates the amount of points from the amount input parameter. unchecked uint256 points = amount 100 / 1e18 lpPosition.multiplier / DIVISOR; // Update the caller's LP token stake. lpPosition.amount -= amount; lpPosition.point...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•10 views

Ability to receive LP rewards without having any LP staked

Lines of code Vulnerability details Impact The impact of this is high as a user is able to first stake LP tokens, then craftily withdraw them in specific increments without any change to their staking rewards. The user is able to get to a state in which they have 0 LP tokens staked, but have 0 LP...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•12 views

# configureLP function should check LP stakers present before changing LP address.

Lines of code Vulnerability details configureLP function should check LP stakers existence before changing LP address. Permitted users are allowed to change LP address when lpLocked is false. So this does not follow the comments above. Proof of concept 1701 This function allows a permitted user t...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•12 views

BYTES2.getReward: no check for input

Lines of code Vulnerability details Impact the function getReward should validate that to is not an empty address 0x0 to prevent accidental loss of BYTES. Impact: mint reward BYTES to address0 will be lost Proof of Concept function getReward address to external uint256 reward, uint256 daoCommisio...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•11 views

User Rewards will be lost in case of Withdraw

Lines of code Vulnerability details Impact User loses his unclaimed rewards If user withdraw all of his staked tokens he won't be able to claim rewards Proof of Concept the point is used to calculate user rewards and when a user withdraw all of its staked tokens the point will be set to zero and...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•9 views

wrong updating lp position

Lines of code Vulnerability details Impact lock lp token at staking more than required when user adds some lp token staking amount, contract uses new timelockEndTime for previously staked amount . Proof of Concept Scenario : user have some amount of lp token staked for a period of time like 30 da...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•13 views

Flawed calculation in getPoolReward leads to permanent loss of rewards

Lines of code Vulnerability details In NeoTokyoStaker.getPoolReward, a users reward is calculated as follows: 1388: uint256 share = points PRECISION / pool.totalPoints totalReward; 1390: share /= PRECISION; points represents the users total points in the pool over a specific potentially long time...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/15 12:0 a.m.•20 views

An malicious user can mint a huge amount of BYTES 2.0 tokens for himself

Lines of code Vulnerability details Impact An attacker can mint a huge amount of BYTES 2.0 tokens for himself. Additionally, the rewards system can be permanently damaged by making the pool.totalPoints a huge number, not reflecting the actual state of the system. Proof of Concept There are two co...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/14 12:0 a.m.•11 views

Upgraded Q -> 2 from #345 [1678798679676]

Judge has assessed an item in Issue 345 as 2 risk. The relevant finding follows: Issue 2 - Undermining the fairness of the protocol in swapSource and possibilities for stealing a jackpot --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/14 12:0 a.m.•13 views

Upgraded Q -> 2 from #345 [1678798666534]

Judge has assessed an item in Issue 345 as 2 risk. The relevant finding follows: Issue 1 - An attacker can leave the protocol in a "drawing" state for extended period of time --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/12 12:0 a.m.•9 views

Upgraded Q -> 2 from #29 [1678626286403]

Judge has assessed an item in Issue 29 as 2 risk. The relevant finding follows: Maximum fixed reward is $6553.5 - too small in case of selectionSize = 16 --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/12 12:0 a.m.•11 views

Upgraded Q -> 2 from #493 [1678589994012]

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

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•4 views

Prevent users from creating plugin repository proxy

Lines of code Vulnerability details Impact The attacker can Front-running the transaction and prevent users from creating plugin repository proxy. Proof of Concept The PluginRepoFactory.createPluginRepo is used to create a plugin repository proxy pointing to the pluginRepoBase implementation and...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•9 views

Missing 0 address check

Lines of code Vulnerability details Impact A 0 address can be used here an transaction will not revert loosing funds Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. The Function alone doesn't...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•5 views

Funds in DAO contract cannot be withdrawn

Lines of code Vulnerability details Impact The DAO contract can receive funds but can not withdraw, Funds occasionally sent by users will be stuck in those contracts. Proof of Concept Receive funds through deposit function in DAO.solL218-L236 /// @inheritdoc IDAO function deposit address token,...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•9 views

createProposal snapshot block can temporarily desync with minApproval / minVotingPower

Lines of code Vulnerability details Impact minApproval and member list will be temporarily out of sync, potentially causing approval issues Proof of Concept uint64 snapshotBlock = block.number.toUint64 - 1; ... // Create the proposal Proposal storage proposal = proposalsproposalId;...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•8 views

No data validation, will result in all funds from the DAO contract stolen

Lines of code Vulnerability details Impact The vulnerability relies on the proposal creation function which forwards the proposal once accepted for the DAO contract to execute. Each proposal has a set of actions attached. struct Action address to; uint256 value; bytes data; function createProposa...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•9 views

MerkleMinter created through TokenFactory cannot be upgraded

Lines of code Vulnerability details Impact During the token creation process in the TokenFactory contract, the function creates a MerkleMinter contract to setup and handle token initial token distribution. ... // Clone and initialize a MerkleMinter address merkleMinter = merkleMinterBase.clone;...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•13 views

Incorrect EIP1271 magic value returned from DAO.isValidSignature

Lines of code Vulnerability details Impact An unexpected return value from the EIP1271 signature verification can lead to authorization for unwanted operations in external protocols. Proof of Concept As shown in the EIP1271 standard specification, when a signature is not valid, the returned magic...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•11 views

AddresslistVoting.removeAddresses txn can be monitored to create proposal and cast vote.

Lines of code Vulnerability details Impact The AddresslistVoting contract contains removeAddresses function to remove the addresses from address list. function removeAddresses address calldata members external authUPDATEADDRESSESPERMISSIONID removeAddressesmembers; emit MembersRemovedmembers:...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•7 views

Everything wrong with deposit method

Lines of code Vulnerability details Impact No Accounting, Wrong data in Event emission in case of Fees on transfer Tokens and limited usecase. Proof of Concept File: DAO.sol function deposit address token, uint256 amount, string calldata reference external payable override if amount == 0 revert...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•9 views

DAOs can be permanently locked due to insufficient parameter validation in _grantWithCondition()

Lines of code ttps://github.com/code-423n4/2023-03-aragon/blob/4db573870aa4e1f40a3381cdd4ec006222e471fe/packages/contracts/src/core/permission/PermissionManager.solL312 Vulnerability details Impact It is possible to set the condition contract to an EOA when granting permission with a condition th...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•8 views

CounterV2.setNewVariable can be invoked by anyone.

Lines of code Vulnerability details Impact The CounterV2.setNewVariable is an open function which can be invoked by anyone. function setNewVariableuint256 newVariable external reinitializer2 newVariable = newVariable; This function is intended to be invoked by PluginSetupProcessor &...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•11 views

createDao is suspicious of the reorg attack

Lines of code Vulnerability details Description The createDao function creates a dao contract via create opcode. The trace is createDao = createDAO=createERC1967Proxy. The address of the newly created contract depends on the DAOFactory nonce. At the same time, block reorg may happen on any...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•6 views

Locked Ether

Lines of code Vulnerability details Impact Contract with a payable function, but without a withdrawal capacity. Proof of Concept File: packages/contracts/src/core/dao/DAO.sol 233: external payable override 284: receive external payable Every Ether sent to DAO.sol will be lost. Tools Used VS Code...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•3 views

No enough validation check for isValidSignature

Lines of code Vulnerability details Impact There is not enough validation check for the isValidSignature function. The only validation check for the signature is that for Zero address which returns false. There should be enough validation check Proof of Concept Tools Used Manual Review Recommende...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•4 views

Not having enough ETH may cause the transaction to fail

Lines of code Vulnerability details Impact The transaction will fail due to not having enough ETH. Proof of Concept When the proposal is executed, the protocol will call the function DAO.execute.The DAO protocol also supports sending ETH to external contract as the following code. bool success,...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•10 views

A malicious actor can create a non malicious plugin, but then simply change the implementation of the plugin repo, allowing him to change the logic and create malicious plugins

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Any developer can create their plugin repo and others can use them to download various plugins. The problem is that the plugin repo's are upgradeable, and the owner access and permissions to upgrade are...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•7 views

there is no way withdraw eth

Lines of code Vulnerability details Impact eth will be stuck inside the contract Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. Tools Used Recommended Mitigation Steps --- The text was update...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•8 views

Multisig: Users can approve proposals even after getting removed

Lines of code Vulnerability details Impact The Multisig contract intends to enable the creation and approval of proposals among a predetermined list of multisig addresses. The multisig addresses can be added or removed by a authorative identity. While creating a new proposal a snapshotBlock...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•10 views

Use of timestamp for comparisons

Lines of code Vulnerability details Impact The timestamp in use can be manipulated causing a logic bug in the checks performed Proof of Concept Tools Used slither Recommended Mitigation Steps use random number generation --- The text was updated successfully, but these errors were encountered: Al...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•13 views

INITIALIZE FUNCTION IN COUNTERV2.SOL CAN BE INVOKED MULTIPLE TIMES FROM THE IMPLEMENTATION CONTRACT

Lines of code Vulnerability details Impact Initialize function in CounterV2.sol can be invoked multiple times from the implementation contract. This means a compromised implementation can reinitialize the contract above. Usually in Upgradeable contract, an initialize function is protected by the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•9 views

Make proposals fail, no-revert on error, loss of funds

Lines of code Vulnerability details Impact The issue exists because anyone can call executein the multisig contract with will execute the proposal in the DAO contract. The problem here is that certain proposal will not revert when they fail because they have the uint256 allowFailureMap param set ...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•10 views

Return value unchecked - leads to privilege escalation

Lines of code Vulnerability details Impact The application doesn't check the return value of isGrantes properly Proof of Concept no check on the return value only exception handled Tools Used slither Recommended Mitigation Steps check the return value or force it for the implementing class --- Th...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•9 views

Proposal may not be executed

Lines of code Vulnerability details Impact Proposal may not be executed Proof of Concept The protocol allows the member to have the voting power to create a proposal createProposal. Where the action struct in the parameter refers to be consumed by the DAO's execute function resulting in an extern...

7.3AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/10 12:0 a.m.•9 views

User may force fail the action from the DAO:execute

Lines of code Vulnerability details Description The execute function from the DAO.sol contract allow to execution of any call to any address if the caller has appropriate permission. Some calls are expected to be always successfully executed, and some may revert and execute will continue the...

7.3AI score
SaveExploits0
Total number of security vulnerabilities10190