---
title: "什么是 智能合约？"
canonical: https://wavect.io/zh/glossary/smart-contract/
language: zh
description: "运行在区块链上的代码，确定性执行，一经部署便不可更改（除非你设计成可升级）。"
image: "https://wavect.io/img/general/bak/open_graph_preview.jpg"
---

技术

# 智能合约

运行在区块链上的代码，确定性执行，一经部署便不可更改（除非你设计成可升级）。

最近审阅: 2026-05-24 审阅人 [Kevin Riedl](/zh/team/kevin-riedl/) [wiki ↗](https://www.wikidata.org/wiki/Q139796365)

智能合约是被部署到一条区块链上的程序。一经部署，它的字节码不可变，它的状态对公众可读，它的执行由没人能凌驾的共识规则治理。这种永久性既是特性也是风险：生产里的 Bug 永远是 Bug，除非你内置了升级机制（而升级机制本身就是一个漏洞面）。

多数生产级智能合约系统不是单一合约，而是一组：一个 Proxy 实现可升级，一个 Implementation 合约承载逻辑，常常还有一个访问控制合约承载治理。这种模式对任何做过版本化 API 的人来说都不陌生；只是出错的代价更高。

为什么部署纪律不同于普通软件，举个实际例子：在一个 SaaS 后端发布一个 Bug，你打个补丁、一小时内重新部署。在一个持有用户资金的合约里发布一个重入 Bug，攻击者能在你反应过来之前把它掏空，因为没有回滚，而且价值从第一个区块起就在线。这就是为什么问题不是「我们要不要审计」，而是「我们如何安全地结构化升级」。常见答案是把 Proxy 模式放在一个时间锁和一个多签之后：即时升级权威是一个单点故障，没有升级路径让你被第一个 Bug 困死，而对用户透明的时间锁升级是大多数生产系统收敛到的中间地带。

诚实的取舍与创始人常犯的错误：创始人把合约当作一个功能、把审计当作一个可选的报价项。对任何持有非琐碎价值的合约，审计是你能买到的最便宜的保险，通常是 Build 预算里的 1 到 2 周，对着全部在险价值。Wavect 用 Solidity 写 [EVM](/zh/glossary/evm/) 链上的合约，用 Rust 写 [Solana](/zh/glossary/solana/) 、Near 和 ICP 上的合约，而语言是「你的 [web3](/zh/glossary/web3/) 用例要求哪条链」的下游产物，不是一种偏好。我们建议在主网之前对任何要紧的东西做第三方审计，我们也已经把审计过的合约部署到生产。跳过审计，正是团队以昂贵的方式学到这一课的方式。

// FAQ

## 常见问题

### 我真的需要审计吗？

对任何持有非琐碎价值的合约：需要。审计成本通常是 Build 预算的 1 到 2 周。跳过它，是丢掉合约所持有全部价值的最便宜方式之一。保险和漏洞赏金是补充，不是替代。

### Solidity 还是 Rust？

EVM 链（Ethereum、Polygon、Arbitrum、Optimism、Base）用 Solidity。Solana、Near 和 ICP 用 Rust。这个选择是哪条链匹配你用例的下游产物；语言是一种约束，不是一种偏好。

### 你们怎么安全地处理可升级性？

在管理员密钥上加时间锁和多签的 Proxy 模式。即时升级权是一个单点故障；没有升级路径则让你被第一个 Bug 困死。那个中间地带（对用户透明的、带时间锁的升级）正是大多数生产系统收敛到的做法。

相关术语

- [Web3](/zh/glossary/web3/)
- [EVM](/zh/glossary/evm/)
- [Solana](/zh/glossary/solana/)
- [Account Abstraction](/zh/glossary/account-abstraction/)
- [Zero-Knowledge](/zh/glossary/zero-knowledge/)

相关服务

- [区块链](/zh/services/blockchain/)

相关案例研究

- [LightBridge](/zh/case-studies/lightbridge/)
- [Scramble Pay](/zh/case-studies/scramble-pay/)
- [ZybraMoney](/zh/case-studies/zybra-money/)

相关指南

- [如何挑选软件开发公司](/zh/software-development-guide/how-to-choose-a-software-agency/)

聊聊

## Structured Data

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://wavect.io/#organization",
      "@type": [
        "Organization",
        "ProfessionalService",
        "LocalBusiness"
      ],
      "employee": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "founder": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "legalRepresentative": [
        {
          "@id": "https://wavect.io/team/kevin-riedl/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Kevin Riedl",
          "url": "https://wavect.io/team/kevin-riedl/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        },
        {
          "@id": "https://wavect.io/team/christof-jori/#person",
          "@type": "Person",
          "jobTitle": "Managing Director",
          "name": "Christof Jori",
          "url": "https://wavect.io/team/christof-jori/",
          "worksFor": {
            "@id": "https://wavect.io/#organization",
            "@type": [
              "Organization",
              "ProfessionalService",
              "LocalBusiness"
            ]
          }
        }
      ],
      "name": "Wavect GmbH",
      "subjectOf": {
        "@id": "https://wavect.io/verified-claims.json#dataset",
        "@type": "Dataset",
        "creator": {
          "@id": "https://wavect.io/#organization",
          "@type": [
            "Organization",
            "ProfessionalService",
            "LocalBusiness"
          ]
        },
        "description": "A machine-readable registry of quantitative and qualitative claims published by Wavect, with review dates, localized page appearances and public third-party citations where available.",
        "inLanguage": "en",
        "isAccessibleForFree": true,
        "license": "https://creativecommons.org/licenses/by/4.0/",
        "name": "Wavect verified publication claims",
        "url": "https://wavect.io/verified-claims.json"
      },
      "url": "https://wavect.io/"
    },
    {
      "@id": "https://wavect.io/team/kevin-riedl/#person",
      "@type": "Person",
      "jobTitle": "Managing Director",
      "name": "Kevin Riedl",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q139796365",
        "https://www.linkedin.com/in/wsdt",
        "https://github.com/wsdt"
      ],
      "url": "https://wavect.io/team/kevin-riedl/",
      "worksFor": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      }
    },
    {
      "@id": "https://wavect.io/team/christof-jori/#person",
      "@type": "Person",
      "jobTitle": "Managing Director",
      "name": "Christof Jori",
      "sameAs": [
        "https://www.wikidata.org/wiki/Q139796367",
        "https://www.linkedin.com/in/jocr77/",
        "https://github.com/jo-chris"
      ],
      "url": "https://wavect.io/team/christof-jori/",
      "worksFor": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      }
    },
    {
      "@id": "https://wavect.io/#website",
      "@type": "WebSite",
      "inLanguage": [
        "en",
        "de",
        "es",
        "zh"
      ],
      "name": "Wavect",
      "potentialAction": {
        "@type": "SearchAction",
        "query-input": "required name=search_term_string",
        "target": {
          "@type": "EntryPoint",
          "urlTemplate": "https://wavect.io/search/?q={search_term_string}"
        }
      },
      "publisher": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      },
      "url": "https://wavect.io/"
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@id": "https://wavect.io/zh/glossary/smart-contract/#term",
      "@type": "DefinedTerm",
      "alternateName": [
        "Smart Contract"
      ],
      "description": "运行在区块链上的代码，确定性执行，一经部署便不可更改（除非你设计成可升级）。",
      "inDefinedTermSet": "https://wavect.io/zh/glossary/#termset",
      "name": "智能合约",
      "termCode": "smart-contract",
      "url": "https://wavect.io/zh/glossary/smart-contract/"
    },
    {
      "@id": "https://wavect.io/zh/glossary/smart-contract/#webpage",
      "@type": "WebPage",
      "about": {
        "@id": "https://wavect.io/#organization",
        "@type": [
          "Organization",
          "ProfessionalService",
          "LocalBusiness"
        ]
      },
      "author": {
        "@id": "https://wavect.io/team/kevin-riedl/#person",
        "@type": "Person",
        "name": "Kevin Riedl",
        "url": "https://wavect.io/team/kevin-riedl/"
      },
      "dateModified": "2026-05-24",
      "description": "运行在区块链上的代码，确定性执行，一经部署便不可更改（除非你设计成可升级）。",
      "headline": "智能合约",
      "inLanguage": "zh",
      "isPartOf": {
        "@id": "https://wavect.io/#website",
        "@type": "WebSite"
      },
      "lastReviewed": "2026-05-24",
      "mainEntity": {
        "@id": "https://wavect.io/zh/glossary/smart-contract/#term"
      },
      "mentions": [
        {
          "@id": "https://wavect.io/#organization",
          "@type": [
            "Organization",
            "ProfessionalService",
            "LocalBusiness"
          ]
        },
        {
          "@type": "Service",
          "name": "区块链",
          "url": "https://wavect.io/zh/services/blockchain/"
        }
      ],
      "name": "智能合约",
      "reviewedBy": {
        "@id": "https://wavect.io/team/christof-jori/#person",
        "@type": "Person",
        "name": "Christof Jori",
        "url": "https://wavect.io/team/christof-jori/"
      },
      "speakable": {
        "@type": "SpeakableSpecification",
        "cssSelector": [
          ".gls-single__h1",
          ".gls-single__tldr"
        ]
      },
      "url": "https://wavect.io/zh/glossary/smart-contract/"
    },
    {
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "item": "https://wavect.io/zh/",
          "name": "首页",
          "position": 1
        },
        {
          "@type": "ListItem",
          "item": "https://wavect.io/zh/glossary/",
          "name": "技术、产品与合作模式术语表",
          "position": 2
        },
        {
          "@type": "ListItem",
          "item": "https://wavect.io/zh/glossary/smart-contract/",
          "name": "智能合约",
          "position": 3
        }
      ]
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "对任何持有非琐碎价值的合约：需要。审计成本通常是 Build 预算的 1 到 2 周。跳过它，是丢掉合约所持有全部价值的最便宜方式之一。保险和漏洞赏金是补充，不是替代。"
      },
      "name": "我真的需要审计吗？"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "EVM 链（Ethereum、Polygon、Arbitrum、Optimism、Base）用 Solidity。Solana、Near 和 ICP 用 Rust。这个选择是哪条链匹配你用例的下游产物；语言是一种约束，不是一种偏好。"
      },
      "name": "Solidity 还是 Rust？"
    },
    {
      "@type": "Question",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "在管理员密钥上加时间锁和多签的 Proxy 模式。即时升级权是一个单点故障；没有升级路径则让你被第一个 Bug 困死。那个中间地带（对用户透明的、带时间锁的升级）正是大多数生产系统收敛到的做法。"
      },
      "name": "你们怎么安全地处理可升级性？"
    }
  ],
  "speakable": {
    "@type": "SpeakableSpecification",
    "cssSelector": [
      ".faq-question",
      ".faq-answer"
    ]
  }
}
```
