The Z Institute
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me 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

      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.
      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
    • Save as template
    • 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 Create Help
Create Create new note Create a note from template
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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me 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

    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.
    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
    # The Z Institute DeFi 第二屆開學典禮共筆 ## 開學典禮投影片 * 連結:https://bit.ly/DeFI-batch2OpeningCeremony ## 入學考解說 **第一題:所有智能合約一旦部署後無法升級** ![](https://i.imgur.com/3LAkDEg.png) 解答: * 原則上,區塊鏈上的部署的智能合約確實是不可逆與不可篡改的 ![](https://i.imgur.com/MfThItH.jpg) * 然而,目前主流的做法為部署代理合約(Proxy Smart Contract)與執行合約(Implementation Contract),通過代理合約去調用執行合約 * 當有需要升級智能合約時,開發者可以部署新的執行合約,然後將代理合約的調用合約地址修改為新的執行合約,就可以實現可升級智能合約(Upgradable Smart Contract) * 例如:Polygon 上 AAVE LendingPool 的代理合約為 [0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf](https://polygonscan.com/address/0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf#readProxyContract),而真正執行借貸池邏輯與功能的智能合約為[0x6a8730f54b8c69ab096c43ff217ca0a350726ac7](https://polygonscan.com/address/0x6a8730f54b8c69ab096c43ff217ca0a350726ac7#readContract) <br> **第二題:如果你想在以太坊上做數據分析,你可以使用以下那個?** ![](https://i.imgur.com/Lcham2S.png) 解答: * Google BigQuery 是 Google Cloud Platform 底下的一個雲數據倉庫以及數據分析服務 * 2018年開始,Google 就宣佈了Google BigQuery 將整合以太坊上的數據,並做出了當年超夯的[Cyrpto Kitties](https://thenextweb.com/news/ethereum-google-bigquery-data)的可視化譜系圖 * Etherscan 是以太坊上最著名的以及最常用的區塊鏈瀏覽器 * Etherscan 的團隊也開發了其他的區塊鏈瀏覽器,如:[BSCscan](https://bscscan.com/),[ftmscan](https://ftmscan.com/),[Snowtrace(Avalanche)](https://snowtrace.io/),[Arbiscan](https://arbiscan.io/),[Optimistic.etherscan](https://optimistic.etherscan.io/),[Polygonscan](https://polygonscan.com/)等等 * Etherscan 將許多以太坊鏈上的數據做出整理,開發者可以通過 API 調用數據 * The Graph 是一個區塊鏈基礎設施類型的項目,常被譽為“區塊鏈上的Google”,通過有效的獎勵機制建立去中心化的鏈上數據整理以及索引 * The Graph網絡上的各種角色: * Curator 監護者:給予鏈上數據與資料評分,引導Indexer去整理以及建立特定鏈上數據的索引,所建議的資料被引用的次數越高,收益也越高。 * Indexer 索引者:負責收錄以及建立鏈上數據的索引,並賺取部分網絡上的手續費做為收入。若 Indexer 提供錯誤的數據索引,其所質押的將被罰沒 * Fisherman 漁夫:在索引者提供錯誤或惡意的數據索引時,漁夫將質押本身代幣並提出挑戰,若獲挑戰成功將獲得該索引者質押的部分代幣 * Arbitrator 仲裁者:在網絡上出現爭議時,提供判斷與裁決 **第三題:以下哪項運作的成本最高?** ![](https://i.imgur.com/YwPx1Vw.png) * 在以太坊以及EVM公鏈中,Gas 意味著執行操作所需要花費的鏈上計算量,而 Gas Fee 則是用戶願意為 1 Gas 計算量所支付的費用,一般上以 Gwei 來計算(1 gwei = 0.000000001 ETH) * 常見操作所需的Gas * 轉移ETH(或對應EVM鏈的原生幣):21,000 Gas * 轉移ERC20代幣 :約35,000-65,000 Gas * Uniswap上的swap:約130,000-20,0000 Gas * 鑄造NFT:約150,000 - 220,000 Gas,取決於該NFT合約鑄造邏輯的計算量 * 部署智能合約:取決於智能合約的代碼量與複雜度,以AAVE的在Polygon上的LendingPool智能合約為例,花費為4,795,040 Gas * 中心化交易所交易:不需要 Gas **學員問題** * 第三方的網站檢視地址授權: debank.com 連接錢包,在Approval角落即可看到該地址曾經授權的智能合約 ## Week 0 作業 * 作業連結:https://bit.ly/z-defi-batch2-hw0 * Defi-Portfolio 說明: https://bit.ly/z-defi-portfolio

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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