uups-checker 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitmodules +6 -0
- package/AIFI_AUDIT.md +220 -0
- package/ALL_AUDITS_SUMMARY.md +366 -0
- package/ALPHA_PROXY_CRITICAL_FINDING.md +136 -0
- package/ALPHA_PROXY_FINAL_ANALYSIS.md +213 -0
- package/ALPHA_PROXY_FINAL_VERDICT.md +233 -0
- package/ALPHA_PROXY_SELFDESTRUCT_EXPLOIT.md +161 -0
- package/ARIA-foundry-test.txt +9 -0
- package/ARIA-mythril-analysis.txt +20 -0
- package/ARIA-slither-analysis.txt +38 -0
- package/ARIA_AI_SECURITY_AUDIT.md +290 -0
- package/ARIA_VERIFIED_AUDIT.md +259 -0
- package/ARIA_VERIFIED_slither.txt +76 -0
- package/ARIVA_source.txt +1 -0
- package/ARK_AUDIT.md +349 -0
- package/BANANA_AUDIT.md +365 -0
- package/BAS_AUDIT.md +451 -0
- package/BAS_TOKEN_AUDIT.md +235 -0
- package/BCE_EXPLOIT_ANALYSIS.md +165 -0
- package/BEEFY_BNB_CHAIN_ANALYSIS.md +488 -0
- package/BEEFY_MONAD_ANALYSIS.md +239 -0
- package/BEEFY_STAKING_ANALYSIS.md +136 -0
- package/BEEFY_XVS_WBNB_ACTUAL_FINDINGS.md +223 -0
- package/BEEFY_XVS_WBNB_CRITICAL_FINDINGS.md +269 -0
- package/BLOCKSEC_ATTACK_KNOWLEDGE_BASE.md +771 -0
- package/BRISE_ANALYSIS.txt +31 -0
- package/BRISE_BSC_DAPPS.txt +68 -0
- package/BRISE_EXPLOITS_FOUND.md +98 -0
- package/BRISE_REAL_EXPLOITS.md +115 -0
- package/BRISE_WHITEHAT_REPORT.md +162 -0
- package/BRISEstake_Analysis.txt +95 -0
- package/BSCSLOCKTOKEN_CRITICAL_FINDING.md +240 -0
- package/BSW_BISWAP_SECURITY_AUDIT.md +330 -0
- package/BTCST_FINAL_VERDICT.md +319 -0
- package/BTCST_MINING_REBASE_ANALYSIS.md +229 -0
- package/BTCST_ROUNDING_DEEP_DIVE.md +293 -0
- package/BTCST_ROUNDING_FINAL_VERDICT.md +9 -0
- package/BTCST_SECURITY_ANALYSIS.md +391 -0
- package/BTR_AUDIT.md +210 -0
- package/BeamBridge-analysis.md +226 -0
- package/BeamToken-analysis.md +201 -0
- package/BitgertSwap_Investigation.txt +107 -0
- package/CEEK_STAKING_ANALYSIS.md +0 -0
- package/CHAINBASE_AUDIT.md +422 -0
- package/COMPLETE_AUDIT_SUMMARY.md +342 -0
- package/CORRECTED_ANALYSIS.txt +115 -0
- package/DBXEN_COMPARISON_SUMMARY.md +232 -0
- package/DBXEN_EXPLOIT_ANALYSIS.md +530 -0
- package/DOPFairLaunch_raw.json +29 -0
- package/DOPFairLaunch_source.txt +0 -0
- package/DOP_BRIDGE_FINAL_ANALYSIS.txt +86 -0
- package/DOP_BUSD_LP_ANALYSIS.txt +44 -0
- package/DOP_FAIRLAUNCH_ANALYSIS.txt +61 -0
- package/DOP_FAIRLAUNCH_FINAL_VERDICT.txt +113 -0
- package/DOP_STAKING_CONTRACT_ANALYSIS.txt +67 -0
- package/DSYNC_ECOSYSTEM_ANALYSIS.md +221 -0
- package/DSyncStaking-exploit-analysis.md +153 -0
- package/DSyncVault-analysis.md +120 -0
- package/DUSD_PROXY_AUDIT.md +407 -0
- package/DXSALE_LOCK_AUDIT.md +0 -0
- package/DXSaleLock_bytecode.txt +1 -0
- package/ECHIDNA_QUICK_START.md +101 -0
- package/ELEPHANT_ECOSYSTEM_AUDIT_PLAN.md +159 -0
- package/ELEPHANT_ECOSYSTEM_COMPREHENSIVE_AUDIT.md +427 -0
- package/ELEPHANT_SECURITY_ANALYSIS.md +209 -0
- package/ELEPHANT_VULNERABILITIES_EXPLAINED.md +455 -0
- package/EXPLOIT_FIX.md +300 -0
- package/EXPLOIT_INSTRUCTIONS.md +273 -0
- package/EXPLOIT_SUMMARY.md +285 -0
- package/EXPLOIT_SUMMARY.txt +175 -0
- package/FALCON_FINANCE_AUDIT.md +258 -0
- package/FANDOM_AUDIT.md +359 -0
- package/FEE_ON_TRANSFER_ANALYSIS.md +228 -0
- package/FINAL_AUDIT_REPORT.md +0 -0
- package/FOLIO_PROXY_AUDIT.md +299 -0
- package/FOT_EXPLOIT_RESULTS.txt +110 -0
- package/FOT_TOKENS_AUDITED.md +103 -0
- package/HEGIC-mythril-analysis.txt +39 -0
- package/HEGIC_COMPLETE_ANALYSIS.md +343 -0
- package/HOTCROSS_SWAP_EXPLOIT_ANALYSIS.md +123 -0
- package/ICECREAMSWAP_EXPLOITS.md +259 -0
- package/IMMUNEFI_REPORT.md +314 -0
- package/KCCPAD_EXPLOIT_GUIDE.md +285 -0
- package/KEL_CEL_EXPLOIT_ANALYSIS.md +0 -0
- package/KOGE_AUDIT.md +328 -0
- package/LENDFLARE_ANALYSIS.md +239 -0
- package/LENDFLARE_ECHIDNA_GUIDE.md +356 -0
- package/LENDFLARE_EXPLOIT_INSTRUCTIONS.md +297 -0
- package/LENDFLARE_EXPLOIT_SUMMARY.md +292 -0
- package/LENDFLARE_FLASHLOAN_GUIDE.md +383 -0
- package/LENDFLARE_FUZZING_RESULTS.md +252 -0
- package/LENDFLARE_HONEYPOT_BYPASS_ANALYSIS.md +420 -0
- package/LENDFLARE_MANUAL_FUZZING.md +324 -0
- package/LENDFLARE_MYTHRIL_ANALYSIS.md +339 -0
- package/LENDFLARE_V3_BYPASS.md +296 -0
- package/LFTDECOMPILE.txt +14478 -0
- package/LFT_ACCOUNTING_ANALYSIS.md +0 -0
- package/LFT_ACCOUNTING_BUG_ANALYSIS.md +426 -0
- package/LFT_BACKDOOR_DEEP_DIVE.md +0 -0
- package/LFT_CRITICAL_EXPLOIT_CONFIRMED.md +428 -0
- package/LFT_EXPLOIT_VISUAL.md +253 -0
- package/LFT_QUICK_SUMMARY.md +124 -0
- package/LFT_REVERSE_EXPLOIT_ANALYSIS.md +521 -0
- package/MGO_AUDIT_REPORT.md +420 -0
- package/MYTHRIL_FINAL_REPORT.md +306 -0
- package/MYTHRIL_SLITHER_SUMMARY.md +244 -0
- package/NETX_MIGRATION_AUDIT.md +0 -0
- package/NPM_PUBLISH_GUIDE.md +0 -0
- package/NRV_CRITICAL_EXPLOIT.txt +143 -0
- package/NetX_Analysis.txt +76 -0
- package/NetX_Migration_bytecode.txt +1 -0
- package/NetX_Migration_source.txt +0 -0
- package/NetX_Token_source.txt +0 -0
- package/NetxWhitehatRescue +22 -0
- package/OILER_ATTACK_VISUAL.md +351 -0
- package/OILER_BLOCKSEC_TEST_RESULTS.md +421 -0
- package/OILER_DEEP_ANALYSIS.md +212 -0
- package/OILER_FINAL_EXPLOIT_REPORT.md +241 -0
- package/OILER_FINAL_VERDICT.md +339 -0
- package/OILER_REENTRANCY_EXPLAINED.md +638 -0
- package/OILER_REENTRANCY_FINAL_SUMMARY.md +391 -0
- package/OILER_REENTRANCY_REALITY_CHECK.md +393 -0
- package/OILER_REENTRANCY_STEP_BY_STEP.md +597 -0
- package/OILER_STAKING_MAINNET_ANALYSIS.md +366 -0
- package/OILER_STAKING_SECURITY_ANALYSIS.md +409 -0
- package/PANCAKESWAP_UNDERFLOW_HUNTING.md +317 -0
- package/POLS_MULTICHAIN_AUDIT.md +0 -0
- package/POSI_STAKING_AUDIT.md +0 -0
- package/PROXY2_SECURITY_ANALYSIS.md +0 -0
- package/Proxy2TACS +29748 -0
- package/QUICK_START.md +240 -0
- package/RAMP_SECURITY_ANALYSIS.md +0 -0
- package/README.md +238 -0
- package/REAUDIT_MASTER_LIST.txt +15 -0
- package/RING_analysis.txt +212 -0
- package/RPC +4 -0
- package/RULES.txt +20 -0
- package/SIREN_AUDIT.md +186 -0
- package/SYNC_EXPLOIT_README.md +0 -0
- package/SYNC_TOKEN_EXPLOIT_REPORT.md +224 -0
- package/TLM_raw.html +0 -0
- package/TLM_raw.txt +0 -0
- package/TLM_response.json +1 -0
- package/TRADOOR_AUDIT.md +253 -0
- package/TRUNK_AUDIT.md +285 -0
- package/UNIBASE_AUDIT.md +241 -0
- package/UNLOCK_ANALYSIS.md +0 -0
- package/UNLOCK_EXPLOIT.md +49 -0
- package/UNLOCK_EXPLOIT_ANALYSIS.md +0 -0
- package/UPS +232 -0
- package/UUPSCHECKER +208 -0
- package/VAULT_PROXY_AUDIT.md +457 -0
- package/VAULT_PROXY_FINAL_VERDICT.md +0 -0
- package/VERIFIED_EXPLOITS_FINAL.txt +146 -0
- package/WKEYDAO2_AUDIT.md +245 -0
- package/WSG_AUDIT.md +0 -0
- package/XFI_DEEP_ANALYSIS.md +327 -0
- package/YOOSHI_EXPLOIT_GUIDE.md +119 -0
- package/YSDAO_EXPLOIT_GUIDE.md +0 -0
- package/agent-4-bundle.md +22490 -0
- package/alpha-proxy-echidna.txt +1 -0
- package/alpha-proxy-fuzz-results.txt +81 -0
- package/alpha-proxy-mythril.txt +2 -0
- package/analyze-btcst-farm.js +54 -0
- package/analyze-dxsale-lock.js +75 -0
- package/analyze-elephant.js +69 -0
- package/analyze-fara-rewards.js +109 -0
- package/analyze-fara-storage.js +83 -0
- package/analyze-lft-transaction.js +158 -0
- package/analyze-lock-bytecode.js +59 -0
- package/analyze-shegic.js +0 -0
- package/analyze-staking-abi.js +0 -0
- package/analyze-sxp.js +57 -0
- package/analyze-tlm.js +76 -0
- package/analyze-trumpet.js +98 -0
- package/analyze-unlimited-nft.js +108 -0
- package/analyze_elephant.sh +27 -0
- package/analyze_vault.sh +32 -0
- package/aria-bytecode.txt +1 -0
- package/aria_response.json +1 -0
- package/ark_temp/README.md +66 -0
- package/ark_temp/lib/forge-std/.gitattributes +1 -0
- package/ark_temp/lib/forge-std/.github/CODEOWNERS +1 -0
- package/ark_temp/lib/forge-std/.github/dependabot.yml +6 -0
- package/ark_temp/lib/forge-std/.github/workflows/ci.yml +125 -0
- package/ark_temp/lib/forge-std/.github/workflows/sync.yml +36 -0
- package/ark_temp/lib/forge-std/CONTRIBUTING.md +193 -0
- package/ark_temp/lib/forge-std/LICENSE-APACHE +203 -0
- package/ark_temp/lib/forge-std/LICENSE-MIT +25 -0
- package/ark_temp/lib/forge-std/README.md +314 -0
- package/ark_temp/lib/forge-std/RELEASE_CHECKLIST.md +12 -0
- package/ark_temp/lib/forge-std/package.json +16 -0
- package/ark_temp/lib/forge-std/scripts/vm.py +636 -0
- package/audits/AiFi-security-audit-20260326.md +499 -0
- package/audits/BasedAI-Brains-security-audit-20260324.md +651 -0
- package/audits/BinanceAlphaWallet-pashov-ai-audit-report-20260324-170000.md +362 -0
- package/audits/DGToken-security-audit-20260324.md +376 -0
- package/audits/DSyncStaking-audit-part1.md +161 -0
- package/audits/DSyncStaking-security-audit-20260324.md +547 -0
- package/audits/DecompiledERC20-security-audit-20260325.md +397 -0
- package/audits/DegenVC-security-audit-20260324.md +585 -0
- package/audits/DelreyInu-security-audit-20260324.md +463 -0
- package/audits/DestraNetwork-security-audit-20260324.md +705 -0
- package/audits/DomiToken-security-audit-20260324.md +514 -0
- package/audits/LendFlareToken-security-audit-20260325.md +197 -0
- package/audits/LockReleaseTokenPool-security-audit-20260324.md +482 -0
- package/audits/MOG-pashov-ai-audit-report-20260324-164900.md +229 -0
- package/audits/PAALAI-security-audit-20260324.md +475 -0
- package/audits/PAR-security-audit-20260325.md +311 -0
- package/audits/PepeCoinStaking-security-audit-20260324.md +358 -0
- package/audits/StakingPool-security-audit-20260324.md +517 -0
- package/audits/SyncToken-security-audit-20260324.md +778 -0
- package/audits/UndeadToken-decompiled-security-audit-20260324.md +485 -0
- package/audits/UnknownToken-decompiled-security-audit-20260324.md +647 -0
- package/audits/XFIStaking-security-audit-20260324.md +682 -0
- package/audits/Xfinance-security-audit-20260324.md +463 -0
- package/audits/basedAIFarm-security-audit-20260324.md +330 -0
- package/audits/pepeCoin-security-audit-20260324.md +462 -0
- package/bin/ups +232 -0
- package/binance-wallet-exploit/.env.example +2 -0
- package/binance-wallet-exploit/EXECUTIVE_SUMMARY.md +272 -0
- package/binance-wallet-exploit/EXPLOIT_SUMMARY.md +104 -0
- package/binance-wallet-exploit/FINAL_ANALYSIS.md +326 -0
- package/binance-wallet-exploit/FLASHLOAN_ATTACK.md +292 -0
- package/binance-wallet-exploit/HONEYPOT_REPORT.md +526 -0
- package/binance-wallet-exploit/INVESTIGATION_COMPLETE.md +362 -0
- package/binance-wallet-exploit/LENDFLARE_EXPLOIT.md +219 -0
- package/binance-wallet-exploit/LENDFLARE_FINAL_ATTACK.md +307 -0
- package/binance-wallet-exploit/LENDFLARE_REAL_EXPLOIT.md +286 -0
- package/binance-wallet-exploit/LENDFLARE_RUGPULL.md +269 -0
- package/binance-wallet-exploit/LFT_ANALYSIS.md +206 -0
- package/binance-wallet-exploit/QUICK_START.md +75 -0
- package/binance-wallet-exploit/README.md +195 -0
- package/binance-wallet-exploit/REAL_TX_EXPLOIT_ANALYSIS.md +271 -0
- package/binance-wallet-exploit/REMIX_INSTRUCTIONS.md +223 -0
- package/binance-wallet-exploit/TEST_RESULTS.md +203 -0
- package/binance-wallet-exploit/cache/solidity-files-cache.json +1 -0
- package/binance-wallet-exploit/cache/test-failures +1 -0
- package/binance-wallet-exploit/lib/forge-std/.gitattributes +1 -0
- package/binance-wallet-exploit/lib/forge-std/.github/CODEOWNERS +1 -0
- package/binance-wallet-exploit/lib/forge-std/.github/dependabot.yml +6 -0
- package/binance-wallet-exploit/lib/forge-std/.github/workflows/ci.yml +125 -0
- package/binance-wallet-exploit/lib/forge-std/.github/workflows/sync.yml +36 -0
- package/binance-wallet-exploit/lib/forge-std/CONTRIBUTING.md +193 -0
- package/binance-wallet-exploit/lib/forge-std/LICENSE-APACHE +203 -0
- package/binance-wallet-exploit/lib/forge-std/LICENSE-MIT +25 -0
- package/binance-wallet-exploit/lib/forge-std/README.md +314 -0
- package/binance-wallet-exploit/lib/forge-std/RELEASE_CHECKLIST.md +12 -0
- package/binance-wallet-exploit/lib/forge-std/package.json +16 -0
- package/binance-wallet-exploit/lib/forge-std/scripts/vm.py +636 -0
- package/binance-wallet-exploit/out/build-info/1e9aa7e86cf56962.json +1 -0
- package/binance-wallet-exploit/out/build-info/6f56f10e9d7b56eb.json +1 -0
- package/binance-wallet-exploit/out/build-info/7edba961ff697a24.json +1 -0
- package/binance-wallet-exploit/out/build-info/8c27fe3efea2f2e7.json +1 -0
- package/binance-wallet-exploit/out/build-info/978b680daffec63a.json +1 -0
- package/binance-wallet-exploit/out/build-info/9806b900b5672d0c.json +1 -0
- package/binance-wallet-exploit/out/build-info/b4b9ff36e9b3fc27.json +1 -0
- package/binance-wallet-exploit/out/build-info/b6f4df9ae05c0812.json +1 -0
- package/binance-wallet-exploit/out/build-info/c88dbc86551f7b5c.json +1 -0
- package/binance-wallet-exploit/out/build-info/e9657504010623db.json +1 -0
- package/cache/fuzz/failures/ARIAVerifiedFuzzTest/testFuzz_ApprovalRaceCondition +1 -0
- package/cache/fuzz/failures/HotCrossSwapFuzzTest/testFuzz_DirectTransferExploit +1 -0
- package/cache/fuzz/failures/HotCrossSwapFuzzTest/testFuzz_LargeSwapDrain +1 -0
- package/cache/fuzz/failures/LendFlareFuzz/testFuzz_ApprovalExploit +1 -0
- package/cache/fuzz/failures/LendFlareFuzz/testFuzz_BalanceManipulation +1 -0
- package/cache/fuzz/failures/LendFlareFuzz/testFuzz_RateManipulation +1 -0
- package/cache/fuzz/failures/LendFlareFuzz/testFuzz_StorageManipulation +1 -0
- package/cache/fuzz/failures/PARFuzzTest/testFuzz_OverflowTransfer +1 -0
- package/cache/fuzz/failures/PARFuzzTest/testFuzz_Transfer +1 -0
- package/cache/fuzz/failures/XFIDeepFuzz/testFuzz_FrontrunAddfunds +1 -0
- package/cache/fuzz/failures/XFIDeepFuzz/testFuzz_RewardOverflow +1 -0
- package/cache/fuzz/failures/XFIDeepFuzz/testFuzz_RoundingExploit +1 -0
- package/cache/fuzz/failures/XFIDeepFuzz/testFuzz_WithdrawLimit +1 -0
- package/cache/solidity-files-cache.json +1 -0
- package/cache/test-failures +1 -0
- package/calculate-elephant-flashloan.js +195 -0
- package/check-address-approval.js +112 -0
- package/check-alpha-proxy.js +42 -0
- package/check-arbitrage.js +155 -0
- package/check-aria-token.js +47 -0
- package/check-ark.sh +20 -0
- package/check-btcst-mining.js +75 -0
- package/check-btcst-pools.js +163 -0
- package/check-btcst.js +88 -0
- package/check-caller.js +26 -0
- package/check-ceek-lp.js +73 -0
- package/check-ceek.js +47 -0
- package/check-dxsale-address.js +35 -0
- package/check-fara-exploit-timing.js +56 -0
- package/check-fara-real-exploit.js +73 -0
- package/check-flashloan-limits.js +129 -0
- package/check-kel-cel-pool.js +91 -0
- package/check-lax-staking.js +41 -0
- package/check-lendflare.js +165 -0
- package/check-lft-accounting.js +109 -0
- package/check-lft-roles.js +165 -0
- package/check-lock-time.js +47 -0
- package/check-min-stake.js +73 -0
- package/check-mystery-contract.js +52 -0
- package/check-next-token.js +50 -0
- package/check-nora-lock.js +67 -0
- package/check-oiler-approvals.js +116 -0
- package/check-oiler-proxy.js +73 -0
- package/check-oiler-staking.js +117 -0
- package/check-proxy-simple.js +71 -0
- package/check-recent-stakes.js +54 -0
- package/check-shegic-holdings.js +67 -0
- package/check-snowcrash-ecosystem.js +83 -0
- package/check-sync-lp.js +97 -0
- package/check-sync-stake.js +42 -0
- package/check-tlm.js +37 -0
- package/check-token-pools.js +146 -0
- package/check-trunk-depeg.js +181 -0
- package/check-tusd-decimals.js +58 -0
- package/check-user-storage-deep.js +81 -0
- package/check-welephant-pools.js +130 -0
- package/check-xfi-pool.js +75 -0
- package/check-zypher.js +32 -0
- package/check_proxy.sh +36 -0
- package/compare-tlm-chains.js +90 -0
- package/contract_0x05f2.html +6025 -0
- package/contract_0x3720.html +6361 -0
- package/contract_0x928e.html +5606 -0
- package/contract_0xc42d.html +5304 -0
- package/contract_page.html +5789 -0
- package/decode-stake-tx.js +50 -0
- package/deep-analyze-lock.js +82 -0
- package/dune_uups_proxy_query.sql +42 -0
- package/dune_uups_vulnerable_query.sql +0 -0
- package/echidna/alpha-proxy.yaml +14 -0
- package/echidna/elephant.yaml +7 -0
- package/echidna/lendflare.yaml +42 -0
- package/echidna.config.yaml +12 -0
- package/elephant_raw.json +1 -0
- package/eps_raw.json +1 -0
- package/exploit/.github/workflows/test.yml +38 -0
- package/exploit/.gitmodules +3 -0
- package/exploit/README.md +66 -0
- package/exploit/foundry.lock +8 -0
- package/exploit/lib/forge-std/.gitattributes +1 -0
- package/exploit/lib/forge-std/.github/CODEOWNERS +1 -0
- package/exploit/lib/forge-std/.github/dependabot.yml +6 -0
- package/exploit/lib/forge-std/.github/workflows/ci.yml +125 -0
- package/exploit/lib/forge-std/.github/workflows/sync.yml +36 -0
- package/exploit/lib/forge-std/CONTRIBUTING.md +193 -0
- package/exploit/lib/forge-std/LICENSE-APACHE +203 -0
- package/exploit/lib/forge-std/LICENSE-MIT +25 -0
- package/exploit/lib/forge-std/README.md +314 -0
- package/exploit/lib/forge-std/RELEASE_CHECKLIST.md +12 -0
- package/exploit/lib/forge-std/package.json +16 -0
- package/exploit/lib/forge-std/scripts/vm.py +636 -0
- package/exploit_analysis.txt +51 -0
- package/extract_contract.py +21 -0
- package/extract_elephant_contracts.py +24 -0
- package/fara-staking-bytecode.txt +1 -0
- package/fara-staking-raw.txt +1 -0
- package/fetch-aria.js +46 -0
- package/fetch-contract.js +50 -0
- package/fetch-shegic-source.js +86 -0
- package/fetch-snowcrash.js +44 -0
- package/fetch-staking-source.js +53 -0
- package/fetch-tlm.js +60 -0
- package/fetch_elephant_source.py +32 -0
- package/find-ceek-staking.js +21 -0
- package/find-exploit-tx.js +88 -0
- package/find-oiler-holders.js +100 -0
- package/find-tlm-holder.js +36 -0
- package/find-vulnerable-fund.js +94 -0
- package/foundry.lock +8 -0
- package/fuzz-all.sh +53 -0
- package/get-aria-contract.py +40 -0
- package/get-lft-holders.js +89 -0
- package/get-tlm-source.sh +8 -0
- package/harvest_txs.json +1 -0
- package/lft-bytecode-raw.txt +1 -0
- package/lft-bytecode.json +1 -0
- package/lft-impl.bin +1 -0
- package/lft-implementation-bytecode.txt +1 -0
- package/lib/forge-std/.gitattributes +1 -0
- package/lib/forge-std/.github/CODEOWNERS +1 -0
- package/lib/forge-std/.github/dependabot.yml +6 -0
- package/lib/forge-std/.github/workflows/ci.yml +125 -0
- package/lib/forge-std/.github/workflows/sync.yml +36 -0
- package/lib/forge-std/CONTRIBUTING.md +193 -0
- package/lib/forge-std/LICENSE-APACHE +203 -0
- package/lib/forge-std/LICENSE-MIT +25 -0
- package/lib/forge-std/README.md +314 -0
- package/lib/forge-std/RELEASE_CHECKLIST.md +12 -0
- package/lib/forge-std/package.json +16 -0
- package/lib/forge-std/scripts/vm.py +636 -0
- package/lib/openzeppelin-contracts/.changeset/config.json +12 -0
- package/lib/openzeppelin-contracts/.codecov.yml +12 -0
- package/lib/openzeppelin-contracts/.editorconfig +21 -0
- package/lib/openzeppelin-contracts/.eslintrc +20 -0
- package/lib/openzeppelin-contracts/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
- package/lib/openzeppelin-contracts/.github/ISSUE_TEMPLATE/config.yml +4 -0
- package/lib/openzeppelin-contracts/.github/ISSUE_TEMPLATE/feature_request.md +14 -0
- package/lib/openzeppelin-contracts/.github/PULL_REQUEST_TEMPLATE.md +20 -0
- package/lib/openzeppelin-contracts/.github/actions/gas-compare/action.yml +49 -0
- package/lib/openzeppelin-contracts/.github/actions/setup/action.yml +21 -0
- package/lib/openzeppelin-contracts/.github/actions/storage-layout/action.yml +55 -0
- package/lib/openzeppelin-contracts/.github/workflows/actionlint.yml +18 -0
- package/lib/openzeppelin-contracts/.github/workflows/changeset.yml +28 -0
- package/lib/openzeppelin-contracts/.github/workflows/checks.yml +118 -0
- package/lib/openzeppelin-contracts/.github/workflows/docs.yml +19 -0
- package/lib/openzeppelin-contracts/.github/workflows/formal-verification.yml +68 -0
- package/lib/openzeppelin-contracts/.github/workflows/release-cycle.yml +214 -0
- package/lib/openzeppelin-contracts/.github/workflows/upgradeable.yml +34 -0
- package/lib/openzeppelin-contracts/.gitmodules +7 -0
- package/lib/openzeppelin-contracts/.mocharc.js +4 -0
- package/lib/openzeppelin-contracts/.prettierrc +15 -0
- package/lib/openzeppelin-contracts/.solcover.js +13 -0
- package/lib/openzeppelin-contracts/CHANGELOG.md +972 -0
- package/lib/openzeppelin-contracts/CODE_OF_CONDUCT.md +73 -0
- package/lib/openzeppelin-contracts/CONTRIBUTING.md +36 -0
- package/lib/openzeppelin-contracts/GUIDELINES.md +148 -0
- package/lib/openzeppelin-contracts/LICENSE +22 -0
- package/lib/openzeppelin-contracts/README.md +107 -0
- package/lib/openzeppelin-contracts/RELEASING.md +45 -0
- package/lib/openzeppelin-contracts/SECURITY.md +42 -0
- package/lib/openzeppelin-contracts/audits/2017-03.md +292 -0
- package/lib/openzeppelin-contracts/audits/2018-10.pdf +0 -0
- package/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf +0 -0
- package/lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf +0 -0
- package/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf +0 -0
- package/lib/openzeppelin-contracts/audits/2023-10-v5.0.pdf +0 -0
- package/lib/openzeppelin-contracts/audits/README.md +17 -0
- package/lib/openzeppelin-contracts/certora/Makefile +54 -0
- package/lib/openzeppelin-contracts/certora/README.md +60 -0
- package/lib/openzeppelin-contracts/certora/diff/access_manager_AccessManager.sol.patch +97 -0
- package/lib/openzeppelin-contracts/certora/reports/2021-10.pdf +0 -0
- package/lib/openzeppelin-contracts/certora/reports/2022-03.pdf +0 -0
- package/lib/openzeppelin-contracts/certora/reports/2022-05.pdf +0 -0
- package/lib/openzeppelin-contracts/certora/run.js +160 -0
- package/lib/openzeppelin-contracts/certora/specs/AccessControl.spec +119 -0
- package/lib/openzeppelin-contracts/certora/specs/AccessControlDefaultAdminRules.spec +464 -0
- package/lib/openzeppelin-contracts/certora/specs/DoubleEndedQueue.spec +300 -0
- package/lib/openzeppelin-contracts/certora/specs/ERC20.spec +352 -0
- package/lib/openzeppelin-contracts/certora/specs/ERC20FlashMint.spec +55 -0
- package/lib/openzeppelin-contracts/certora/specs/ERC20Wrapper.spec +198 -0
- package/lib/openzeppelin-contracts/certora/specs/ERC721.spec +679 -0
- package/lib/openzeppelin-contracts/certora/specs/EnumerableMap.spec +333 -0
- package/lib/openzeppelin-contracts/certora/specs/EnumerableSet.spec +246 -0
- package/lib/openzeppelin-contracts/certora/specs/Initializable.spec +165 -0
- package/lib/openzeppelin-contracts/certora/specs/Ownable.spec +77 -0
- package/lib/openzeppelin-contracts/certora/specs/Ownable2Step.spec +108 -0
- package/lib/openzeppelin-contracts/certora/specs/Pausable.spec +96 -0
- package/lib/openzeppelin-contracts/certora/specs/TimelockController.spec +274 -0
- package/lib/openzeppelin-contracts/certora/specs/helpers/helpers.spec +7 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IAccessControl.spec +8 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IAccessControlDefaultAdminRules.spec +36 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IERC20.spec +11 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IERC2612.spec +5 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IERC3156FlashBorrower.spec +3 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IERC3156FlashLender.spec +5 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IERC5313.spec +3 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IERC721.spec +17 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IERC721Receiver.spec +3 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IOwnable.spec +5 -0
- package/lib/openzeppelin-contracts/certora/specs/methods/IOwnable2Step.spec +7 -0
- package/lib/openzeppelin-contracts/certora/specs.json +86 -0
- package/lib/openzeppelin-contracts/contracts/access/README.adoc +43 -0
- package/lib/openzeppelin-contracts/contracts/finance/README.adoc +14 -0
- package/lib/openzeppelin-contracts/contracts/governance/README.adoc +167 -0
- package/lib/openzeppelin-contracts/contracts/interfaces/README.adoc +82 -0
- package/lib/openzeppelin-contracts/contracts/metatx/README.adoc +12 -0
- package/lib/openzeppelin-contracts/contracts/package.json +32 -0
- package/lib/openzeppelin-contracts/contracts/proxy/README.adoc +87 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC1155/README.adoc +41 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC20/README.adoc +67 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/README.adoc +67 -0
- package/lib/openzeppelin-contracts/contracts/token/common/README.adoc +10 -0
- package/lib/openzeppelin-contracts/contracts/utils/README.adoc +88 -0
- package/lib/openzeppelin-contracts/contracts/vendor/compound/LICENSE +11 -0
- package/lib/openzeppelin-contracts/docs/README.md +16 -0
- package/lib/openzeppelin-contracts/docs/antora.yml +7 -0
- package/lib/openzeppelin-contracts/docs/config.js +21 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3a.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3b.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-6.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-deposit.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-mint.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-linear.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglog.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglogext.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-exec.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-vote.png +0 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/nav.adoc +23 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/access-control.adoc +204 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/backwards-compatibility.adoc +48 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/crowdsales.adoc +11 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/drafts.adoc +19 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc1155.adoc +145 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20-supply.adoc +71 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc20.adoc +77 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc4626.adoc +214 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/erc721.adoc +79 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/extending-contracts.adoc +77 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/faq.adoc +13 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/governance.adoc +240 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/index.adoc +79 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/tokens.adoc +31 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/upgradeable.adoc +77 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/utilities.adoc +185 -0
- package/lib/openzeppelin-contracts/docs/modules/ROOT/pages/wizard.adoc +15 -0
- package/lib/openzeppelin-contracts/docs/templates/contract.hbs +111 -0
- package/lib/openzeppelin-contracts/docs/templates/helpers.js +46 -0
- package/lib/openzeppelin-contracts/docs/templates/page.hbs +4 -0
- package/lib/openzeppelin-contracts/docs/templates/properties.js +64 -0
- package/lib/openzeppelin-contracts/hardhat/env-artifacts.js +24 -0
- package/lib/openzeppelin-contracts/hardhat/env-contract.js +25 -0
- package/lib/openzeppelin-contracts/hardhat/ignore-unreachable-warnings.js +45 -0
- package/lib/openzeppelin-contracts/hardhat/skip-foundry-tests.js +6 -0
- package/lib/openzeppelin-contracts/hardhat/task-test-get-files.js +25 -0
- package/lib/openzeppelin-contracts/hardhat.config.js +131 -0
- package/lib/openzeppelin-contracts/lib/erc4626-tests/LICENSE +661 -0
- package/lib/openzeppelin-contracts/lib/erc4626-tests/README.md +116 -0
- package/lib/openzeppelin-contracts/lib/forge-std/.github/workflows/ci.yml +92 -0
- package/lib/openzeppelin-contracts/lib/forge-std/.gitmodules +3 -0
- package/lib/openzeppelin-contracts/lib/forge-std/LICENSE-APACHE +203 -0
- package/lib/openzeppelin-contracts/lib/forge-std/LICENSE-MIT +25 -0
- package/lib/openzeppelin-contracts/lib/forge-std/README.md +250 -0
- package/lib/openzeppelin-contracts/lib/forge-std/package.json +16 -0
- package/lib/openzeppelin-contracts/logo.svg +15 -0
- package/lib/openzeppelin-contracts/netlify.toml +3 -0
- package/lib/openzeppelin-contracts/package-lock.json +16544 -0
- package/lib/openzeppelin-contracts/package.json +96 -0
- package/lib/openzeppelin-contracts/remappings.txt +1 -0
- package/lib/openzeppelin-contracts/renovate.json +4 -0
- package/lib/openzeppelin-contracts/requirements.txt +1 -0
- package/lib/openzeppelin-contracts/scripts/checks/compare-layout.js +20 -0
- package/lib/openzeppelin-contracts/scripts/checks/compareGasReports.js +243 -0
- package/lib/openzeppelin-contracts/scripts/checks/extract-layout.js +38 -0
- package/lib/openzeppelin-contracts/scripts/checks/generation.sh +6 -0
- package/lib/openzeppelin-contracts/scripts/checks/inheritance-ordering.js +54 -0
- package/lib/openzeppelin-contracts/scripts/gen-nav.js +41 -0
- package/lib/openzeppelin-contracts/scripts/generate/format-lines.js +16 -0
- package/lib/openzeppelin-contracts/scripts/generate/run.js +49 -0
- package/lib/openzeppelin-contracts/scripts/generate/templates/Checkpoints.js +247 -0
- package/lib/openzeppelin-contracts/scripts/generate/templates/Checkpoints.opts.js +17 -0
- package/lib/openzeppelin-contracts/scripts/generate/templates/Checkpoints.t.js +146 -0
- package/lib/openzeppelin-contracts/scripts/generate/templates/EnumerableMap.js +283 -0
- package/lib/openzeppelin-contracts/scripts/generate/templates/EnumerableSet.js +250 -0
- package/lib/openzeppelin-contracts/scripts/generate/templates/SafeCast.js +126 -0
- package/lib/openzeppelin-contracts/scripts/generate/templates/StorageSlot.js +78 -0
- package/lib/openzeppelin-contracts/scripts/generate/templates/conversion.js +30 -0
- package/lib/openzeppelin-contracts/scripts/git-user-config.sh +6 -0
- package/lib/openzeppelin-contracts/scripts/helpers.js +37 -0
- package/lib/openzeppelin-contracts/scripts/prepack.sh +23 -0
- package/lib/openzeppelin-contracts/scripts/prepare-docs.sh +26 -0
- package/lib/openzeppelin-contracts/scripts/release/format-changelog.js +33 -0
- package/lib/openzeppelin-contracts/scripts/release/synchronize-versions.js +15 -0
- package/lib/openzeppelin-contracts/scripts/release/update-comment.js +34 -0
- package/lib/openzeppelin-contracts/scripts/release/version.sh +11 -0
- package/lib/openzeppelin-contracts/scripts/release/workflow/exit-prerelease.sh +8 -0
- package/lib/openzeppelin-contracts/scripts/release/workflow/github-release.js +48 -0
- package/lib/openzeppelin-contracts/scripts/release/workflow/integrity-check.sh +20 -0
- package/lib/openzeppelin-contracts/scripts/release/workflow/pack.sh +26 -0
- package/lib/openzeppelin-contracts/scripts/release/workflow/publish.sh +26 -0
- package/lib/openzeppelin-contracts/scripts/release/workflow/rerun.js +7 -0
- package/lib/openzeppelin-contracts/scripts/release/workflow/set-changesets-pr-title.js +17 -0
- package/lib/openzeppelin-contracts/scripts/release/workflow/start.sh +35 -0
- package/lib/openzeppelin-contracts/scripts/release/workflow/state.js +112 -0
- package/lib/openzeppelin-contracts/scripts/remove-ignored-artifacts.js +45 -0
- package/lib/openzeppelin-contracts/scripts/solhint-custom/index.js +84 -0
- package/lib/openzeppelin-contracts/scripts/solhint-custom/package.json +5 -0
- package/lib/openzeppelin-contracts/scripts/update-docs-branch.js +65 -0
- package/lib/openzeppelin-contracts/scripts/upgradeable/README.md +21 -0
- package/lib/openzeppelin-contracts/scripts/upgradeable/patch-apply.sh +19 -0
- package/lib/openzeppelin-contracts/scripts/upgradeable/patch-save.sh +18 -0
- package/lib/openzeppelin-contracts/scripts/upgradeable/transpile-onto.sh +54 -0
- package/lib/openzeppelin-contracts/scripts/upgradeable/transpile.sh +47 -0
- package/lib/openzeppelin-contracts/scripts/upgradeable/upgradeable.patch +360 -0
- package/lib/openzeppelin-contracts/slither.config.json +5 -0
- package/lib/openzeppelin-contracts/solhint.config.js +20 -0
- package/mythril-lft-output.txt +1 -0
- package/mythril-lft-symbolic.txt +18 -0
- package/mythril-lft.sh +20 -0
- package/mythril-symbolic-output.txt +1 -0
- package/mythril-symbolic.sh +42 -0
- package/out/build-info/0026b78428192979.json +1 -0
- package/out/build-info/03c4fc3b88486eba.json +1 -0
- package/out/build-info/0540afa9b9a5c5a6.json +1 -0
- package/out/build-info/081932f505bc08b9.json +1 -0
- package/out/build-info/0da104ba0d6642d5.json +1 -0
- package/out/build-info/197281971dbb5f23.json +1 -0
- package/out/build-info/197e7e332832a232.json +1 -0
- package/out/build-info/1a1cab9136eb5f94.json +1 -0
- package/out/build-info/1b320204eb162aa2.json +1 -0
- package/out/build-info/1e03f94398052674.json +1 -0
- package/out/build-info/22ac085949602937.json +1 -0
- package/out/build-info/234ef37453a9fa64.json +1 -0
- package/out/build-info/2447db7b1878fa8e.json +1 -0
- package/out/build-info/25568daeb484f5ff.json +1 -0
- package/out/build-info/27465853244c49ce.json +1 -0
- package/out/build-info/2c57a9e0f087453b.json +1 -0
- package/out/build-info/3c62ae7de8da68c4.json +1 -0
- package/out/build-info/3e771ae109e97bb3.json +1 -0
- package/out/build-info/460499bc0a3465c4.json +1 -0
- package/out/build-info/47ce37e50a4f115e.json +1 -0
- package/out/build-info/4fcce5c63cf427d6.json +1 -0
- package/out/build-info/4fd0a53fe63fddbb.json +1 -0
- package/out/build-info/50f1247db9d769cc.json +1 -0
- package/out/build-info/5317d0181a7a5e02.json +1 -0
- package/out/build-info/594df509275ceb5b.json +1 -0
- package/out/build-info/61983ac3f6141719.json +1 -0
- package/out/build-info/638c4548307122fe.json +1 -0
- package/out/build-info/67c2c43bdb7c0ded.json +1 -0
- package/out/build-info/777f42643aad37b7.json +1 -0
- package/out/build-info/7d7856f19e845354.json +1 -0
- package/out/build-info/83976260b6f71e94.json +1 -0
- package/out/build-info/83c23882000b963d.json +1 -0
- package/out/build-info/84b2cce8f70b36be.json +1 -0
- package/out/build-info/8bc13d31d7c3206a.json +1 -0
- package/out/build-info/8e183bd4d9d8cf88.json +1 -0
- package/out/build-info/94bfe1e7cafa8ff5.json +1 -0
- package/out/build-info/99ec7d5e8d8ff360.json +1 -0
- package/out/build-info/9ac044b29daa7d5e.json +1 -0
- package/out/build-info/9b203227ff5d2e63.json +1 -0
- package/out/build-info/9d18c5872c4282dd.json +1 -0
- package/out/build-info/9f77f04f33baf9a3.json +1 -0
- package/out/build-info/a6e1caf974787982.json +1 -0
- package/out/build-info/a94b6348867a62d6.json +1 -0
- package/out/build-info/ad93721947a8b195.json +1 -0
- package/out/build-info/b42daddb5aa4b19f.json +1 -0
- package/out/build-info/bf13512ae899f7e8.json +1 -0
- package/out/build-info/c39f86c20a548c4a.json +1 -0
- package/out/build-info/cb12bb975a2f4e65.json +1 -0
- package/out/build-info/d0c6788fadc2aa60.json +1 -0
- package/out/build-info/d2726bf94ed5b845.json +1 -0
- package/out/build-info/d4eb00da50cce5cb.json +1 -0
- package/out/build-info/db931924a3bc8bdd.json +1 -0
- package/out/build-info/e1a503d49bc77401.json +1 -0
- package/out/build-info/efe5396f8892ce77.json +1 -0
- package/out/build-info/f536d90ced745969.json +1 -0
- package/out/build-info/fed38823c7019b82.json +1 -0
- package/package.json +51 -0
- package/page.html +5384 -0
- package/pancakeswap-simple-tvl.sql +15 -0
- package/pancakeswap-top-pools.sql +29 -0
- package/pancakeswap-tvl-optimized.sql +57 -0
- package/pancakeswap-tvl-query.sql +60 -0
- package/pancakeswap-underflow-hunting.sql +51 -0
- package/pancakeswap-vulnerability-queries.sql +200 -0
- package/posi_page.html +6369 -0
- package/posi_response.json +29 -0
- package/proxy_page.html +500 -0
- package/run_mythril_elephant.sh +18 -0
- package/sHEGIC-bytecode.bin +6 -0
- package/sHEGIC-mythril-analysis.txt +1 -0
- package/sHEGIC-mythril-full.txt +134 -0
- package/sHEGIC_ANALYSIS.md +135 -0
- package/sHEGIC_EXPLOIT_ANALYSIS.md +317 -0
- package/sHEGIC_MYTHRIL_ANALYSIS.md +361 -0
- package/scrape-snowcrash.js +28 -0
- package/scripts/yooshi_drain.sh +154 -0
- package/shi_raw.json +1 -0
- package/temp.json +1 -0
- package/temp_harvest.json +1 -0
- package/temp_pika.json +1 -0
- package/temp_posi.json +1 -0
- package/temp_response.json +1 -0
- package/test-lft-hidden-balance.js +108 -0
- package/test-xfi-exploit.js +140 -0
- package/trunk-liquidity-rescue.js +164 -0
- package/vBABY_page.html +6153 -0
- package/vBABY_response.json +29 -0
- package/wsg_response.json +1 -0
- package/yooldo_page.html +10371 -0
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
# Chainlink CCIP LockReleaseTokenPool Security Audit Report
|
|
2
|
+
|
|
3
|
+
**Contract**: LockReleaseTokenPool
|
|
4
|
+
**Version**: 1.5.1
|
|
5
|
+
**Type**: Cross-Chain Token Pool (Chainlink CCIP)
|
|
6
|
+
**Deployment Date**: February 26, 2025
|
|
7
|
+
**Compiler**: Solidity 0.8.24
|
|
8
|
+
**Audit Date**: March 24, 2026
|
|
9
|
+
**Auditor**: Kiro AI Security Analysis
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Executive Summary
|
|
14
|
+
|
|
15
|
+
**Risk Level**: 🟢 **LOW** (Professional Implementation)
|
|
16
|
+
|
|
17
|
+
This is a **Chainlink CCIP official contract** for cross-chain token transfers. The contract is:
|
|
18
|
+
1. **WELL-DESIGNED**: Professional implementation with proper security measures
|
|
19
|
+
2. **AUDITED**: Part of Chainlink's audited CCIP infrastructure
|
|
20
|
+
3. **PRODUCTION-READY**: Used in live Chainlink CCIP deployments
|
|
21
|
+
4. **CENTRALIZED**: Owner and rebalancer have significant control (by design)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Contract Overview
|
|
26
|
+
|
|
27
|
+
The LockReleaseTokenPool is part of Chainlink's Cross-Chain Interoperability Protocol (CCIP) infrastructure:
|
|
28
|
+
|
|
29
|
+
**Purpose**: Enables cross-chain token transfers for native tokens using lock/release mechanism
|
|
30
|
+
|
|
31
|
+
**How It Works**:
|
|
32
|
+
1. **Lock**: Tokens are locked in the pool on the source chain
|
|
33
|
+
2. **Message**: CCIP sends a message to the destination chain
|
|
34
|
+
3. **Release**: Equivalent tokens are released from the pool on the destination chain
|
|
35
|
+
|
|
36
|
+
**Key Features**:
|
|
37
|
+
- Lock/release mechanism for native tokens
|
|
38
|
+
- Rate limiting (inbound and outbound)
|
|
39
|
+
- Multi-chain support with per-chain configuration
|
|
40
|
+
- Liquidity management for rebalancers
|
|
41
|
+
- RMN (Risk Management Network) integration
|
|
42
|
+
- Allowlist support for permissioned tokens
|
|
43
|
+
- Decimal conversion between chains
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Architecture Analysis
|
|
48
|
+
|
|
49
|
+
### Design Pattern: Lock/Release
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Source Chain (e.g., Ethereum) Destination Chain (e.g., Arbitrum)
|
|
53
|
+
┌─────────────────────────┐ ┌─────────────────────────┐
|
|
54
|
+
│ User │ │ │
|
|
55
|
+
│ ↓ │ │ │
|
|
56
|
+
│ OnRamp │ │ │
|
|
57
|
+
│ ↓ │ │ │
|
|
58
|
+
│ LockReleaseTokenPool │ ─────→ │ LockReleaseTokenPool │
|
|
59
|
+
│ (Locks 100 tokens) │ Message │ (Releases 100 tokens) │
|
|
60
|
+
└─────────────────────────┘ └─────────────────────────┘
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Invariant**: `sum(locked on all chains) >= sum(released on all chains)`
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Security Features (POSITIVE)
|
|
68
|
+
|
|
69
|
+
### ✅ #1: Comprehensive Validation
|
|
70
|
+
|
|
71
|
+
```solidity
|
|
72
|
+
function _validateLockOrBurn(Pool.LockOrBurnInV1 calldata lockOrBurnIn) internal {
|
|
73
|
+
// 1. Token validation
|
|
74
|
+
if (!isSupportedToken(lockOrBurnIn.localToken))
|
|
75
|
+
revert InvalidToken(lockOrBurnIn.localToken);
|
|
76
|
+
|
|
77
|
+
// 2. RMN curse check
|
|
78
|
+
if (IRMN(i_rmnProxy).isCursed(bytes16(uint128(lockOrBurnIn.remoteChainSelector))))
|
|
79
|
+
revert CursedByRMN();
|
|
80
|
+
|
|
81
|
+
// 3. Allowlist check
|
|
82
|
+
_checkAllowList(lockOrBurnIn.originalSender);
|
|
83
|
+
|
|
84
|
+
// 4. OnRamp validation
|
|
85
|
+
_onlyOnRamp(lockOrBurnIn.remoteChainSelector);
|
|
86
|
+
|
|
87
|
+
// 5. Rate limit check
|
|
88
|
+
_consumeOutboundRateLimit(lockOrBurnIn.remoteChainSelector, lockOrBurnIn.amount);
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Excellent**: Multi-layer validation prevents unauthorized transfers.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### ✅ #2: RMN (Risk Management Network) Integration
|
|
97
|
+
|
|
98
|
+
```solidity
|
|
99
|
+
if (IRMN(i_rmnProxy).isCursed(bytes16(uint128(lockOrBurnIn.remoteChainSelector))))
|
|
100
|
+
revert CursedByRMN();
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**What is RMN?**
|
|
104
|
+
- Independent monitoring network
|
|
105
|
+
- Can "curse" chains if anomalies detected
|
|
106
|
+
- Provides additional security layer
|
|
107
|
+
- Prevents transfers during incidents
|
|
108
|
+
|
|
109
|
+
**This is a critical security feature** that can halt operations if issues are detected.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### ✅ #3: Rate Limiting (Token Bucket Algorithm)
|
|
114
|
+
|
|
115
|
+
```solidity
|
|
116
|
+
struct TokenBucket {
|
|
117
|
+
uint128 tokens; // Current tokens in bucket
|
|
118
|
+
uint32 lastUpdated; // Last refill timestamp
|
|
119
|
+
bool isEnabled; // Rate limiting enabled
|
|
120
|
+
uint128 capacity; // Maximum capacity
|
|
121
|
+
uint128 rate; // Refill rate per second
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**How It Works**:
|
|
126
|
+
- Bucket refills at constant rate
|
|
127
|
+
- Transfers consume tokens from bucket
|
|
128
|
+
- Prevents sudden large transfers
|
|
129
|
+
- Separate limits for inbound/outbound
|
|
130
|
+
- Per-chain configuration
|
|
131
|
+
|
|
132
|
+
**Example**:
|
|
133
|
+
- Capacity: 1,000,000 tokens
|
|
134
|
+
- Rate: 100 tokens/second
|
|
135
|
+
- Max burst: 1M tokens
|
|
136
|
+
- Sustained rate: 100 tokens/sec
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### ✅ #4: Decimal Conversion Safety
|
|
141
|
+
|
|
142
|
+
```solidity
|
|
143
|
+
function _calculateLocalAmount(uint256 remoteAmount, uint8 remoteDecimals)
|
|
144
|
+
internal view returns (uint256)
|
|
145
|
+
{
|
|
146
|
+
if (remoteDecimals == i_tokenDecimals) {
|
|
147
|
+
return remoteAmount;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (remoteDecimals > i_tokenDecimals) {
|
|
151
|
+
uint8 decimalsDiff = remoteDecimals - i_tokenDecimals;
|
|
152
|
+
if (decimalsDiff > 77) {
|
|
153
|
+
revert OverflowDetected(remoteDecimals, i_tokenDecimals, remoteAmount);
|
|
154
|
+
}
|
|
155
|
+
// Rounds down - no risk of minting more than locked
|
|
156
|
+
return remoteAmount / (10 ** decimalsDiff);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Overflow protection
|
|
160
|
+
uint8 diffDecimals = i_tokenDecimals - remoteDecimals;
|
|
161
|
+
if (diffDecimals > 77 || remoteAmount > type(uint256).max / (10 ** diffDecimals)) {
|
|
162
|
+
revert OverflowDetected(remoteDecimals, i_tokenDecimals, remoteAmount);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return remoteAmount * (10 ** diffDecimals);
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Excellent Safety**:
|
|
170
|
+
- Overflow protection
|
|
171
|
+
- Rounds down (conservative)
|
|
172
|
+
- Handles up to 77 decimal difference
|
|
173
|
+
- Prevents minting more than locked
|
|
174
|
+
|
|
175
|
+
**Note**: Rounding down means some tokens may be "lost" in conversion, but this is safer than the alternative.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### ✅ #5: Two-Step Ownership Transfer
|
|
180
|
+
|
|
181
|
+
```solidity
|
|
182
|
+
contract Ownable2Step {
|
|
183
|
+
address private s_pendingOwner;
|
|
184
|
+
address private s_owner;
|
|
185
|
+
|
|
186
|
+
function transferOwnership(address to) public onlyOwner {
|
|
187
|
+
s_pendingOwner = to;
|
|
188
|
+
emit OwnershipTransferRequested(s_owner, to);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function acceptOwnership() external {
|
|
192
|
+
if (msg.sender != s_pendingOwner) revert MustBeProposedOwner();
|
|
193
|
+
address oldOwner = s_owner;
|
|
194
|
+
s_owner = msg.sender;
|
|
195
|
+
s_pendingOwner = address(0);
|
|
196
|
+
emit OwnershipTransferred(oldOwner, msg.sender);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Good**: Prevents accidental ownership transfer to wrong address.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Centralization Risks (BY DESIGN)
|
|
206
|
+
|
|
207
|
+
### 🟡 #1: Owner Powers
|
|
208
|
+
|
|
209
|
+
**Owner Can**:
|
|
210
|
+
1. Set rebalancer address
|
|
211
|
+
2. Add/remove supported chains
|
|
212
|
+
3. Configure rate limits
|
|
213
|
+
4. Add/remove remote pools
|
|
214
|
+
5. Update router address
|
|
215
|
+
6. Manage allowlist
|
|
216
|
+
7. Transfer liquidity between pools
|
|
217
|
+
|
|
218
|
+
**Impact**: Owner has significant control over pool operations.
|
|
219
|
+
|
|
220
|
+
**Mitigation**:
|
|
221
|
+
- Chainlink uses multi-sig for ownership
|
|
222
|
+
- Operations are monitored
|
|
223
|
+
- Part of audited infrastructure
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
### 🟡 #2: Rebalancer Powers
|
|
228
|
+
|
|
229
|
+
```solidity
|
|
230
|
+
function provideLiquidity(uint256 amount) external {
|
|
231
|
+
if (!i_acceptLiquidity) revert LiquidityNotAccepted();
|
|
232
|
+
if (s_rebalancer != msg.sender) revert Unauthorized(msg.sender);
|
|
233
|
+
i_token.safeTransferFrom(msg.sender, address(this), amount);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function withdrawLiquidity(uint256 amount) external {
|
|
237
|
+
if (s_rebalancer != msg.sender) revert Unauthorized(msg.sender);
|
|
238
|
+
if (i_token.balanceOf(address(this)) < amount) revert InsufficientLiquidity();
|
|
239
|
+
i_token.safeTransfer(msg.sender, amount);
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Rebalancer Can**:
|
|
244
|
+
- Add liquidity to pool
|
|
245
|
+
- Withdraw liquidity from pool
|
|
246
|
+
- Must maintain sufficient liquidity for releases
|
|
247
|
+
|
|
248
|
+
**Impact**: Rebalancer controls pool liquidity.
|
|
249
|
+
|
|
250
|
+
**Mitigation**:
|
|
251
|
+
- Rebalancer is typically a Chainlink-controlled contract
|
|
252
|
+
- Monitored by RMN
|
|
253
|
+
- Insufficient liquidity check prevents over-withdrawal
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
### 🟡 #3: Rate Limit Admin
|
|
258
|
+
|
|
259
|
+
```solidity
|
|
260
|
+
function setChainRateLimiterConfig(
|
|
261
|
+
uint64 remoteChainSelector,
|
|
262
|
+
RateLimiter.Config memory outboundConfig,
|
|
263
|
+
RateLimiter.Config memory inboundConfig
|
|
264
|
+
) external {
|
|
265
|
+
if (msg.sender != s_rateLimitAdmin && msg.sender != owner())
|
|
266
|
+
revert Unauthorized(msg.sender);
|
|
267
|
+
_setRateLimitConfig(remoteChainSelector, outboundConfig, inboundConfig);
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**Rate Limit Admin Can**:
|
|
272
|
+
- Change rate limits without owner
|
|
273
|
+
- Enable/disable rate limiting
|
|
274
|
+
- Adjust capacity and refill rate
|
|
275
|
+
|
|
276
|
+
**Impact**: Can restrict or allow larger transfers.
|
|
277
|
+
|
|
278
|
+
**Mitigation**: Separate role allows operational flexibility without full owner powers.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Potential Issues (INFORMATIONAL)
|
|
283
|
+
|
|
284
|
+
### 🟢 INFO #1: Decimal Rounding Loss
|
|
285
|
+
|
|
286
|
+
```solidity
|
|
287
|
+
// Example: 6 decimals → 3 decimals
|
|
288
|
+
// Lock 1.234567 tokens on source
|
|
289
|
+
// Release 1.234 tokens on destination
|
|
290
|
+
// Lost: 0.000567 tokens
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**Impact**: Small amounts may be "lost" in decimal conversion.
|
|
294
|
+
|
|
295
|
+
**Severity**: INFORMATIONAL - This is documented and intentional.
|
|
296
|
+
|
|
297
|
+
**Mitigation**:
|
|
298
|
+
- Rounds down (conservative)
|
|
299
|
+
- Documented in comments
|
|
300
|
+
- Prevents minting more than locked
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
### 🟢 INFO #2: Liquidity Management Complexity
|
|
305
|
+
|
|
306
|
+
**Scenario**:
|
|
307
|
+
1. Pool needs 1M tokens for releases
|
|
308
|
+
2. Rebalancer withdraws 900K tokens
|
|
309
|
+
3. Next release of 200K tokens fails
|
|
310
|
+
|
|
311
|
+
**Impact**: Insufficient liquidity can block releases.
|
|
312
|
+
|
|
313
|
+
**Mitigation**:
|
|
314
|
+
- `InsufficientLiquidity` check prevents over-withdrawal
|
|
315
|
+
- Rebalancer monitored by Chainlink
|
|
316
|
+
- RMN can curse chain if issues detected
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
### 🟢 INFO #3: transferLiquidity Function
|
|
321
|
+
|
|
322
|
+
```solidity
|
|
323
|
+
function transferLiquidity(address from, uint256 amount) external onlyOwner {
|
|
324
|
+
LockReleaseTokenPool(from).withdrawLiquidity(amount);
|
|
325
|
+
emit LiquidityTransferred(from, amount);
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
**Purpose**: Migrate liquidity from old pool to new pool during upgrades.
|
|
330
|
+
|
|
331
|
+
**Risk**: If `from` is malicious contract, could drain tokens.
|
|
332
|
+
|
|
333
|
+
**Mitigation**:
|
|
334
|
+
- Only callable by owner
|
|
335
|
+
- Used during controlled upgrades
|
|
336
|
+
- Part of documented upgrade process
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Comparison to Other Audited Contracts
|
|
341
|
+
|
|
342
|
+
**vs. Decompiled Staking Pool** (previous audit):
|
|
343
|
+
- ✅ Much better: No rug pull functions
|
|
344
|
+
- ✅ Much better: Professional implementation
|
|
345
|
+
- ✅ Much better: Comprehensive validation
|
|
346
|
+
- ✅ Much better: Rate limiting
|
|
347
|
+
- ✅ Much better: Multi-sig ownership (Chainlink)
|
|
348
|
+
|
|
349
|
+
**vs. PAAL AI Token** (previous audit):
|
|
350
|
+
- ✅ Much better: No hidden tax backdoors
|
|
351
|
+
- ✅ Much better: Transparent operations
|
|
352
|
+
- ✅ Much better: Audited by professionals
|
|
353
|
+
- ✅ Much better: Part of production infrastructure
|
|
354
|
+
|
|
355
|
+
**vs. DSync/BasedAI Contracts**:
|
|
356
|
+
- ✅ Much better: No excessive owner powers
|
|
357
|
+
- ✅ Much better: Rate limiting prevents abuse
|
|
358
|
+
- ✅ Much better: RMN provides additional security
|
|
359
|
+
- ✅ Much better: Two-step ownership transfer
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## Risk Summary
|
|
364
|
+
|
|
365
|
+
| Risk Category | Level | Details |
|
|
366
|
+
|--------------|-------|---------|
|
|
367
|
+
| **Rug Pull Risk** | 🟢 NONE | No rug pull mechanisms |
|
|
368
|
+
| **Owner Control** | 🟡 MEDIUM | Significant but expected for CCIP |
|
|
369
|
+
| **Rebalancer Control** | 🟡 MEDIUM | Controls liquidity (by design) |
|
|
370
|
+
| **Rate Limiting** | 🟢 EXCELLENT | Comprehensive token bucket implementation |
|
|
371
|
+
| **Validation** | 🟢 EXCELLENT | Multi-layer security checks |
|
|
372
|
+
| **RMN Integration** | 🟢 EXCELLENT | Additional security layer |
|
|
373
|
+
| **Decimal Handling** | 🟢 EXCELLENT | Safe with overflow protection |
|
|
374
|
+
| **External Exploit** | 🟢 VERY LOW | Well-protected |
|
|
375
|
+
| **Code Quality** | 🟢 EXCELLENT | Professional, audited code |
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## Recommendations
|
|
380
|
+
|
|
381
|
+
### For Users:
|
|
382
|
+
|
|
383
|
+
1. **SAFE TO USE**: This is official Chainlink infrastructure
|
|
384
|
+
2. **UNDERSTAND LIMITS**: Rate limits may delay large transfers
|
|
385
|
+
3. **CHECK LIQUIDITY**: Ensure pool has sufficient liquidity
|
|
386
|
+
4. **MONITOR RMN**: Check if chain is cursed before transfers
|
|
387
|
+
5. **DECIMAL AWARENESS**: Understand rounding in decimal conversion
|
|
388
|
+
|
|
389
|
+
### For Integrators:
|
|
390
|
+
|
|
391
|
+
1. **USE AS-IS**: Don't modify unless necessary
|
|
392
|
+
2. **MONITOR EVENTS**: Track Locked/Released events
|
|
393
|
+
3. **HANDLE FAILURES**: Implement retry logic for rate limit errors
|
|
394
|
+
4. **CHECK SUPPORT**: Verify chain is supported before transfers
|
|
395
|
+
5. **LIQUIDITY PLANNING**: Ensure sufficient liquidity for expected volume
|
|
396
|
+
|
|
397
|
+
### For Chainlink (If Applicable):
|
|
398
|
+
|
|
399
|
+
1. **MULTI-SIG**: Continue using multi-sig for owner (already done)
|
|
400
|
+
2. **MONITORING**: Continue RMN monitoring (already done)
|
|
401
|
+
3. **DOCUMENTATION**: Maintain clear upgrade procedures
|
|
402
|
+
4. **RATE LIMIT TUNING**: Adjust limits based on usage patterns
|
|
403
|
+
5. **LIQUIDITY MANAGEMENT**: Automate rebalancer operations
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## Security Best Practices Observed
|
|
408
|
+
|
|
409
|
+
✅ **Checks-Effects-Interactions**: Proper ordering
|
|
410
|
+
✅ **Reentrancy Protection**: SafeERC20 usage
|
|
411
|
+
✅ **Overflow Protection**: Solidity 0.8.24 built-in + explicit checks
|
|
412
|
+
✅ **Access Control**: Multiple roles (owner, rebalancer, rate limit admin)
|
|
413
|
+
✅ **Input Validation**: Comprehensive validation functions
|
|
414
|
+
✅ **Event Emission**: All state changes emit events
|
|
415
|
+
✅ **Immutable Variables**: Critical addresses are immutable
|
|
416
|
+
✅ **Rate Limiting**: Token bucket algorithm
|
|
417
|
+
✅ **External Monitoring**: RMN integration
|
|
418
|
+
✅ **Two-Step Ownership**: Prevents accidental transfers
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## Code Quality Assessment
|
|
423
|
+
|
|
424
|
+
**Strengths**:
|
|
425
|
+
- Clean, readable code
|
|
426
|
+
- Comprehensive comments
|
|
427
|
+
- Follows Solidity best practices
|
|
428
|
+
- Uses OpenZeppelin libraries
|
|
429
|
+
- Proper error handling
|
|
430
|
+
- Extensive validation
|
|
431
|
+
- Well-structured inheritance
|
|
432
|
+
|
|
433
|
+
**Areas of Excellence**:
|
|
434
|
+
- Rate limiting implementation
|
|
435
|
+
- Decimal conversion safety
|
|
436
|
+
- Multi-layer validation
|
|
437
|
+
- RMN integration
|
|
438
|
+
- Liquidity management
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
## Conclusion
|
|
443
|
+
|
|
444
|
+
**VERDICT**: 🟢 **SAFE - PROFESSIONAL IMPLEMENTATION**
|
|
445
|
+
|
|
446
|
+
This contract is:
|
|
447
|
+
- ✅ Part of Chainlink's audited CCIP infrastructure
|
|
448
|
+
- ✅ Professionally implemented with comprehensive security
|
|
449
|
+
- ✅ Used in production by Chainlink
|
|
450
|
+
- ✅ Well-designed with multiple security layers
|
|
451
|
+
- ✅ Properly handles edge cases (decimals, overflows, rate limits)
|
|
452
|
+
- ⚠️ Centralized (owner, rebalancer) but this is by design for CCIP
|
|
453
|
+
- ⚠️ Requires trust in Chainlink (which is reasonable)
|
|
454
|
+
|
|
455
|
+
**For Users**: This is one of the safest contracts we've audited. It's part of Chainlink's production infrastructure and has been professionally audited.
|
|
456
|
+
|
|
457
|
+
**For Developers**: This is an excellent example of how to implement a cross-chain token pool with proper security measures.
|
|
458
|
+
|
|
459
|
+
**Exploitability**: Not exploitable by external attackers. Owner/rebalancer have necessary powers for CCIP operations, but these are controlled by Chainlink's multi-sig and monitoring systems.
|
|
460
|
+
|
|
461
|
+
**Comparison**: This is significantly safer than all previous contracts audited (DSync, PAAL AI, Staking Pool, etc.) because it's professionally developed, audited, and part of production infrastructure.
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
**Audit Complete** ✓
|
|
466
|
+
|
|
467
|
+
**RECOMMENDATION**: ✅ **SAFE TO USE**
|
|
468
|
+
|
|
469
|
+
This is a professionally implemented Chainlink CCIP contract with excellent security practices. The centralization is by design and appropriate for cross-chain infrastructure. No critical vulnerabilities found.
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Additional Resources
|
|
474
|
+
|
|
475
|
+
- **Chainlink CCIP Docs**: https://docs.chain.link/ccip
|
|
476
|
+
- **CCIP Architecture**: https://docs.chain.link/ccip/architecture
|
|
477
|
+
- **Rate Limiting**: https://docs.chain.link/ccip/concepts/rate-limiting
|
|
478
|
+
- **RMN**: https://docs.chain.link/ccip/concepts/risk-management-network
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
**Note**: This audit is based on the contract code provided. For complete security assurance, refer to Chainlink's official audits of the CCIP system.
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# 🔐 Security Review — MOG Token
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
| | |
|
|
8
|
+
| -------------------------------- | ------------------------------------------------------ |
|
|
9
|
+
| **Mode** | Single file audit |
|
|
10
|
+
| **Files reviewed** | `MOG.sol` |
|
|
11
|
+
| **Confidence threshold (1-100)** | 75 |
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Findings
|
|
16
|
+
|
|
17
|
+
[95] **1. Unprotected clearStuckToken Allows Theft of Contract Tokens**
|
|
18
|
+
|
|
19
|
+
`MOG.clearStuckToken` · Confidence: 95
|
|
20
|
+
|
|
21
|
+
**Description**
|
|
22
|
+
The `clearStuckToken` function lacks access control and can be called by anyone to transfer any ERC20 tokens (including the MOG token itself) held by the contract to `autoLiquidityReceiver`. This allows attackers to drain accumulated fees and liquidity tokens.
|
|
23
|
+
|
|
24
|
+
**Fix**
|
|
25
|
+
|
|
26
|
+
```diff
|
|
27
|
+
- function clearStuckToken(address tokenAddress, uint256 tokens) external returns (bool success) {
|
|
28
|
+
+ function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
|
|
29
|
+
+ require(tokenAddress != address(this), "Cannot withdraw MOG tokens");
|
|
30
|
+
if(tokens == 0){
|
|
31
|
+
tokens = ERC20(tokenAddress).balanceOf(address(this));
|
|
32
|
+
}
|
|
33
|
+
emit ClearToken(tokenAddress, tokens);
|
|
34
|
+
return ERC20(tokenAddress).transfer(autoLiquidityReceiver, tokens);
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
[92] **2. Unprotected manualSend Allows ETH Drainage**
|
|
41
|
+
|
|
42
|
+
`MOG.manualSend` · Confidence: 92
|
|
43
|
+
|
|
44
|
+
**Description**
|
|
45
|
+
The `manualSend` function has no access control, allowing anyone to drain all ETH from the contract to `autoLiquidityReceiver`. This bypasses the intended fee distribution mechanism in `swapBack`.
|
|
46
|
+
|
|
47
|
+
**Fix**
|
|
48
|
+
|
|
49
|
+
```diff
|
|
50
|
+
- function manualSend() external {
|
|
51
|
+
+ function manualSend() external onlyOwner {
|
|
52
|
+
payable(autoLiquidityReceiver).transfer(address(this).balance);
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
[90] **3. Extreme Fee Manipulation via startTrading**
|
|
59
|
+
|
|
60
|
+
`MOG.startTrading` · Confidence: 90
|
|
61
|
+
|
|
62
|
+
**Description**
|
|
63
|
+
`startTrading` sets `buypercent = 1400` (14x multiplier) and `sellpercent = 800` (8x multiplier), resulting in effective fees of 56% on buys and 32% on sells (base 4% * multiplier / 100). This creates a honeypot scenario where early buyers cannot profitably exit.
|
|
64
|
+
|
|
65
|
+
**Fix**
|
|
66
|
+
|
|
67
|
+
```diff
|
|
68
|
+
function startTrading() public onlyOwner {
|
|
69
|
+
TradingOpen = true;
|
|
70
|
+
- buypercent = 1400;
|
|
71
|
+
- sellpercent = 800;
|
|
72
|
+
- transferpercent = 1000;
|
|
73
|
+
+ buypercent = 100;
|
|
74
|
+
+ sellpercent = 100;
|
|
75
|
+
+ transferpercent = 100;
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
[88] **4. Unchecked Fee Multiplier Allows Confiscatory Taxation**
|
|
82
|
+
|
|
83
|
+
`MOG.setStructure` · Confidence: 88
|
|
84
|
+
|
|
85
|
+
**Description**
|
|
86
|
+
`setStructure` allows owner to set `buypercent`, `sellpercent`, and `transferpercent` to arbitrary values with no upper bound. Combined with `totalFee = 4`, setting `buypercent = 10000` results in 400% effective fee, confiscating more than the transfer amount.
|
|
87
|
+
|
|
88
|
+
**Fix**
|
|
89
|
+
|
|
90
|
+
```diff
|
|
91
|
+
function setStructure(uint256 _percentonbuy, uint256 _percentonsell, uint256 _wallettransfer) external onlyOwner {
|
|
92
|
+
+ require(_percentonbuy <= 500 && _percentonsell <= 500 && _wallettransfer <= 500, "Fee multiplier too high");
|
|
93
|
+
sellpercent = _percentonsell;
|
|
94
|
+
buypercent = _percentonbuy;
|
|
95
|
+
transferpercent = _wallettransfer;
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
[85] **5. Division by Zero in swapBack When totalFee is Zero**
|
|
102
|
+
|
|
103
|
+
`MOG.swapBack` · Confidence: 85
|
|
104
|
+
|
|
105
|
+
**Description**
|
|
106
|
+
If `setParameters` is called with all fee components set to zero, `totalFee` becomes zero. Subsequent calls to `swapBack` will revert on division by zero at `swapThreshold.mul(dynamicLiquidityFee).div(totalFee)`, permanently locking swapBack functionality and preventing fee distribution.
|
|
107
|
+
|
|
108
|
+
**Fix**
|
|
109
|
+
|
|
110
|
+
```diff
|
|
111
|
+
function setParameters(uint256 _liquidityFee, uint256 _buybackFee, uint256 _marketingFee, uint256 _devFee, uint256 _burnFee, uint256 _feeDenominator) external onlyOwner {
|
|
112
|
+
liquidityFee = _liquidityFee;
|
|
113
|
+
buybackFee = _buybackFee;
|
|
114
|
+
marketingFee = _marketingFee;
|
|
115
|
+
devFee = _devFee;
|
|
116
|
+
burnFee = _burnFee;
|
|
117
|
+
totalFee = _liquidityFee.add(_buybackFee).add(_marketingFee).add(_devFee).add(_burnFee);
|
|
118
|
+
feeDenominator = _feeDenominator;
|
|
119
|
+
+ require(totalFee > 0, "Total fee cannot be zero");
|
|
120
|
+
require(totalFee < feeDenominator / 2, "Fees can not be more than 50%");
|
|
121
|
+
set_fees();
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
[82] **6. Uninitialized Fee Receivers Enable Fund Loss**
|
|
128
|
+
|
|
129
|
+
`MOG.constructor` · Confidence: 82
|
|
130
|
+
|
|
131
|
+
**Description**
|
|
132
|
+
Fee receivers are initialized to `msg.sender` in constructor, but `setWallets` allows setting them to `address(0)`. If `marketingFeeReceiver` is set to zero, `swapBack` will successfully send ETH to the zero address, permanently burning funds intended for marketing.
|
|
133
|
+
|
|
134
|
+
**Fix**
|
|
135
|
+
|
|
136
|
+
```diff
|
|
137
|
+
function setWallets(address _autoLiquidityReceiver, address _marketingFeeReceiver, address _devFeeReceiver, address _burnFeeReceiver, address _buybackFeeReceiver) external onlyOwner {
|
|
138
|
+
+ require(_autoLiquidityReceiver != address(0) && _marketingFeeReceiver != address(0) && _devFeeReceiver != address(0) && _buybackFeeReceiver != address(0), "Zero address not allowed");
|
|
139
|
+
autoLiquidityReceiver = _autoLiquidityReceiver;
|
|
140
|
+
marketingFeeReceiver = _marketingFeeReceiver;
|
|
141
|
+
devFeeReceiver = _devFeeReceiver;
|
|
142
|
+
burnFeeReceiver = _burnFeeReceiver;
|
|
143
|
+
buybackFeeReceiver = _buybackFeeReceiver;
|
|
144
|
+
|
|
145
|
+
emit set_Receivers(marketingFeeReceiver, buybackFeeReceiver, burnFeeReceiver, devFeeReceiver);
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
[80] **7. Unchecked Return Values in swapBack ETH Transfers**
|
|
152
|
+
|
|
153
|
+
`MOG.swapBack` · Confidence: 80
|
|
154
|
+
|
|
155
|
+
**Description**
|
|
156
|
+
`swapBack` uses low-level `.call{value:}` for ETH transfers but ignores the return value after the first check. If `marketingFeeReceiver`, `devFeeReceiver`, or `buybackFeeReceiver` is a contract that rejects ETH, the transfer silently fails and ETH remains stuck in the contract.
|
|
157
|
+
|
|
158
|
+
**Fix**
|
|
159
|
+
|
|
160
|
+
```diff
|
|
161
|
+
- (bool tmpSuccess,) = payable(marketingFeeReceiver).call{value: amountETHMarketing}("");
|
|
162
|
+
- (tmpSuccess,) = payable(devFeeReceiver).call{value: amountETHdev}("");
|
|
163
|
+
- (tmpSuccess,) = payable(buybackFeeReceiver).call{value: amountETHbuyback}("");
|
|
164
|
+
- tmpSuccess = false;
|
|
165
|
+
+ (bool success1,) = payable(marketingFeeReceiver).call{value: amountETHMarketing}("");
|
|
166
|
+
+ (bool success2,) = payable(devFeeReceiver).call{value: amountETHdev}("");
|
|
167
|
+
+ (bool success3,) = payable(buybackFeeReceiver).call{value: amountETHbuyback}("");
|
|
168
|
+
+ require(success1 && success2 && success3, "ETH transfer failed");
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
[78] **8. Missing Slippage Protection on swapBack**
|
|
174
|
+
|
|
175
|
+
`MOG.swapBack` · Confidence: 78
|
|
176
|
+
|
|
177
|
+
**Description**
|
|
178
|
+
`swapExactTokensForETHSupportingFeeOnTransferTokens` is called with `amountOutMin = 0`, allowing the swap to complete at any price. Sandwich attacks can extract value from every swapBack execution, draining accumulated fees.
|
|
179
|
+
|
|
180
|
+
**Fix**
|
|
181
|
+
|
|
182
|
+
```diff
|
|
183
|
+
+ uint256 minETHOut = amountToSwap.mul(getExpectedETHAmount(amountToSwap)).mul(95).div(100); // 5% slippage
|
|
184
|
+
router.swapExactTokensForETHSupportingFeeOnTransferTokens(
|
|
185
|
+
amountToSwap,
|
|
186
|
+
- 0,
|
|
187
|
+
+ minETHOut,
|
|
188
|
+
path,
|
|
189
|
+
address(this),
|
|
190
|
+
block.timestamp
|
|
191
|
+
);
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
[76] **9. Renounce Ownership Leaves Contract Unmanageable**
|
|
197
|
+
|
|
198
|
+
`Ownable.renounceOwnership` · Confidence: 76
|
|
199
|
+
|
|
200
|
+
**Description**
|
|
201
|
+
`renounceOwnership` sets `_owner` to `address(0)` but doesn't clear the `authorizations` mapping. This creates an inconsistent state where `owner()` returns zero but `authorizations[address(0)]` may be false, breaking the authorization logic in `_transferFrom`.
|
|
202
|
+
|
|
203
|
+
**Fix**
|
|
204
|
+
|
|
205
|
+
```diff
|
|
206
|
+
function renounceOwnership() public virtual onlyOwner {
|
|
207
|
+
emit OwnershipTransferred(_owner, address(0));
|
|
208
|
+
+ authorizations[_owner] = false;
|
|
209
|
+
_owner = address(0);
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Leads
|
|
216
|
+
|
|
217
|
+
_Vulnerability trails with concrete code smells where the full exploit path could not be completed in one analysis pass. These are not false positives — they are high-signal leads for manual review. Not scored._
|
|
218
|
+
|
|
219
|
+
- **Reentrancy via swapBack During Transfer** — `MOG._transferFrom` — Code smells: external call to router during transfer, state updates after swap — The `swapBack()` call in `_transferFrom` happens after balance checks but before final balance updates. While the `swapping` modifier prevents direct reentry into `_transferFrom`, cross-function reentrancy through other token functions (approve, transfer) during the Uniswap callback remains unverified. The `inSwap` flag only guards `_transferFrom`, not other entry points.
|
|
220
|
+
|
|
221
|
+
- **First Depositor Inflation Attack** — `MOG.constructor` — Code smells: no dead shares, direct balance assignment — Constructor mints entire supply to deployer without burning initial shares. If deployer creates pair and adds minimal liquidity (1 wei MOG), then donates large amount directly to pair before first external LP, the exchange rate manipulation could enable share inflation attacks on subsequent LPs. Requires verification of actual pair initialization sequence.
|
|
222
|
+
|
|
223
|
+
- **Unsafe Arithmetic in Fee Calculation** — `MOG.takeFee` — Code smells: complex multi-step division, potential for rounding to zero — Fee calculation `amount.mul(totalFee).mul(percent).div(feeDenominator * 100)` with small amounts and high `feeDenominator` could round to zero, bypassing fees. With `totalFee=4`, `feeDenominator=100`, `percent=100`, amounts below 2500 wei would yield zero fee. Not exploitable at normal transfer sizes but creates fee bypass for dust transfers.
|
|
224
|
+
|
|
225
|
+
- **Authorization Mapping Never Populated** — `Ownable.authorizations` — Code smells: mapping declared, checked in transfer, but no setter function — The `authorizations` mapping is checked in `_transferFrom` to bypass trading restrictions, but there's no public function to add authorized addresses besides the owner set in constructor. This may be intentional (owner-only authorization) but the lack of a management function suggests incomplete implementation.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
> ⚠️ This review was performed by an AI assistant. AI analysis can never verify the complete absence of vulnerabilities and no guarantee of security is given. Team security reviews, bug bounty programs, and on-chain monitoring are strongly recommended. For a consultation regarding your projects' security, visit [https://www.pashov.com](https://www.pashov.com)
|