Problem Statement
lib.rs::execute_batch_atomic calls
crate::require_verified_user(env, caller_addr) only when caller is
Some. The BatchOperation::MintToken case sets caller = None,
bypassing KYC. Anyone can mint by submitting a batch where the first
operation is a MintToken.
Expected Outcome
Every batch route is authenticated; MintToken is admin-only within
batches.
Acceptance Criteria
execute_batch_atomic and execute_batch_best_effort always
call require_admin if any op is MintToken.
- Test: non-admin batch with MintToken reverts.
check_kyc_guards.sh updated.
Files Affected
peerx-contracts/counter/src/lib.rs, scripts/check_kyc_guards.sh.
Dependencies Issue #11.
Difficulty / Effort 🥈 / S
Labels bug, security, priority/critical
Problem Statement
lib.rs::execute_batch_atomiccallscrate::require_verified_user(env, caller_addr)only whencallerisSome. TheBatchOperation::MintTokencase setscaller = None,bypassing KYC. Anyone can mint by submitting a batch where the first
operation is a MintToken.
Expected Outcome
Every batch route is authenticated;
MintTokenis admin-only withinbatches.
Acceptance Criteria
execute_batch_atomicandexecute_batch_best_effortalwayscall
require_adminif any op isMintToken.check_kyc_guards.shupdated.Files Affected
peerx-contracts/counter/src/lib.rs,scripts/check_kyc_guards.sh.Dependencies Issue #11.
Difficulty / Effort 🥈 / S
Labels
bug,security,priority/critical