• Login
Crypto Newsmart
No Result
View All Result
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • ALTCOIN
    • ETEREUM
    • NFT’s
    • CRYPTO PRICE ANALYSIS
  • LEARN CRYPTO
  • CRYPTO EXCHANGES
  • BLOCKCHAIN
  • MINING
  • SCAM ALERT
  • PRESS RELEASE
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • ALTCOIN
    • ETEREUM
    • NFT’s
    • CRYPTO PRICE ANALYSIS
  • LEARN CRYPTO
  • CRYPTO EXCHANGES
  • BLOCKCHAIN
  • MINING
  • SCAM ALERT
  • PRESS RELEASE
No Result
View All Result
Crypto Newsmart
No Result
View All Result

Logic Error in Latest NFT Contract Costs ben.eth 100 ETH in Potential Profits

Crypto Newsmart by Crypto Newsmart
2 years ago
in NFT's
Reading Time: 3 mins read
46
VIEWS
Share on Facebook

SNEAK PEEK

  • Renowned NFT creator ben.eth suffered a financial setback due to a logic error in his latest NFT contract.
  • The error was caused by a programming oversight in the contract’s code, specifically related to the “maxSupply” variable.
  • The oversight led to a loss of approximately 100 ETH in potential profits for ben.eth.

In a surprising turn of events, renowned NFT creator ben.eth has suffered a significant financial setback due to a crucial logic error in his latest NFT contract. The oversight resulted in the unintended capping of the collection size to 9,000 tokens instead of the intended 10,000, causing him to miss approximately 100 ETH in profits.

There is a huge logic error in ben.eth’s latest NFT contract that capped the collection size to 9k instead of the 10k he intended it to be lmao.

He effectively lost out on 100 ETH of profits because of one line of code 🤦‍♂️.

Here’s an explanation of the bug: pic.twitter.com/YvMONlFJAO

— cygaar (@0xCygaar) June 1, 2023

The issue stems from a single line of code within the contract, specifically about the “maxSupply” variable. Initially set to 10,000, this variable was meant to represent the supply cap for the collection.

However, upon examining line 46 of the contract, it becomes evident that the variable “available supply” determines the number of mints available to the public. Consequently, the team was allocated 1,000 mints, resulting in the “available supply” value being set to 9,000.

The problem escalates when examining L61 of the contract, which checks that the total number of NFTs minted is at most 10,000. Regrettably, the contract owner had already minted 1,000 NFTs immediately after deployment, increasing the “total supply” to 1,000. Due to this alteration, the maximum available supply for users was limited to 8,000 rather than the intended 9,000.

Now if we go to L61, there’s a check to make sure that the total number of NFTs minted doesn’t exceed 10k.

This is where the problems arise. You see, the contract owner minted 1000 NFTs immediately after deployment. By doing so, they increased the value of totalSupply() to 1000. pic.twitter.com/IdxHJbb9kv

— cygaar (@0xCygaar) June 1, 2023

The issue arises because the cap should have been set to the original value of 10,000, given that the owner minted first. Instead, the oversight caused the collection to be capped at 9,000 tokens.

To rectify this issue, L61 should have been programmed to compare “totalSupply” with “maxSupply,” rather than “availableMaxSupply.” The latter variable would have been relevant only if public and owner mints coincided.

Due to this programming error, ben.eth has experienced a substantial financial loss, missing an estimated 100 ETH in potential profits. The incident is a stark reminder of the critical importance of thorough code review and meticulous testing, especially in the rapidly evolving world of non-fungible tokens.

While the error has undoubtedly been a setback for ben.eth, it also emphasizes the need for increased diligence among NFT creators and developers to ensure the integrity and functionality of their contracts.

As the NFT market expands, such oversights can have significant financial implications, underscoring the necessity for comprehensive quality assurance processes.

Ben.eth is expected to address the issue promptly and provide a resolution for affected users. In the meantime, this incident serves as a valuable lesson for both creators and consumers of NFTs, highlighting the importance of vigilance and due diligence in the rapidly evolving digital asset landscape.

Source link

Related Posts

5TARS.io Adopts Concordium Blockchain to Boost Web3 Sports Gaming
NFT's

5TARS.io Adopts Concordium Blockchain to Boost Web3 Sports Gaming

28 March 2025
NikolAI Launches First AI-Generated NFT Collection for Durov’s Birthday
NFT's

NikolAI Launches First AI-Generated NFT Collection for Durov’s Birthday

12 March 2025
Pixelport Launches Testnet for Cross-Chain NFT Trading
NFT's

Pixelport Launches Testnet for Cross-Chain NFT Trading

8 March 2025
Somnia Unveils Plans to Onboard Millions of Gamers to Web3
NFT's

Somnia Unveils Plans to Onboard Millions of Gamers to Web3

5 March 2025
Somnia Blockchain Sets New Benchmark with 1.05 Million TPS on Devnet, Announces Upcoming Testnet Launch
NFT's

Somnia Blockchain Sets New Benchmark with 1.05 Million TPS on Devnet, Announces Upcoming Testnet Launch

1 March 2025
Somnia Ecosystem Receives Up to 0M Backing from Improbable and MSquared
NFT's

Somnia Ecosystem Receives Up to $270M Backing from Improbable and MSquared

21 February 2025

[convertful id="153816"]

by CurrencyRate.Today
  • Home
  • Disclaimer
  • Privacy Policy
  • Digital Millennium Copyright Act Policy (DMCA)
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us
CRYPTO NEWSMART

Copyright © 2021 Crypto Newsmart.

No Result
View All Result
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • ALTCOIN
    • ETEREUM
    • NFT’s
    • CRYPTO PRICE ANALYSIS
  • LEARN CRYPTO
  • CRYPTO EXCHANGES
  • BLOCKCHAIN
  • MINING
  • SCAM ALERT
  • PRESS RELEASE

Copyright © 2021 Crypto Newsmart.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Manage Cookie Consent

We use cookies to optimise our website and our service.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Preferences
{title} {title} {title}