Assessment reports>Revest Finance>Low findings>Batched mints can be rejected by a single recipient
Category: Business Logic

Batched mints can be rejected by a single recipient

Low Severity
Low Impact
Low Likelihood

Description

function mintBatchRec(address[] calldata recipients, uint[] calldata quantities, uint id, uint newSupply, bytes memory data) external override onlyRevestController {
	supply[id] += newSupply;
	fnftsCreated += 1;
	for(uint i = 0; i < quantities.length; i++) {
		_mint(recipients[i], id, quantities[i], data);
	}
}

A batched mint from mintBatchRec is susceptible to being cancelled by a single recipient failing the ERC-1155 AcceptanceCheck

Impact

Gas is wasted, and other willing recipients do not receive the FNFTs. The batched mint execution has to be retried.

Recomendations

  • Execute the batched mint in a try catch loop and refund if a mint fails.

  • If intended, document this behaviour.

Remediation

The issue has been acknowledged by the Revest team, and a fix is pending.

Zellic © 2024Back to top ↑