Omniscia Evergon Labs Audit
FungibleFractionsDO Manual Review Findings
FungibleFractionsDO Manual Review Findings
FFD-01M: Potential Non-Standard EIP-1155 Behaviour
| Type | Severity | Location |
|---|---|---|
| Standard Conformity | ![]() | FungibleFractionsDO.sol:L395 |
Description:
Although not clearly outlined as incorrect by the EIP-1155 standard, a transfer of zero will presently fail in the FungibleFractionsDO implementation if the transferrer never held the ID of the asset being sent.
Impact:
As the EIP-1155 standard does not contradict the FungibleFractionsDO implementation, we consider this to be an informational observation on the implementation.
Example:
contracts/dataobjects/FungibleFractionsDO.sol
385function _decreaseBalance(DiidData storage diidd, uint256 id, uint256 value, DataPoint, bytes32 diidFrom) internal {386 uint256 diidBalance = diidd.balances[id];387 if (diidBalance < value) {388 revert InsufficientBalance(diidFrom, id, diidBalance, value);389 }390 unchecked {391 diidBalance -= value;392 }393 diidd.balances[id] = diidBalance;394 if (diidBalance == 0) {395 if (!diidd.ids.remove(id)) revert DiidIdNotFound(id);396 }397}Recommendation:
We advise this to be evaluated and potentially supported as it may cause integration complications by systems that expect transfers to always succeed even if zero.
Alleviation (c6b23c23d8bcd8cce85049ad959cbd711a37126b):
The code was updated to permit a transfer of zero to be executed, addressing this exhibit.
