Cantina audit/pr 526 snapshot#545
Conversation
* Initial commit: wrapped token tests * fix imports
* initial commit * touch ups, rm shadowed vars * bring in wrapped change * format * nit change to pure * external, pure nit * reset getCode paths * relative imports * fix isolated mint_clear_revert test * use relative paths for mock allowlist * use BaseAllowList not BaseAllowlist * change allowList to allowlist * move to permissioned tests folder * all tests working * merging new changes from permissioned-pools * touch ups, rm shadowed vars * bring in wrapped change * format * nit change to pure * external, pure nit * reset getCode paths * relative imports * fix isolated mint_clear_revert test * use relative paths for mock allowlist * use BaseAllowList not BaseAllowlist * change allowList to allowlist * move to permissioned tests folder * all tests working * replace mockAllowlist with permissionedPoolsBase * rm mock allowlist * run linter * rm unused * change casing on const * reorganize vars * add most of the tests mentioned in comments * all paths covered * seperate hooks contract instead of delegate router * minor cleanup * use all combinations of permissioned and normal in liq tests * spacing nit * nit, edit note * add clarifying comment to wrapped factory balance check * remove circular dependency from permissioned pools implementation (#482) * initial commit * rm fallback from permissioned v4 router, leave receive * fix github ci * use currency instead of ierc20 in some tests * add comment to hooks on why verifyAllowlist is sufficient * inherit from BaseHook contract * remove unused import, generate gas snapshot --------- Co-authored-by: gretzke <daniel@gretzke.de>
* Initial commit: forced transfers by admins * fix merge conflict * remove event
* Initial commit: forced transfers by admins * add granular allow list and multiple hooks and fix revert tests * add coverage for receive * permissioned v4 router test spacing nits * change allowed hook check * allowedHooks on pposm * nit * add inheritdoc to transferFrom * fix merge conflict * make setAllowedHook external * fix test resulting for resolving conflict * simplify checkAllowedHooks * fix snapshot --------- Co-authored-by: gretzke <daniel@gretzke.de>
* initial commit * linted * make dispatch internal * changed revert for command not implemented * add underscore to internal/prive functions on permissioned v4 router * applied fmt to permissioned v4 router
* Add check whether swapping is enabled * Gas snapshot * Add natspec to event
… of PermissionedV4Router + PermissionedPositionManager
…of permission-flags in both payer modes of PermissionedV4Router + PermissionedPositionManager
… CONTRACT_BALANCE
…ositionManager (#523) * fix(permissioned-hooks): enforce permission-flags in both payer modes of PermissionedV4Router + PermissionedPositionManager * tests(permissioned-hooks): adding unit tests to validate enforcement of permission-flags in both payer modes of PermissionedV4Router + PermissionedPositionManager * update gas snapshot for PermissionedV4Router * fixing snapshots and unused variable nit * fixing snapshots one more time * nit: updating comments in permposm and permv4router
…ction (#524) * fix(permissioned-hooks): enforce permission-flags in both payer modes of PermissionedV4Router + PermissionedPositionManager * tests(permissioned-hooks): adding unit tests to validate enforcement of permission-flags in both payer modes of PermissionedV4Router + PermissionedPositionManager * update gas snapshot for PermissionedV4Router * fixing snapshots and unused variable nit * fixing snapshots one more time * fix: validate mint recipient has LIQUIDITY_ALLOWED in PermissionedPositionManager
…use underlying permissionedToken balances (#525) * fix(permissioned-hooks): enforce permission-flags in both payer modes of PermissionedV4Router + PermissionedPositionManager * tests(permissioned-hooks): adding unit tests to validate enforcement of permission-flags in both payer modes of PermissionedV4Router + PermissionedPositionManager * update gas snapshot for PermissionedV4Router * fixing snapshots and unused variable nit * fixing snapshots one more time * fix: validate mint recipient has LIQUIDITY_ALLOWED in PermissionedPositionManager * fix(permissioned-position-manager): add _mapSettleAmount override for CONTRACT_BALANCE
…lops/eco-194-sc-m-03-positions-can-be-opened-before-adapter-verification
…ore-adapter-verification' into socksnflops/eco-206-strip-permissioned-v4-router
…trip-permissioned-v4-router
|
Security Review permissionedPools (two issues) [H-01] PermissionedPositionManager._increase() not overridden — isAllowedHooks check bypassed for existing positions [H-02] createPermissionsAdapter is permissionless; verifyPermissionsAdapter passes on 1 wei factory.createPermissionsAdapter(USDC, attacker, maliciousChecker) Fix: Gate createPermissionsAdapter to the token contract's owner. Replace the balance check in verifyPermissionsAdapter with a signature from the token's owner. Happy to provide a Foundry PoC if useful for the Cantina engagement. |
Reference Snapshot for Cantina Audit - Do Not Merge