交易所对比
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
        • Sharing URL Link copied
        • /edit
        • View mode
          • Edit mode
          • View mode
          • Book mode
          • Slide mode
          Edit mode View mode Book mode Slide mode
        • Customize slides
        • Note Permission
        • Read
          • Owners
          • Signed-in users
          • Everyone
          Owners Signed-in users Everyone
        • Write
          • Owners
          • Signed-in users
          • Everyone
          Owners Signed-in users Everyone
        • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invite by email
        Invitee

        This note has no invitees

      • Publish Note

        Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

        Your note will be visible on your profile and discoverable by anyone.
        Your note is now live.
        This note is visible on your profile and discoverable online.
        Everyone on the web can find and read all notes of this public team.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        See published notes
        Unpublish note
        Please check the box to agree to the Community Guidelines.
        View profile
      • Commenting
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Suggest edit
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
      • Emoji Reply
      • Enable
      • Versions and GitHub Sync
      • Note settings
      • Note Insights New
      • Engagement control
      • Make a copy
      • Transfer ownership
      • Delete this note
      • Insert from template
      • Import from
        • Dropbox
        • Google Drive
        • Gist
        • Clipboard
      • Export to
        • Dropbox
        • Google Drive
        • Gist
      • Download
        • Markdown
        • HTML
        • Raw HTML
    Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
    Menu
    Options
    Engagement control Make a copy Transfer ownership Delete this note
    Import from
    Dropbox Google Drive Gist Clipboard
    Export to
    Dropbox Google Drive Gist
    Download
    Markdown HTML Raw HTML
    Back
    Sharing URL Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Customize slides
    Note Permission
    Read
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 像 Web3“牛皮癬”病毒式傳播,從安全視角看近期刷屏的 xPet 專案 :::success 🎓 **新手必讀** | 安全購買加密貨幣的第一步 [**幣安(Binance)**](https://www.binance.com/zh-TW/join?ref=B2345) 是全球交易量第一的加密貨幣交易所,支援繁體中文介面及多種法幣出入金方式。 🎁 **專屬福利**:透過本頁連結註冊,永久享有 [**20%手續費減免**](https://www.binance.com/zh-TW/join?ref=B2345) ::: > 📝 **摘要**:xPet 近期在 Web3 爆紅,結合 GameFi 與 Twitter 任務,已累積 2785 ETH 資金。Beosin 安全團隊發現其升級合約未開源、權限過於集中及儲存槽衝突等風險,建議採用多簽、延遲機制及嚴格初始化,以防資金被盜。 🏷️ **關鍵詞**:`xPet` | `Web3` | `GameFi` | `合約安全` | `Arbitrum` | `鏈上遊戲` | `加密資金安全` | `牛皮癬病毒式傳播` [TOC] ![像 Web3“牛皮癬”病毒式傳播,從安全視角看近期刷屏的 xPet 專案](https://basebiance.com/content/images/2024/07/image-336_-5107216084427560968.png) ## 像 Web3「牛皮癬」病毒式傳播——從安全視角看近期刷屏的 xPet 專案 **相關標籤**:#xPet #Web3 #GameFi #合約安全 #Arbitrum --- ### 一文解析 xPet 專案的安全風險 **封面** ![](https://basebiance.com/content/images/2024/07/image-336_-5107216084427560968.png) 近期,鏈上遊戲 **xPet** 在 Twitter 上迅速走紅,甚至被形容為 Web3「牛皮癬」般的病毒式傳播,使用者與關注者數量呈爆炸式成長。作為結合 **GameFi** 與社交功能的早期專案,xPet 在上線僅兩週即吸引大量目光,合約中已累積 **2785 ETH(約 658 萬美元)** 的資金。 > 💡 **交易小貼士**:本文提到的加密貨幣均可在 [幣安交易所](https://www.binance.com/zh-TW/join?ref=B2345) 直接搜尋交易,新用戶可享 [20%費率優惠](https://www.binance.com/zh-TW/join?ref=B2345)。 然而,隨著熱度飆升,安全問題同樣不容忽視。為協助使用者了解潛在風險,**Beosin 安全團隊** 針對 xPet 的機制設計與合約程式碼進行了深度分析,以下將逐一揭露其中的安全隱憂。 --- ## xPet 機制分析 ![](https://basebiance.com/content/images/2024/07/image-335_1490899482311472958.png) xPet 是一款基於 **Arbitrum** 的寵物養成遊戲,玩法結合了 **Tipcoin** 與先前在 Base 鏈爆紅的 **Fren Pet**,透過餵養寵物升級、完成推特任務以獲取獎勵。與類似專案不同的是,xPet 以 **瀏覽器外掛** 形式上線,使用者必須綁定 Twitter 帳號登入,所有遊戲任務與獎勵亦與 Twitter 完全掛鉤。 - **官網**:<https://www.xpet.tech/> - **主要玩法**: 1. 餵養寵物、升級工廠 2. 完成推特任務領取寶箱 3. 當寵物等級達到 **7 級** 時,可產出 **$Berry**,再於工廠換成 **$BPET** 以獲利 ### 遊戲經濟模型 使用者需先存入 ETH 作為抵押,藉此借出 **$XPET**($XPET 與 $BPET 可 1:1 兌換)或在 **XPET‑ETH** 交易池直接購買 $XPET。升級寵物時,玩家可選擇支付 **$XPET** 或 **$BPET**。以下圖示說明了整體經濟流向: ![](https://basebiance.com/content/images/2024/07/image-334_-4639735047441264600.png) *來源:Beosin* --- ## xPet 合約分析 ### 合約概覽 | 合約類型 | 合約地址 | 說明 | |---|---|---| | 主代理合約(ERC1967) | `0x1B0D12879960A768D02bd223ef735D4231a15348` | 負責 ETH 與 $XPET 的借貸邏輯 | | 主邏輯合約(未公開) | `0xcD4420B70e2669De8dE9d62dd7fEa4D19b320768` | 可升級合約的實際實作 | | $XPET 代幣合約 | `0x00cbcf7b3d37844e44b888bc747bdd75fcf4e555` | ERC20 + AccessControl | | $BPET 代幣合約 | `0x6daf586b7370b14163171544fca24abcc0862ac5` | ERC20 + AccessControl | > **注意**:Beosin 透過 VaaS 工具掃描後,發現以下潛在風險。 ![](https://basebiance.com/content/images/2024/07/image-333_4922561946802307209.png) ### 1. 主合約(可升級合約) - **未開源邏輯合約**:專案方未公開升級後的邏輯程式碼,外部無法驗證是否存在後門或邏輯錯誤。 - **升級權限集中**:若升級權限未妥善限制,攻擊者可能取得合約控制權,導致資金被盜。 #### 可升級合約安全建議(Beosin) 1. **初始化檢查**:部署時務必確認所有依賴合約已正確初始化,避免留下未設定的變數。 2. **儲存槽衝突**:升級時需檢視不同版本之間的儲存布局,防止變數覆寫導致資金錯置。 3. **升級權限限制**:使用多簽或時間延遲機制,將升級權限分散,降低單點失敗風險。 ![](https://basebiance.com/content/images/2024/07/image-332_8410127435215511312.png) ### 2. $XPET 代幣合約 - **中心化管理**:合約將部署者設為唯一管理角色,若該帳號被盜,所有代幣將面臨風險。 - **代幣流動集中**:所有代幣最初鑄造至合約自身,提領與兌換(`withdraw`、`convert`)是唯一的代幣轉移途徑,形成單點瓶頸。 - **缺少事件**:`withdraw` 與 `convert` 未觸發事件,外部監控與審計困難。 ![](https://basebiance.com/content/images/2024/07/image-331_1638281752533062466.png) #### 建議 - 為關鍵函式加入 `emit Transfer` 或自訂事件,提升透明度。 - 引入多簽治理或 DAO 方式分散管理權限。 ### 3. $BPET 代幣合約 - **中心化風險**:同樣將部署者設為管理員與鑄造者,存在單點失陷的危險。 - **無上限鑄造**:`convert` 函式未限制可鑄造代幣數量,若管理者濫發,將嚴重稀釋持有人價值。 - **角色不可撤銷**:合約缺乏撤銷或轉移角色的機制,無法在必要時移除惡意鑄造者。 ![](https://basebiance.com/content/images/2024/07/image-330_-8230725469492109899.png) ![](https://basebiance.com/content/images/2024/07/image-329_-2225197954318974835.png) #### 建議 - 設定鑄造上限或引入通脹模型。 - 實作 `renounceRole` 與 `revokeRole`,確保權限可被安全回收。 ### 4. 其它風險(社群與平台層面) - **推特任務濫用**:xPet 要求使用者在 Twitter 發布含「xPet」關鍵字的評論以獲取獎勵,已導致大量無關回覆,造成社群噪音。 - **違反 Twitter 開發者協議**:該協議明令禁止利用平台產生垃圾資訊。若 Twitter 採取封禁措施,xPet 的推特任務將無法執行,遊戲核心玩法將受到嚴重衝擊。 ![](https://basebiance.com/content/images/2024/07/image-328_7457414637476433828.png) > **Twitter 開發者協議**:禁止使用平台產生垃圾資訊。 --- ## 總結與實用建議 | 風險類別 | 主要問題 | 防範措施 | |---|---|---| | 合約升級 | 未公開邏輯、升級權限集中 | 多簽升級、時間鎖、開源邏輯 | | 代幣中心化 | 管理者單點失陷 | DAO 或多簽治理 | | 鑄造無上限 | 代幣稀釋風險 | 設定上限、通脹模型 | | 事件缺失 | 監控困難 | 為關鍵函式加入事件 | | 社群濫用 | 推特垃圾訊息 | 重新設計任務機制、避免依賴單一平台 | **使用者操作建議** 1. **審慎存入資金**:在合約未公開完整邏輯前,避免大額抵押。 2. **監控合約事件**:自行建立監聽腳本,追蹤 `Transfer`、`Approval` 及自訂事件。 3. **分散投資**:不要將全部資金集中於單一代幣($XPET / $BPET),可考慮同時持有其他 GameFi 項目作為對沖。 4. **關注平台政策**:留意 Twitter 開發者協議更新,若出現封禁警告,應提前評估退出策略。 --- *本文由 Beosin 安全團隊提供的合約分析結果與專業建議彙整而成,僅供參考,投資風險自負。* <https://developer.twitter.com/en/developer-terms/policy> #### **總結** xPet 專案的**核心邏輯合約未開源,兩種代幣的合約中心化風險明顯,對於鑄造新代幣未進行特別的許可權限制**,使用者需要注意相關風險。部分合約程式碼可以進一步提升安全性。在此之前,市場已出現過多次 GameFi、SocialFi 的熱潮,**使用者應當做好資金管理和專案調研,在充分了解專案的風險後理性參與**。 **免責宣告:**作為區塊鏈資訊平臺,本站所釋出文章僅代表作者及嘉賓個人觀點,與 Web3Caff 立場無關。文章內的資訊僅供參考,均不構成任何投資建議及要約,並請您遵守所在國家或地區的相關法律法規。 --- ### 📚 相關閱讀 - [賬戶抽象錢包體驗:2025年數字資產管理的神經重構革命](https://hackmd.io/@zixunzhantw/zhang-hu-chou-xiang-qian-bao-ti-yan-2025nian-shu-zi-zi-chan-guan-li-de-shen-jing) - [web3.0社交媒體發展如何?2023年Web3.0的五大發展趨勢](https://hackmd.io/@zixunzhantw/web3-0she-jiao-mei-ti-fa-zhan-ru-he-2023nian-web3-0de-wu-da-fa-zhan-qu-shi) - [去中心化儲存:重塑數字時代的記憶宮殿](https://hackmd.io/qu-zhong-xin-hua-chu-cun-zhong-su-shu-zi-shi-dai-de-ji-yi-gong-dian) --- ## 📱 幣安APP下載 無法存取應用商店?直接下載官方安裝包: | 版本 | 適用地區 | 下載連結 | |:---:|:---:|:---| | 亞洲版 | 🌏 亞太地區 | [立即下載](https://basebiance.com/binanceappcn) | | 國際版 | 🌍 海外/VPN | [立即下載](https://download.binance.com/pack/BNApp_F0000889.apk?utm_medium=web_share_copy) | > ⚠️ **安全提示**:請只從官方管道下載,謹防釣魚APP盜取資產! --- <div align="center"> [![立即註冊幣安](https://img.shields.io/badge/🚀_立即註冊幣安-領取20%25手續費減免-F0B90B?style=for-the-badge)](https://www.binance.com/zh-TW/join?ref=B2345) </div> --- ## 📌 推薦工具與平台 | 平台 | 類型 | 主要優勢 | 連結 | |:---|:---:|:---|:---| | [**幣安 Binance**](https://www.binance.com/zh-TW/join?ref=B2345) | CEX | 交易量最大、流動性最佳 | [永久20%手續費減免](https://www.binance.com/zh-TW/join?ref=B2345) | | [**歐易 OKX**](https://basebiance.com/okex) | CEX | Web3錢包強大 | [註冊領盲盒](https://basebiance.com/okex) | > ⚠️ **風險提示**:加密貨幣價格波動較大,請根據自身情況謹慎投資。投資有風險,入市需謹慎。 --- --- ### 👨‍💻 關於作者 **ETH資訊** 專注於區塊鏈深度內容與投資分析。 👉 [關注我們的 Twitter](https://twitter.com/tanfyoo) 獲取最新空投與行情資訊。 --- <center>📅 2026-02-27 10:50 | 💡 本文僅供參考,不構成投資建議</center>

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully