Gigablocks

Gigablocks Smart Contract Audit Report

Share
Share
EthereumEthereumBaseBase
NFT EcosystemERC721 ContractERC1155+2
EthereumEthereumBaseBase
NFT EcosystemERC721 Contract+3

QuillAudits audited the Gigablocks smart contracts on Ethereum and Base between Jun 5, 2025 and Jul 1, 2025. The audit found 12 issues: 2 critical, 1 high, 4 medium, 5 low, of which 10 resolved and 2 acknowledged.

Project Description

Gigablocks NFT Protocol for school connectivity projects, where users can mint and trade NFTs representing schools worldwide. The GigaMinter contract handles both free admin minting and paid public minting, collecting donations for school connectivity initiatives. The Escrow contract securely holds NFTs, managing reservations by email and facilitating transfers to school addresses and collectors. The GigaSeller contract implements a dynamic pricing mechanism with linear price increases based on demand for secondary market trading. The Nft contract is an upgradeable ERC721 implementation that generates unique tokens for each school, while NftContent manages comprehensive metadata including school details like location, connectivity status, and electricity availability. The ImageContent contract stores chunked base64 image data organized by geographic regions, enabling dynamic visual generation. Finally, QOSGiga serves as a quality-of-service oracle system, allowing authorized managers to store Arweave hashes by date for tracking school connectivity metrics. The entire Protocol operates under a two-tier NFT model: school NFTs for institutional ownership and collector NFTs for public trading, with robust access controls and pause mechanisms for secure operations.

Timeline

S1
Jun 5, 2025
IA
Jun 16, 2025
S2
Jul 1, 2025
speedometer
0
50%
60%
70%
90%
100%
93.5%
AUDIT SCORE
icon

Critical

High

Medium

Low

Informational

open00000
acknowledged01010
partially resolved00000
resolved20440
Gigablocks

Gigablocks

Critical Severity Issues

Users can lose previous donations through data override when calling sendDonation multiple times

Resolved
arrow-right
Description

The sendDonation() function in the GigaMinter contract contains a critical vulnerability that allows users’ previous donation data to be completely overwritten when they call the function multiple times. This occurs due to the unconditional assignment of the bulkMinters mapping without any checks for existing data or accumulation logic. The vulnerable code is located in the sendDonation() function:

function sendDonation(uint256 _schools) public payable nonReentrant {
require(msg.value >= baseFee * _schools, “GigaMinter: Insufficient funds”);
bulkMinters[msg.sender] = BulkMinter({
totalDonation: msg.value,
totalSchoolsToMint: _schools,
minter: msg.sender,
remainingSchoolsToMint: _schools
});
_transferDonation(msg.value);
}


The critical flaw lies in the direct assignment bulkMinters[msg.sender] = BulkMinter({…}) which completely replaces any existing BulkMinter struct for the same user address. This assignment operation does not check whether the user already has an existing donation record, nor does it accumulate the new donation with the previous one

The vulnerability manifests in the following scenario: when a user calls sendDonation() for the first time, their donation is recorded correctly. However, if the same user calls sendDonation() again before all their entitled NFTs from the first donation have been minted, the second call overwrites the entire BulkMinter struct. This results in the loss of tracking for any remaining NFTs from the first donation, effectively causing the user to lose access to NFTs they have already paid for.

The mintForDonor() function, which is responsible for minting NFTs for donors, relies on the remainingSchoolsToMint field

function mintForDonor(
string memory _schoolId,
address _schoolNftTo,
address _collectorNftTo,
string[9] memory _values
) public onlyOwner nonReentrant {
require(bulkMinters[_collectorNftTo].remainingSchoolsToMint > 0,
“GigaMinter: No schools to mint”);
uint256 schoolNftTokenId = _mintSchools(_schoolId, _schoolNftTo,
_collectorNftTo, _values);
bulkMinters[_collectorNftTo].remainingSchoolsToMint -= 1;
emit NFTMinted(schoolNftTokenId, _schoolNftTo, _collectorNftTo,0);
}


When the bulkMinters mapping is overwritten, the remainingSchoolsToMint count is reset to the new
donation amount, completely losing track of the previous donation’s remaining entitlements.

Contract

src/contracts/GigaMinter.sol

Recommendation

Implement an accumulative donation system that preserves existing entitlements when users make additional donations

Buyers can bypass fee escalation mechanism affecting protocol revenue

Resolved
arrow-right
Description

The vulnerability stems from a fundamental conflict in the pricing mechanisms between the GigaMinter and GigaSeller contracts. While GigaSeller is designed with an escalating price model where NFT costs increase with each purchase, GigaMinter offers a fixed-price alternative that completely undermines this economic structure. This creates a loophole where buyers can bypass the intended fee escalation once prices in GigaSeller exceed GigaMinter’s base fee.

The issue manifests as a classic arbitrage opportunity that worsens with protocol adoption. Initially, both contracts have comparable pricing, but as more NFTs are sold through GigaSeller, its prices rise according to the increment formula while GigaMinter’s prices remain static. This growing price disparity creates an inevitable economic incentive for buyers to choose the cheaper GigaMinter option, effectively rendering GigaSeller’s pricing model obsolete.

This architectural flaw has severe consequences for protocol economics. The escalating price mechanism in GigaSeller is meant to serve multiple purposes: generating increasing revenue for the protocol, creating artificial scarcity, and rewarding early adopters. By allowing buyers to circumvent this through GigaMinter, the protocol loses its primary value capture mechanism and long-term sustainability model

Contract

src/contracts/GigaMinter.sol , src/contracts/GigaSeller.sol

Recommendation

To ensure a consistent and sustainable economic model, the pricing logic between GigaMinter and GigaSeller must be fully aligned. Both contracts should enforce the same price mechanism

High Severity Issues

Medium Severity Issues

Low Severity Issues

Appendix

Disclaimer

Gigablocks

Gigablocks

Critical Severity Issues
High Severity Issues
Medium Severity Issues
Low Severity Issues
Appendix
Disclaimer
View Report PDF

Get an Audit done today for your Smart Contract

Join 1500+ leaders who secured themselves from losing Billion Dollars

cta-banner
cta-banner-bgcta-banner-bg-mobile

Related audits

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC