10190 matches found
Unsafe system contract verification
Lines of code Vulnerability details Impact On the following function: function isSystemContractaddress address internal pure returns bool return uint160address = uint160MAXSYSTEMCONTRACTADDRESS; it does check whether an address is a system contract by checking whether it is smaller than...
L2EthToken.sol balance[address(this)] COULD UNDERFLOW
Lines of code Vulnerability details Impact The ethereum balance of the L2EthToken.sol contract can underflow thus breaking the accounting of the protocol for L2-L1 fund transfers. Proof of Concept L2EthToken.sol contract has the withdraw function to transfer funds to L1 for withdrawal. In the...
A user can mint a PFP NFT multiple times using the same _nftId
Lines of code Vulnerability details Impact A user might unintentionally "intentionally" try to take advantage of the mint function in ProfilePicture.sol Proof of Concept The pfp mapping stores the pfp data per NFT, L31-32 of Profilepicture.sol /// @notice Stores the pfp data per NFT mappinguint25...
ProfilePictureData is not stored, which will cause serious logic errors
Lines of code Vulnerability details Impact All data minted by the contract will not be stored, paralyzing the entire contract Proof of Concept code snippet: function mintaddress nftContract, uint256 nftID external uint256 tokenId = ++numMinted; if ERC721nftContract.ownerOfnftID != msg.sender reve...
Wrong Implementation of EIP-712
Lines of code Vulnerability details Impact The EIP-712 uses several parameters. Those parameters are exactly: EIP712Domain string name; string version; uint256 chainId; address verifyingContract; As you can see on the following Domain, ZkSync, is missing one parameter: bytes32 constant...
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...
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...
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...
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...
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...
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...
_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, ...
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...
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;...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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:...
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...
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 ...
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...
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...
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...
Executing getCreditYield(citizenId, citizenVaultId) in NeoTokyoStaker._stakeS1Citizen function can cause identityPoints to be lower than it should be when corresponding S1 Citizen to be staked does not have a component vault but an optional vault is provided
Lines of code Vulnerability details Impact Calling the following NeoTokyoStaker.stakeS1Citizen function executes string memory citizenCreditYield = getCreditYieldcitizenId, citizenVaultId and uint256 identityPoints = identityCreditPointscitizenCreditYield. When the S1 Citizen to be staked does no...
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...
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...
_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...
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...
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...
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...
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...
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...
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...
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...
Total reward is miscalculating
Lines of code Vulnerability details Impact In the getPoolReward the calcul of totalReward is wrong because the rewardRate is not updated. When block.timestamp is less or equal to windows.startTime the reward rate should equal to the current window rate not the previous one. Proof of Concept...
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...
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...
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...
LP tokens without 18 decimals are not supported
Lines of code Vulnerability details Impact If the LP token used does not have 18 decimals, staking rewards for LP tokens will be much more or much less than intended. Vulnerability Details In stakeLP and withdrawLP, the formulas for calculating points are as shown: NeoTokyoStaker.solL1155 uint256...