StackingDAO
🇨🇳Stacking DAO 文档
🇨🇳Stacking DAO 文档
  • Stacking DAO 基础知识
    • Stacking DAO 概述
    • 流动性质押的重要性
    • 通过 Stacking DAO 实现即时收益
    • 积分系统
  • Stacking DAO 应用程序
    • stSTX - 一种支持 STX 奖励的流动性质押代币
      • stSTX的基础知识
      • 存入与转换 stSTX
      • 提取 stSTX
    • stSTXbtc —— 一种支持 BTC 奖励的流动性质押代币
      • stSTXbtc的基础知识
      • 存入与转换 stSTXbtc
      • 提取 stSTXbtc
    • 原生质押,赚取 BTC 收益
      • 原生质押BTC收益的基础知识
      • 在原生质押池中存入 STX
      • 在原生质押池中提现STX
    • 签名者委托与数据分析面板
    • 使用 Stacking DAO 有哪些风险?
    • 常见问题解答
  • 核心合约
    • Stacking DAO 核心 V4
    • 签名者入驻
  • 其他事项
    • 官方链接
    • 受限国家以及地区
    • 免责声明
Powered by GitBook
On this page
  1. 核心合约

Stacking DAO 核心 V4

Previous常见问题解答Next签名者入驻

Last updated 26 days ago

Stacking DAO Core V4 是用户进行所有操作的主要入口,包括存入和提取 STX、查询 stSTX 与 STX 的兑换比率或查看用户的提取 NFT 头寸。

合约地址如下:

集成说明

对于钱包、中心化交易所(CEX)以及其他想要集成 Stacking DAO 存取逻辑的协议,有三个关键方法需要了解:

  1. 存入 STX(Deposit)

The deposit method can be initiated using the deposit method on the SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.stacking-dao-core-v4 contract.

This contract expects the following parameters

  • reserve-contract - this is the Stacking DAO reserve contract, and should always be set to `SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.reserve-v1`

  • commission-contract - this is the Stacking DAO commission contract, and should always be set to `SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.commission-v2`

  • staking-contract - this is the Stacking DAO staking contract, and should always be set to `SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.staking-v0`

  • direct-helpers - this is the Stacking DAO direct helpers contract, and should always be set to `SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.direct-helpers-v2`

  • stx-amount - a positive integer value for the uSTX (micro-STX, 10^6) amount you want to stack and get stSTX in return for. For example, passing 1000000 will stack 1 STX.

  • referrer - an optional Stacks address, this accumulates referral points on the leaderboard

  • pool - should be set to none for now

  1. 发起提取(Init-Withdraw)

When withdrawing, users can follow a two-step process, see for more information.

The initialisation of a withdrawal can be called using init-withdraw and expects the following parameters:

  • reserve-contract - this is the Stacking DAO reserve contract, and should always be set to `SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.reserve-v1`

  • direct-helpers - this is the Stacking DAO direct helpers contract, and should always be set to `SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.direct-helpers-v2`

  • ststx-amount - a positive integer value for the ustSTX (micro-stSTX, 10^6) amount you want to unstack and get STX in return for. For example, passing 1000000 will unstack 1 stSTX.

When this call succeeds, the user will receive an NFT that represents their unstacking position and indicates the amount of STX they should receive after a given PoX cycle ends (this is always principal + yield).

  1. 完成提取(Withdraw)

Finally, once the PoX cycle ends after a given init-withdrawal call (but always before the last 288 blocks of a given cycle), the STX principal + yield can be withdrawn from Stacking DAO.

The withdrawal can be called using withdraw and expects the following parameters:

  • reserve-contract - this is the Stacking DAO reserve contract, and should always be set to `SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.reserve-v1`

  • commission-contract - this is the Stacking DAO commission contract, and should always be set to `SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.commission-v2`

  • staking-contract - this is the Stacking DAO staking contract, and should always be set to `SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.staking-v0`

  • nft-id - the ID of the NFT that was minted in the init-withdraw method previously.

After the withdrawal succeeds, the STX principal and yield amounts will be returned to the transaction sender's wallet.

https://explorer.hiro.so/txid/SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.stacking-dao-core-v4?chain=mainnet
https://docs.stackingdao.com/stackingdao/the-stacking-dao-app/withdrawing-stx