Skip to content

Comments

N-06: Early-revert on zero native value for first id in HybridAllocator#28

Merged
mgretzke merged 2 commits intov1-audit1from
fix/n06-hybrid-zero-native-value
Dec 9, 2025
Merged

N-06: Early-revert on zero native value for first id in HybridAllocator#28
mgretzke merged 2 commits intov1-audit1from
fix/n06-hybrid-zero-native-value

Conversation

@ccashwell
Copy link
Member

In HybridAllocator._actualIdsAndAmounts, if first id is native and msg.value == 0, revert with InvalidValue(0, 1). This early failure in allocator, rather than letting The Compact revert, provides a clearer error surface.

Test updated: test_allocateAndRegister_revert_zeroNativeTokensAmount now expects allocator-level revert.

If first token is native, require non-zero msg.value to fail earlier in HybridAllocator instead of relying on The Compact to revert. Update test to assert allocator-level revert.
@ccashwell ccashwell requested a review from a team as a code owner September 11, 2025 14:28
@mgretzke mgretzke merged commit dd052d8 into v1-audit1 Dec 9, 2025
4 checks passed
@mgretzke mgretzke deleted the fix/n06-hybrid-zero-native-value branch December 9, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants