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,134 @@
|
|
|
1
|
+
==== Integer Arithmetic Bugs ====
|
|
2
|
+
SWC ID: 101
|
|
3
|
+
Severity: High
|
|
4
|
+
Contract: 0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7
|
|
5
|
+
Function name: name()
|
|
6
|
+
PC address: 2598
|
|
7
|
+
Estimated Gas Usage: 1490 - 2430
|
|
8
|
+
The arithmetic operator can overflow.
|
|
9
|
+
It is possible to cause an integer overflow or underflow in the arithmetic operation.
|
|
10
|
+
--------------------
|
|
11
|
+
Initial State:
|
|
12
|
+
|
|
13
|
+
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
|
|
14
|
+
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}
|
|
15
|
+
|
|
16
|
+
Transaction Sequence:
|
|
17
|
+
|
|
18
|
+
Caller: [ATTACKER], function: name(), txdata: 0x06fdde03, value: 0x0
|
|
19
|
+
|
|
20
|
+
==== Dependence on predictable environment variable ====
|
|
21
|
+
SWC ID: 116
|
|
22
|
+
Severity: Low
|
|
23
|
+
Contract: 0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7
|
|
24
|
+
Function name: withdraw(uint256)
|
|
25
|
+
PC address: 3255
|
|
26
|
+
Estimated Gas Usage: 3055 - 3530
|
|
27
|
+
A control flow decision is made based on The block.timestamp environment variable.
|
|
28
|
+
The block.timestamp environment variable is used to determine a control flow decision. Note that the values of variables like coinbase, gaslimit, block number and timestamp are predictable and can be manipulated by a malicious miner. Also keep in mind that attackers know hashes of earlier blocks. Don't use any of those environment variables as sources of randomness and be aware that use of these variables introduces a certain level of trust into miners.
|
|
29
|
+
--------------------
|
|
30
|
+
Initial State:
|
|
31
|
+
|
|
32
|
+
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
|
|
33
|
+
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}
|
|
34
|
+
|
|
35
|
+
Transaction Sequence:
|
|
36
|
+
|
|
37
|
+
Caller: [CREATOR], function: withdraw(uint256), txdata: 0x2e1a7d4d0000000000000000000000000000000000000000000000000000000000000000, decoded_data: (0,), value: 0x0
|
|
38
|
+
|
|
39
|
+
==== Exception State ====
|
|
40
|
+
SWC ID: 110
|
|
41
|
+
Severity: Medium
|
|
42
|
+
Contract: 0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7
|
|
43
|
+
Function name: _function_0x85335da8
|
|
44
|
+
PC address: 4592
|
|
45
|
+
Estimated Gas Usage: 336 - 431
|
|
46
|
+
An assertion violation was triggered.
|
|
47
|
+
It is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).
|
|
48
|
+
--------------------
|
|
49
|
+
Initial State:
|
|
50
|
+
|
|
51
|
+
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
|
|
52
|
+
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}
|
|
53
|
+
|
|
54
|
+
Transaction Sequence:
|
|
55
|
+
|
|
56
|
+
Caller: [CREATOR], function: unknown, txdata: 0x85335da80000000000000000000000000200004004201010080000000240000002004004, decoded_data: , value: 0x0
|
|
57
|
+
|
|
58
|
+
==== Exception State ====
|
|
59
|
+
SWC ID: 110
|
|
60
|
+
Severity: Medium
|
|
61
|
+
Contract: 0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7
|
|
62
|
+
Function name: _function_0xff4dfa96
|
|
63
|
+
PC address: 4592
|
|
64
|
+
Estimated Gas Usage: 1338 - 1623
|
|
65
|
+
An assertion violation was triggered.
|
|
66
|
+
It is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).
|
|
67
|
+
--------------------
|
|
68
|
+
Initial State:
|
|
69
|
+
|
|
70
|
+
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
|
|
71
|
+
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}
|
|
72
|
+
|
|
73
|
+
Transaction Sequence:
|
|
74
|
+
|
|
75
|
+
Caller: [ATTACKER], function: unknown, txdata: 0xff4dfa9600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000101010180400101040140010101401010010123, decoded_data: , value: 0x0
|
|
76
|
+
|
|
77
|
+
==== Integer Arithmetic Bugs ====
|
|
78
|
+
SWC ID: 101
|
|
79
|
+
Severity: High
|
|
80
|
+
Contract: 0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7
|
|
81
|
+
Function name: symbol() or link_classic_internal(uint64,int64)
|
|
82
|
+
PC address: 4862
|
|
83
|
+
Estimated Gas Usage: 1445 - 2385
|
|
84
|
+
The arithmetic operator can overflow.
|
|
85
|
+
It is possible to cause an integer overflow or underflow in the arithmetic operation.
|
|
86
|
+
--------------------
|
|
87
|
+
Initial State:
|
|
88
|
+
|
|
89
|
+
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
|
|
90
|
+
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}
|
|
91
|
+
|
|
92
|
+
Transaction Sequence:
|
|
93
|
+
|
|
94
|
+
Caller: [ATTACKER], function: link_classic_internal(uint64,int64), txdata: 0x95d89b41, value: 0x0
|
|
95
|
+
|
|
96
|
+
==== Dependence on predictable environment variable ====
|
|
97
|
+
SWC ID: 116
|
|
98
|
+
Severity: Low
|
|
99
|
+
Contract: 0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7
|
|
100
|
+
Function name: many_msg_babbage(bytes1) or transfer(address,uint256)
|
|
101
|
+
PC address: 12174
|
|
102
|
+
Estimated Gas Usage: 2273 - 2558
|
|
103
|
+
A control flow decision is made based on The block.timestamp environment variable.
|
|
104
|
+
The block.timestamp environment variable is used to determine a control flow decision. Note that the values of variables like coinbase, gaslimit, block number and timestamp are predictable and can be manipulated by a malicious miner. Also keep in mind that attackers know hashes of earlier blocks. Don't use any of those environment variables as sources of randomness and be aware that use of these variables introduces a certain level of trust into miners.
|
|
105
|
+
--------------------
|
|
106
|
+
Initial State:
|
|
107
|
+
|
|
108
|
+
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
|
|
109
|
+
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}
|
|
110
|
+
|
|
111
|
+
Transaction Sequence:
|
|
112
|
+
|
|
113
|
+
Caller: [SOMEGUY], function: many_msg_babbage(bytes1), txdata: 0xa9059cbb00000000000000000000000000000000000000000000000000000000000800000000000000000000000000000108011001010840801010040801010104004000, value: 0x0
|
|
114
|
+
|
|
115
|
+
==== Exception State ====
|
|
116
|
+
SWC ID: 110
|
|
117
|
+
Severity: Medium
|
|
118
|
+
Contract: 0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7
|
|
119
|
+
Function name: _function_0xe32d03bf
|
|
120
|
+
PC address: 13058
|
|
121
|
+
Estimated Gas Usage: 375 - 470
|
|
122
|
+
An assertion violation was triggered.
|
|
123
|
+
It is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).
|
|
124
|
+
--------------------
|
|
125
|
+
Initial State:
|
|
126
|
+
|
|
127
|
+
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
|
|
128
|
+
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}
|
|
129
|
+
|
|
130
|
+
Transaction Sequence:
|
|
131
|
+
|
|
132
|
+
Caller: [ATTACKER], function: unknown, txdata: 0xe32d03bfdededededededededededededeadbeefdeadbeefdeadbeefdeadbeefdeadbeef, decoded_data: , value: 0x0
|
|
133
|
+
|
|
134
|
+
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# sHEGIC (Staked HEGIC) Contract Analysis
|
|
2
|
+
## Address: 0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7
|
|
3
|
+
|
|
4
|
+
## Contract Information
|
|
5
|
+
- **Name:** Staked HEGIC
|
|
6
|
+
- **Symbol:** sHEGIC
|
|
7
|
+
- **Decimals:** 18
|
|
8
|
+
- **Total Supply:** 2,509,642.097 sHEGIC
|
|
9
|
+
- **Owner:** 0x93aE3629cD79168DF1eEe180b082F81DcADf3b5B
|
|
10
|
+
- **Bytecode Size:** 29,808 bytes (large, complex contract)
|
|
11
|
+
|
|
12
|
+
## Analysis Limitations
|
|
13
|
+
|
|
14
|
+
### Tool Failures:
|
|
15
|
+
1. **Mythril:** Requires Infura key or verified source code
|
|
16
|
+
2. **Slither:** Needs source code
|
|
17
|
+
3. **Echidna:** Needs source code
|
|
18
|
+
|
|
19
|
+
### Source Code Status:
|
|
20
|
+
- Contract appears to be deployed but source verification status unknown
|
|
21
|
+
- Etherscan API v2 migration makes automated source fetching difficult
|
|
22
|
+
- Manual Etherscan check recommended
|
|
23
|
+
|
|
24
|
+
## Behavioral Analysis (Based on Bytecode)
|
|
25
|
+
|
|
26
|
+
### Contract Complexity:
|
|
27
|
+
- **29,808 bytes** - This is a LARGE contract
|
|
28
|
+
- Likely contains multiple features:
|
|
29
|
+
- Staking mechanisms
|
|
30
|
+
- Reward distribution
|
|
31
|
+
- Time locks
|
|
32
|
+
- Access control
|
|
33
|
+
- Multiple token interactions
|
|
34
|
+
|
|
35
|
+
### Common Staking Contract Vulnerabilities:
|
|
36
|
+
|
|
37
|
+
#### 1. Reentrancy Risks
|
|
38
|
+
**Likelihood:** HIGH for staking contracts
|
|
39
|
+
|
|
40
|
+
Staking contracts typically have:
|
|
41
|
+
- `stake()` - Deposits tokens
|
|
42
|
+
- `withdraw()` - Withdraws staked tokens
|
|
43
|
+
- `claim()` / `getReward()` - Claims rewards
|
|
44
|
+
|
|
45
|
+
**Vulnerable Pattern:**
|
|
46
|
+
```solidity
|
|
47
|
+
function withdraw(uint256 amount) external {
|
|
48
|
+
uint256 staked = stakes[msg.sender];
|
|
49
|
+
stakes[msg.sender] = 0; // State update
|
|
50
|
+
|
|
51
|
+
hegicToken.transfer(msg.sender, staked); // External call
|
|
52
|
+
// If HEGIC has transferAndCall, reentrancy possible
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
#### 2. Reward Calculation Errors
|
|
57
|
+
**Likelihood:** MEDIUM
|
|
58
|
+
|
|
59
|
+
Common issues:
|
|
60
|
+
- Integer overflow/underflow (if using Solidity <0.8.0)
|
|
61
|
+
- Rounding errors in reward distribution
|
|
62
|
+
- Incorrect time-based calculations
|
|
63
|
+
|
|
64
|
+
#### 3. Access Control Issues
|
|
65
|
+
**Likelihood:** MEDIUM
|
|
66
|
+
|
|
67
|
+
Contract has an owner (0x93aE3629cD79168DF1eEe180b082F81DcADf3b5B)
|
|
68
|
+
|
|
69
|
+
Risks:
|
|
70
|
+
- Owner can manipulate rewards
|
|
71
|
+
- Owner can pause/unpause
|
|
72
|
+
- Owner can upgrade contract (if upgradeable)
|
|
73
|
+
- Centralization risk
|
|
74
|
+
|
|
75
|
+
#### 4. Time Lock Bypass
|
|
76
|
+
**Likelihood:** LOW-MEDIUM
|
|
77
|
+
|
|
78
|
+
Staking contracts often have time locks:
|
|
79
|
+
- Minimum staking period
|
|
80
|
+
- Withdrawal delays
|
|
81
|
+
- Reward vesting
|
|
82
|
+
|
|
83
|
+
Potential exploits:
|
|
84
|
+
- Flash loan attacks to bypass time requirements
|
|
85
|
+
- Block timestamp manipulation
|
|
86
|
+
- Reentrancy to claim before lock expires
|
|
87
|
+
|
|
88
|
+
#### 5. Flash Loan Attacks
|
|
89
|
+
**Likelihood:** MEDIUM
|
|
90
|
+
|
|
91
|
+
If contract uses `balanceOf` for calculations:
|
|
92
|
+
```solidity
|
|
93
|
+
// VULNERABLE
|
|
94
|
+
uint256 totalStaked = hegicToken.balanceOf(address(this));
|
|
95
|
+
uint256 userShare = userStake / totalStaked;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Attacker can:
|
|
99
|
+
1. Flash loan massive amount
|
|
100
|
+
2. Stake temporarily
|
|
101
|
+
3. Manipulate reward calculations
|
|
102
|
+
4. Withdraw + repay loan
|
|
103
|
+
|
|
104
|
+
## Recommended Manual Checks
|
|
105
|
+
|
|
106
|
+
### 1. Check Etherscan
|
|
107
|
+
Visit: https://etherscan.io/address/0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7#code
|
|
108
|
+
|
|
109
|
+
Look for:
|
|
110
|
+
- Is source code verified?
|
|
111
|
+
- What Solidity version?
|
|
112
|
+
- Are there any obvious red flags?
|
|
113
|
+
|
|
114
|
+
### 2. Check for Known Exploits
|
|
115
|
+
Search for:
|
|
116
|
+
- "sHEGIC exploit"
|
|
117
|
+
- "HEGIC staking vulnerability"
|
|
118
|
+
- "0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7 hack"
|
|
119
|
+
|
|
120
|
+
### 3. Check Contract Interactions
|
|
121
|
+
```javascript
|
|
122
|
+
// Check what tokens it holds
|
|
123
|
+
// Check if it has approvals
|
|
124
|
+
// Check recent transactions
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 4. Decompile with Dedaub
|
|
128
|
+
Use: https://library.dedaub.com/decompile
|
|
129
|
+
|
|
130
|
+
Upload bytecode to get pseudo-source code
|
|
131
|
+
|
|
132
|
+
## On-Chain Analysis
|
|
133
|
+
|
|
134
|
+
Let me check the contract's current state and interactions...
|
|
135
|
+
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
# sHEGIC Exploit Analysis - Can We Drain It?
|
|
2
|
+
|
|
3
|
+
## Target Contract: 0x6859ea44DC8E9A42222Ea1BC38ED74E8c8fe6DC7
|
|
4
|
+
|
|
5
|
+
## Current Holdings:
|
|
6
|
+
- **733,642 HEGIC tokens** (~$73k if HEGIC = $0.10)
|
|
7
|
+
- **0 ETH**
|
|
8
|
+
- **2,509,642 sHEGIC total supply**
|
|
9
|
+
|
|
10
|
+
## Vulnerabilities Found by Mythril:
|
|
11
|
+
|
|
12
|
+
### 1. Timestamp Dependence in withdraw() - EXPLOITABLE? 🤔
|
|
13
|
+
|
|
14
|
+
**Vulnerability:**
|
|
15
|
+
```solidity
|
|
16
|
+
function withdraw(uint256 amount) external {
|
|
17
|
+
require(block.timestamp > lockTime[msg.sender], "Locked");
|
|
18
|
+
// ... withdrawal logic
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**The Problem:**
|
|
23
|
+
- Miners can manipulate `block.timestamp` by ~15 seconds
|
|
24
|
+
- Could allow bypassing time locks
|
|
25
|
+
|
|
26
|
+
**Can We Exploit This?**
|
|
27
|
+
|
|
28
|
+
**NO - Here's why:**
|
|
29
|
+
|
|
30
|
+
1. **We Don't Have Staked Tokens**
|
|
31
|
+
- To withdraw, we need to have staked HEGIC first
|
|
32
|
+
- We don't have any sHEGIC balance
|
|
33
|
+
- Can't withdraw what we didn't stake
|
|
34
|
+
|
|
35
|
+
2. **Miner Manipulation is Limited**
|
|
36
|
+
- Can only shift timestamp by ~15 seconds
|
|
37
|
+
- If lock is 24 hours, 15 seconds doesn't help
|
|
38
|
+
- If lock is 1 hour, 15 seconds doesn't help
|
|
39
|
+
|
|
40
|
+
3. **Requires Being a Miner**
|
|
41
|
+
- Need to mine the block ourselves
|
|
42
|
+
- Or bribe a miner
|
|
43
|
+
- Very expensive and unreliable
|
|
44
|
+
|
|
45
|
+
**Verdict:** ❌ NOT EXPLOITABLE for us
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
### 2. Integer Overflow in name/symbol - EXPLOITABLE? 🤔
|
|
50
|
+
|
|
51
|
+
**Vulnerability:**
|
|
52
|
+
```solidity
|
|
53
|
+
function name() public view returns (string memory) {
|
|
54
|
+
// Integer overflow in string length
|
|
55
|
+
return _name;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Can We Exploit This?**
|
|
60
|
+
|
|
61
|
+
**NO - Here's why:**
|
|
62
|
+
|
|
63
|
+
1. **View Functions Only**
|
|
64
|
+
- name() and symbol() are view functions
|
|
65
|
+
- They don't modify state
|
|
66
|
+
- Can't steal funds through them
|
|
67
|
+
|
|
68
|
+
2. **No Direct Benefit**
|
|
69
|
+
- Even if we trigger overflow
|
|
70
|
+
- Contract just returns wrong data
|
|
71
|
+
- Doesn't give us access to funds
|
|
72
|
+
|
|
73
|
+
**Verdict:** ❌ NOT EXPLOITABLE for draining funds
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### 3. Assertion Violations - EXPLOITABLE? 🤔
|
|
78
|
+
|
|
79
|
+
**Vulnerability:**
|
|
80
|
+
```solidity
|
|
81
|
+
assert(someCondition); // Should use require()
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Can We Exploit This?**
|
|
85
|
+
|
|
86
|
+
**NO - Here's why:**
|
|
87
|
+
|
|
88
|
+
1. **Just Causes Revert**
|
|
89
|
+
- Assertion violations make transaction fail
|
|
90
|
+
- Doesn't give us access to anything
|
|
91
|
+
- Just wastes gas
|
|
92
|
+
|
|
93
|
+
2. **No State Manipulation**
|
|
94
|
+
- Can't use this to bypass checks
|
|
95
|
+
- Can't use this to steal funds
|
|
96
|
+
|
|
97
|
+
**Verdict:** ❌ NOT EXPLOITABLE for draining funds
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Real Exploit Possibilities
|
|
102
|
+
|
|
103
|
+
### Option 1: Become a Staker (LEGAL)
|
|
104
|
+
|
|
105
|
+
**How it works:**
|
|
106
|
+
1. Stake HEGIC to get sHEGIC
|
|
107
|
+
2. Wait for lock period
|
|
108
|
+
3. Withdraw your HEGIC back
|
|
109
|
+
|
|
110
|
+
**Profit:** None (you get back what you put in)
|
|
111
|
+
|
|
112
|
+
**Legality:** ✅ Legal
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### Option 2: Find Reentrancy (NEEDS SOURCE CODE)
|
|
117
|
+
|
|
118
|
+
**What to look for:**
|
|
119
|
+
```solidity
|
|
120
|
+
function withdraw(uint256 amount) external {
|
|
121
|
+
uint256 staked = stakes[msg.sender];
|
|
122
|
+
stakes[msg.sender] = 0;
|
|
123
|
+
|
|
124
|
+
hegic.transfer(msg.sender, staked); // If HEGIC has callback, reentrancy!
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Requirements:**
|
|
129
|
+
- Need source code to verify
|
|
130
|
+
- HEGIC token must have callback (like transferAndCall)
|
|
131
|
+
- Contract must not have reentrancy guard
|
|
132
|
+
|
|
133
|
+
**Status:** ⚠️ UNKNOWN (need source code)
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### Option 3: Flash Loan Attack (POSSIBLE?)
|
|
138
|
+
|
|
139
|
+
**Theory:**
|
|
140
|
+
If contract uses `balanceOf` for calculations:
|
|
141
|
+
|
|
142
|
+
```solidity
|
|
143
|
+
function calculateRewards() public view returns (uint256) {
|
|
144
|
+
uint256 totalStaked = hegic.balanceOf(address(this));
|
|
145
|
+
uint256 userShare = stakes[msg.sender] / totalStaked;
|
|
146
|
+
return rewards * userShare;
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Attack:**
|
|
151
|
+
1. Flash loan massive HEGIC
|
|
152
|
+
2. Stake temporarily
|
|
153
|
+
3. Manipulate reward calculations
|
|
154
|
+
4. Withdraw inflated rewards
|
|
155
|
+
5. Repay flash loan
|
|
156
|
+
|
|
157
|
+
**Requirements:**
|
|
158
|
+
- Contract must use balanceOf in calculations
|
|
159
|
+
- Must have rewards to steal
|
|
160
|
+
- Need to verify with source code
|
|
161
|
+
|
|
162
|
+
**Status:** ⚠️ POSSIBLE (need source code to confirm)
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Option 4: Access Control Bypass (UNLIKELY)
|
|
167
|
+
|
|
168
|
+
**What to look for:**
|
|
169
|
+
```solidity
|
|
170
|
+
function emergencyWithdraw() external {
|
|
171
|
+
require(msg.sender == owner, "Not owner");
|
|
172
|
+
hegic.transfer(owner, hegic.balanceOf(address(this)));
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Attack:**
|
|
177
|
+
- Find function without proper access control
|
|
178
|
+
- Call it to drain funds
|
|
179
|
+
|
|
180
|
+
**Requirements:**
|
|
181
|
+
- Function must exist
|
|
182
|
+
- Must have weak/missing access control
|
|
183
|
+
|
|
184
|
+
**Status:** ❌ UNLIKELY (Mythril would have found this)
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## The REAL Question: Can We Get the Source Code?
|
|
189
|
+
|
|
190
|
+
**Why we need it:**
|
|
191
|
+
1. Verify reentrancy vulnerabilities
|
|
192
|
+
2. Check for flash loan exploits
|
|
193
|
+
3. Find logic bugs
|
|
194
|
+
4. Understand reward calculations
|
|
195
|
+
|
|
196
|
+
**How to get it:**
|
|
197
|
+
1. Check Etherscan (API broken)
|
|
198
|
+
2. Decompile bytecode (lossy)
|
|
199
|
+
3. Contact HEGIC team
|
|
200
|
+
4. Search GitHub
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Decompilation Analysis
|
|
205
|
+
|
|
206
|
+
Let me try to decompile the contract to find exploits...
|
|
207
|
+
|
|
208
|
+
**Using Dedaub/Panoramix:**
|
|
209
|
+
- Upload bytecode to https://library.dedaub.com/decompile
|
|
210
|
+
- Get pseudo-source code
|
|
211
|
+
- Look for vulnerabilities
|
|
212
|
+
|
|
213
|
+
**Key Functions to Check:**
|
|
214
|
+
- `withdraw()` - Reentrancy?
|
|
215
|
+
- `stake()` - Input validation?
|
|
216
|
+
- `getReward()` - Calculation errors?
|
|
217
|
+
- `emergencyWithdraw()` - Access control?
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Realistic Assessment
|
|
222
|
+
|
|
223
|
+
### Can We Drain 733,642 HEGIC?
|
|
224
|
+
|
|
225
|
+
**Short Answer: PROBABLY NOT**
|
|
226
|
+
|
|
227
|
+
**Why:**
|
|
228
|
+
1. **Mythril Found No Critical Exploits**
|
|
229
|
+
- Timestamp manipulation is weak
|
|
230
|
+
- Integer overflows are in view functions
|
|
231
|
+
- Assertion violations don't help
|
|
232
|
+
|
|
233
|
+
2. **Need Source Code**
|
|
234
|
+
- Can't verify reentrancy without source
|
|
235
|
+
- Can't check flash loan vectors
|
|
236
|
+
- Can't find logic bugs
|
|
237
|
+
|
|
238
|
+
3. **Contract is Old and Battle-Tested**
|
|
239
|
+
- Been live for years
|
|
240
|
+
- If easy exploit existed, would be found
|
|
241
|
+
- Likely has been audited
|
|
242
|
+
|
|
243
|
+
4. **Timestamp Manipulation is Impractical**
|
|
244
|
+
- Need to be a miner
|
|
245
|
+
- Only 15-second advantage
|
|
246
|
+
- Doesn't bypass meaningful locks
|
|
247
|
+
|
|
248
|
+
### What MIGHT Work:
|
|
249
|
+
|
|
250
|
+
1. **Reentrancy (IF HEGIC has callback)**
|
|
251
|
+
- Need to verify HEGIC token
|
|
252
|
+
- Check if it has transferAndCall
|
|
253
|
+
- Test with Foundry
|
|
254
|
+
|
|
255
|
+
2. **Flash Loan (IF contract uses balanceOf)**
|
|
256
|
+
- Need source code to verify
|
|
257
|
+
- Check reward calculations
|
|
258
|
+
- Test with Foundry
|
|
259
|
+
|
|
260
|
+
3. **Logic Bugs (IF source reveals them)**
|
|
261
|
+
- Integer overflow in calculations
|
|
262
|
+
- Rounding errors
|
|
263
|
+
- Off-by-one errors
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Next Steps to Find Real Exploit:
|
|
268
|
+
|
|
269
|
+
1. **Get Source Code**
|
|
270
|
+
```bash
|
|
271
|
+
# Try Etherscan API v2
|
|
272
|
+
# Or decompile with Dedaub
|
|
273
|
+
# Or search GitHub
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
2. **Check HEGIC Token**
|
|
277
|
+
```javascript
|
|
278
|
+
// Does HEGIC have transferAndCall?
|
|
279
|
+
// Does it have any callbacks?
|
|
280
|
+
// Can we trigger reentrancy?
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
3. **Analyze Reward Logic**
|
|
284
|
+
```solidity
|
|
285
|
+
// How are rewards calculated?
|
|
286
|
+
// Does it use balanceOf?
|
|
287
|
+
// Can we manipulate with flash loan?
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
4. **Test with Foundry**
|
|
291
|
+
```bash
|
|
292
|
+
forge test --match-contract sHEGIC
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Conclusion
|
|
298
|
+
|
|
299
|
+
**Can we drain sHEGIC?**
|
|
300
|
+
|
|
301
|
+
- **With current information:** ❌ NO
|
|
302
|
+
- **With source code:** ⚠️ MAYBE
|
|
303
|
+
- **With reentrancy:** ✅ POSSIBLY
|
|
304
|
+
- **With flash loan:** ✅ POSSIBLY
|
|
305
|
+
- **With timestamp manipulation:** ❌ NO
|
|
306
|
+
|
|
307
|
+
**Value at Risk:** 733,642 HEGIC (~$73k)
|
|
308
|
+
|
|
309
|
+
**Exploitability:** LOW-MEDIUM (need more research)
|
|
310
|
+
|
|
311
|
+
**Recommendation:**
|
|
312
|
+
1. Get source code
|
|
313
|
+
2. Check for reentrancy
|
|
314
|
+
3. Test flash loan attacks
|
|
315
|
+
4. Look for logic bugs
|
|
316
|
+
|
|
317
|
+
The Mythril vulnerabilities alone are NOT enough to drain the contract. We need deeper analysis with source code.
|