Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/03/19 12:00 a.m.14 views

Here are some potential security vulnerabilities that I have identified in this particular contract (BytecodeCompressor.sol)

Lines of code Vulnerability details Impact 1. Integer overflow: In the publishCompressedBytecode function, the check dictionary.length = 2 16 8 is intended to ensure that the dictionary does not become too large, but it is not sufficient to prevent an integer overflow. If dictionary.length exceed...

7.3AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/19 12:00 a.m.16 views

Unchecked return values in setValueForNextCall

Lines of code Vulnerability details Title: Description: When creating a contract, if there is value to be transferred the constructContract function of ContractDeployer will use the SystemContractsHelper.setValueForNextFarCall Method: However in constructContract function doesn't verify that the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/19 12:00 a.m.13 views

Incorrect usage of EIP-150

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. 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...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/19 12:00 a.m.15 views

Unchecked msg.value will lead to losing funs inside the contract

Lines of code Vulnerability details Impact While paying for the transaction, function payForTransaction bytes32, // txHash bytes32, // suggestedSignedHash Transaction calldata transaction external payable ignoreNonBootloader ignoreInDelegateCall //@audit-issue no checks that actulayy there is...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/19 12:00 a.m.18 views

NonceHolder.setValueUnderNonce does not check if the nonce has been used before

Lines of code Vulnerability details Impact Already used nonces or the nonces less than the specified minimal nonce can be used by the NonceHolder.setValueUnderNonce function. It can lead to some unique conflicts and even replay attacks on some of dapps which are based on the values under nonces...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/19 12:00 a.m.17 views

Contracts are susceptible for Head Overflow Bug in Calldata

Lines of code Vulnerability details Impact ABI-encoding a tuple with a statically-sized calldata array in the last component would corrupt 32 leading bytes of its first dynamically encoded component. Proof of Concept The functions are taking input arguments as calldata. Following contracts are...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/19 12:00 a.m.20 views

Gas check inaccuracy

Lines of code Vulnerability details Impact Since the gas forwarded will be limited to 63/64 of the total gasleft, L1 transactions will be vulnerable of being reverted. To achieve 1:1 partity with the EVM, the ZKEVM should account for 1/64 rule. Please refer to the 1/64 rule here. The actual amoun...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.11 views

Operator can cause funds to be stolen by manipulating gas fee refund

Lines of code Vulnerability details Impact An operator can manipulate the refund of gas fee mechanism to steal from the bootloader balance. Inside refundCurrentL2Transaction function in the bootloader where the refund is happening for the refund recipient at L1097, the operator provides a value f...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.17 views

The price fee for fusion characters is incorrect.

Lines of code Vulnerability details Vulnerability details Price fee for fusion characters is incorrect. According to the docs Fusing To fuse a namespace NFT, the user specifies the trays and the tiles offsets within the trays to use. Note that the whole tray is always burned, even if you only use...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.12 views

Attacker could potentially burn the token balance of totalSupply and L2EthContract

Lines of code Vulnerability details Impact Attacker potentially can burn all L2EthContract and totalSupply tokens Proof of Concept function withdrawaddress l1Receiver external payable override uint256 amount = msg.value; // Silent burning of the ether unchecked balanceaddressthis -= amount;...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.17 views

Sending L2 ---> L1 message without paying gas for published data due to uint256 overflow

Lines of code Vulnerability details Impact Due to this bug, a user can send arbitrarily long messages greater than a certain length from L2 to L1 without paying for the gas that is required for publishing data on L1. Proof of Concept Below is a PoC contract called "Test" that illustrates the bug...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.14 views

User can fuse an NFT with minimal cost

Lines of code Vulnerability details Impact User can fuse an NFT with minimal cost Proof of Concept The fuse is used to fuse a new Namespace NFT with the referenced tiles,if it is called, the protocol will transfer fusing costs from msg.sender to revenue address. The fusing costs is calculated...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.18 views

Users can fuse an NFT without burning a tray NFT

Lines of code Vulnerability details Impact Users can fuse an NFT without burning a tray NFT Proof of Concept The Namespace protocol allows user to fuse a new Namespace NFT with the referenced tiles. Inside the fuse function, the protocol first transfer fusing costs from msg.sender to revenue...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.16 views

Adding Multiple Blocks with the Same Timestamp Can Create Ambiguity in the Order of Blocks in the Blockchain Network

Lines of code Vulnerability details Impact Multiple blocks at the same timestamp creates ambiguity about the order in which these blocks should be added to the chain. This can cause inconsistencies in the state of the network and make it vulnerable to attacks such as double-spending. Proof of...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.12 views

_l1Receiver may lose the token amount

Lines of code Vulnerability details Impact l1Receiver lose the token amount Proof of Concept function withdrawaddress l1Receiver external payable override uint256 amount = msg.value; // Silent burning of the ether unchecked balanceaddressthis -= amount; totalSupply -= amount; // Send the L2 log, ...

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

