0xbok

Results 41 issues of 0xbok

fyi: https://github.com/foundry-rs/foundry/issues/3463. Not happening on main branch.

We dont check that the clone is related to the proto

Iโ€™m imagining the user flow would be like they first call `getMinAmountForCloneTransfer` and then call duplicate. So itโ€™s a better UX to have the same parameters for them?

**Describe the improvement you're thinking about** `onlyExistingGroup(groupId) onlyGroupAdmin(groupId)` checks that a group exists and the `msg.sender` is the group admin. Just checking for `onlyGroupAdmin(groupId)` is sufficient for this case as...

refactoring :recycle:
audit-v4

**Describe the improvement you're thinking about** [`validateProof()`](https://github.com/semaphore-protocol/semaphore/blob/v4.0.0-beta.1/packages/contracts/contracts/Semaphore.sol#L106C25-L106C51) checks for existing group which then calls [`verifyProof()`](https://github.com/semaphore-protocol/semaphore/blob/v4.0.0-beta.1/packages/contracts/contracts/Semaphore.sol#L137) which agains ensures group's existence. Remove `onlyExistingGroup(groupId)` modifier on [`validateProof()`](https://github.com/semaphore-protocol/semaphore/blob/v4.0.0-beta.1/packages/contracts/contracts/Semaphore.sol#L106C25-L106C51) **Additional context** PSE audit.

refactoring :recycle:
audit-v4

so `l` is of 251 bits (as used in [eip-2494](https://eips.ethereum.org/EIPS/eip-2494#base-point)) (`r` in geometry's report; to be linked). The right shift by 3 bits make the private key outside this range....

bug ๐Ÿ›
semaphore-v4-audit

Noble is a set of libraries providing "Audited & minimal JS implementation" of several cryptographic primitives implemented in zk-kit. Some links: https://github.com/paulmillr/noble-curves, https://github.com/paulmillr/noble-hashes, https://paulmillr.com/noble/ It can be used to define...

refactoring :recycle:
dependencies :package:

In Solidity version of LeanIMT, existing leaves cannot be inserted or updated, but TS version allows it. https://github.com/privacy-scaling-explorations/zk-kit/blob/950dc5bd5f8f53069c12b56581ed63faa5382515/packages/imt/src/lean-imt/lean-imt.ts#L116 https://github.com/privacy-scaling-explorations/zk-kit/blob/950dc5bd5f8f53069c12b56581ed63faa5382515/packages/imt/src/lean-imt/lean-imt.ts#L156 https://github.com/privacy-scaling-explorations/zk-kit/blob/950dc5bd5f8f53069c12b56581ed63faa5382515/packages/imt/src/lean-imt/lean-imt.ts#L199 https://github.com/privacy-scaling-explorations/zk-kit/blob/950dc5bd5f8f53069c12b56581ed63faa5382515/packages/imt.sol/contracts/internal/InternalLeanIMT.sol#L40-L46

bug ๐Ÿ›
semaphore-v4-audit