Possible loss of funds when withdrawing from L2 to L1

Lines of code Vulnerability details Impact Context To initiate a withdrawal from L2 to L1, a user can call L2EthToken.withdraw method, then funds will be available to calim on L1 via finalizeEthWithdrawal method of MailboxFacet. function withdrawaddress l1Receiver external payable override The...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.18 views

Reentrancy in ProfilePicture.mint()

Lines of code Vulnerability details Impact Reentrancy in ProfilePicture.mint Proof of Concept The protocol allows user to mint a PFP NFT. Inside the mint function ,there is a check that ERC721nftContract.ownerOfnftID != msg.sender, as the code below the nftContract and nftID is specified by the...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.11 views

Missing check for NFT contract, a bad actor can mint a PFP NFT without having a CID NFT

Lines of code Vulnerability details Impact Missing check for NFT contract, a bad actor can mint a PFP NFT without having a CID NFT. Proof of Concept The ProfilePicture.mint is used to mint a new PFP NFT. function mintaddress nftContract, uint256 nftID external uint256 tokenId = ++numMinted; if...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/18 12:00 a.m.25 views

The Risk of Adding an Incorrect Previous Block Hash Value in a Blockchain Network

Lines of code Vulnerability details Impact There is a risk of adding an incorrect previous block hash value to a block, either intentionally or unintentionally. If the previous block hash value is incorrect, it means that the data in the previous block has been tampered with, and the current bloc...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/17 12:00 a.m.11 views

Bytecode Compressor Contract Replay Attack.

Lines of code Vulnerability details Impact Injection of duplicate code. Proof of Concept In the markBytecodeAsPublished function, the contract does not check whether a particular hash has already been added to the storage. The contract only checks the current marker value of the hash, which is se...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/17 12:00 a.m.13 views

getBlockHashEVM() function vulnerability leads to DoS attack

Lines of code Vulnerability details Impact By using the getBlockHashEVM function with erroneous input, an attacker can take advantage of this vulnerability to deprive the contract of gas and launch a denial of service DoS attack against the network, contracts and valid transactions will therefore...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/17 12:00 a.m.16 views

An attacker can manipulate the call stack of the transaction to impersonate another address and set a different value for the origin variable.

Lines of code Vulnerability details Impact By changing the transaction's call stack, an attacker can use the origin variable to pretend to be another address, as a result, the attacker can be able to enter the system without authorization and carry out evil deeds. Proof of Concept The vulnerabili...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/17 12:00 a.m.11 views

Reentrancy in validateTransaction function

Lines of code Vulnerability details Impact The contract can be called by an attacker several times until the money are depleted. The contract owner may suffer financial damages as a result of this vulnerability. Description The validateTransaction function in line 66-71 accepts external calls and...

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

Upgraded Q -> 3 from #197 [1678982150949]

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

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/15 12:00 a.m.13 views

Rewards calculation is unfair and leads to stakers losing rewards

Lines of code Vulnerability details User rewards are updated upon staking actions ie stake or withdraw: File: contracts/staking/NeoTokyoStaker.sol 1225: // Grant the caller their total rewards with each staking action. 1226: IByteContractBYTES.getRewardmsg.sender; Which are computed as follows:...

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

Misconfiguration of LP token contract

Lines of code Vulnerability details Impact If the LP token contract is set to a non-contract address or a no-revert-on-transfer token, users will be able to: 1. Mint huge amounts of BYTES 2.0 tokens. 2. Drain the contract of all its LP tokens. Vulnerability Details Throughout the contract, it is...

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

Lack of a contract existence check may lead to undesired behavior

Lines of code Vulnerability details Impact The functions NeoTokyoStaker.assetTransferFrom and NeoTokyoStaker.assetTransfer are both used as helper functions to perform low level calls, both functions revert if the low-level call fails, but no checks are made if the contract that's being called...

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

Users cant withdraw S1 or S2 Citizens if no timelockEndTime is associated with it

Lines of code Vulnerability details Impact Users cant withdraw S1 or S2 Citizens if no timelockEndTime is associated with it. As the same logic is applied in the withdrawLP function, this is not intended behavior. Currently, there are no allowances for a S1 or S2 Citizen to withdraw their asset i...

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

Updating a pool's total points doesn't affect existing stake positions for rewards calculation

Lines of code Vulnerability details Impact Staking rewards are calculated based on the user's share of total points in the corresponding asset pool, this is the sum of the points associated to the staker's positions divided by the total points from all positions in the pool. We can see this...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/15 12:00 a.m.10 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:00 a.m.12 views

User can claim high rewards than he eligible

Lines of code Vulnerability details Impact User will receive rewards more than he should receive calculation of rewards for user can be continued even after withdraw Proof of Concept when a user claim rewards, the lastRewardTime will be set to block.timestamp , now consider a scenario that user...

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

Permit authorized callers can burn any amount of BYTES 2.0 tokens from an arbitrary address

Lines of code Vulnerability details Impact Using the burn function of BYTES 2.0, an authorized caller can burn an arbitrary amount of tokens from any address. I'm aware that it was mentioned in README.md of the project that this type of finding is out of the scope. but I believe it is still...

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

upgradeBytes() functon doesn't allows user to upgrade their entire bytes1 token to bytes2 token

Lines of code Vulnerability details Impact The users can't upgrade all of its bytes1 token to bytes due to logic error in upgradeBytes functon. The user can only upgrade the token if he choose the less amount then what they already have. They cannot upgrade all tokens. Proof of Concept The...

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

Users cant stake into S1 or S2 Citizen if they dont have a timelockEndTime

Lines of code Vulnerability details Impact function stakeBytes if citizenStatus.timelockEndTime == 0 revert CannotStakeIntoUnownedCitizencitizenId, seasonId; A user will not be able to successfully stake their Bytes into a Season 1 or Season 2 Citizen if they do not have a timelockEndTime set. Th...

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

Some Amount of tokens will be left behind in BYTES 1.0

Lines of code Vulnerability details Impact If user wants to upgrade all its token he won't be able to do that. Proof of Concept Let's see what is happening function upgradeBytes uint256 amount external if IERC20BYTES1.balanceOfmsg.sender amount revert DoNotHaveEnoughOldBytesamount; During the...

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

Incorrect validation of the result of the transfer * transferFrom method call. Failure to comply with the ERC20 standard

Lines of code Vulnerability details Impact Inability to use ERC20 standard tokens. As an example of the future LP token Proof of Concept According to the ERC-20 standard, the transfer and transferFrom methods return true or false, but looking at the code we see that:...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/15 12:00 a.m.13 views

Error in the calculation of daoShare value in the getPoolReward function

Lines of code Vulnerability details Impact In the getPoolReward function inside the NeoTokyoStaker contract there is an error in the calculation of the daoShare value which represents the part of rewards sent to the treasury, this means that the treasury will receive less rewards that what it is...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/15 12:00 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:00 a.m.20 views

NeoTokyoStaker.getPoolReward function can be frontrun, which can cause staker and DAO to lose reward shares that they are entitled to

Lines of code Vulnerability details Impact When calling the following NeoTokyoStaker.stakeBytes and NeoTokyoStaker.stakeLP functions, the higher the specified amount to be staked is, the higher the pool.totalPoints is increased by. function stakeBytes uint256 private uint256 amount; uint256...

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

Use the _assetTransferFrom function instead of _assetTransfer. This is because the tokens are held in the escrow contract, rather than being in the destination BYTES address, and thus require a transfer from the escrow contract to the recipient's address

Lines of code Vulnerability details Impact The msg.sender lose his stakedBytes From BYTES address not possible to send stakedBytes to msg.sender. The stakedBytes only help in escrow contract not in BYTES address. Proof of Concept function assetTransfer address asset, address to, uint256 amount...

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

Vault staked along with "Hands of the Citadel" does not have any effect but still be locked

Lines of code Vulnerability details Impact In function stakeS1Citizen, when the S1 citizen has class Hands of Citadel, it will ignore the vault staked but still transfer the vault into Staking contract. It will effectively lock the vault for timelockDuration but does not have any effect on...

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

share underflow in getPoolReward()

Lines of code Vulnerability details Impact It is important to draw attention to an issue that, while out of scope, can lead to a complete loss of funds on the contract and, therefore, seems significant. The configurePools function allows setting an arbitrary, unrestricted daoTax, which can result...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/15 12:00 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:00 a.m.13 views

Infinite mint via points underflow (in scope)

Lines of code Vulnerability details Impact Due to unchecked math in the withdrawLP function, a user can trigger an underflow in their points and infinitely increase their rewards. The problem exists in several places. Problem 1. The configureTimelockOptions function allows setting...

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

_withdrawLP is not re-setting the lpPosition.points when lpPosition.amount

Lines of code Vulnerability details Impact User can withdraw their LP tokens without affecting their lpPosition.points. Since the lpPosition.points could not deducted then and there whenever the LP token is drawn out, user can use the old lpPosition.points and new lpPosition.points value to...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/15 12:00 a.m.13 views

the S1 Citizen and S2 Citizen loops in the second getStakerPositions are not working properly

Lines of code Vulnerability details Impact This can result in the second loop not running correctly and resulting in an error in the logic, in case if the length of the stakerS1Positionstaker or stakerS2Positionstaker arrays is very large, the operation of adding or subtracting the index on...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/15 12:00 a.m.11 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:00 a.m.13 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:00 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:00 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
Total number of security vulnerabilities10190