BTB Finance for agents

Protocols / Liquid Staking

StackingDAO

Liquid staking on Stacks. Agents can deposit STX for stSTX (STX yield in the exchange rate) or stSTXbtc (1:1 with STX, yield paid in sBTC), deposit sBTC for stBTC, swap stSTX <> stSTXbtc fee-free, and exit through an instant (1% fee, idle liquidity) or cooldown withdrawal that mints a claim NFT.

On-chainMIXED13 contractsWebsite · Docs

get_protocol({ "protocol": "stackingdao" })

Risks an agent should know

What an agent can do

stake STX for stSTXLiquid-stake STX, yield compounds into the stSTX/STX ratio.
Read data-stx-v2.get-stx-per-ststx; min = stx-amount*1e6/ratio minus a small buffer; call stacking-dao-core-stx-v2.deposit(stx-amount, min) with an STX post-condition for stx-amount.
stake STX for stSTXbtcLiquid-stake STX and earn sBTC rewards.
stacking-dao-core-ststxbtc-v2.deposit(stx-amount, stx-amount); later claim with ststxbtc-tracking-v2.claim-pending-rewards(you, you).
stake sBTC for stBTCLiquid-stake sBTC.
Read data-stbtc-v1.get-sbtc-per-stbtc; call stacking-dao-core-stbtc-v1.deposit(sbtc-amount, min) with an sBTC post-condition.
instant unstakeExit immediately for a 1% fee if idle liquidity exists.
core.withdraw-idle(amount) on the matching core contract. Alternative: sell on a Stacks DEX (Bitflow), price may differ.
standard unstakeExit at full ratio after the cooldown.
core.init-withdraw(amount) -> nft-id; wait until burn-block-height >= withdraw-data .get-withdrawals-by-nft(nft-id).unlock-burn-height (about 2 weeks for stSTX/stSTXbtc, about 4 weeks for stBTC); then core.withdraw(nft-id) from the NFT owner.
switch stSTX <> stSTXbtcChange yield type without unstaking.
swap-ststx-ststxbtc-v4.swap-ststx-for-ststxbtc(amount, min-out) or swap-ststxbtc-for-ststx(amount, min-out).

Contracts

stacks

ContractAddressKey functionsTry
stSTX Core (stacking-dao-core-stx-v2)
staking
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.stacking-dao-core-stx-v2
source
writedeposit(stx-amount uint, min-shares-out uint)
writeinit-withdraw(ststx-amount uint)
writewithdraw(nft-id uint)
writewithdraw-idle(ststx-amount uint)
readget-shutdown-deposits()
readget-withdraw-idle-fee()
readget-withdraw-fee()
stSTX exchange-rate data (data-stx-v2)
other
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.data-stx-v2
source
readget-stx-per-ststx()
readget-stx-per-ststx-up()
stSTX token
token
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.ststx-token
source
readget-balance(account principal)
readget-total-supply()
writetransfer(amount uint, sender principal, recipient principal, memo (optional (buff 34)))
stSTXbtc Core (stacking-dao-core-ststxbtc-v2)
staking
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.stacking-dao-core-ststxbtc-v2
source
writedeposit(stx-amount uint, min-shares-out uint)
writeinit-withdraw(ststxbtc-amount uint)
writewithdraw(nft-id uint)
writewithdraw-idle(ststxbtc-amount uint)
readget-shutdown-deposits()
readget-withdraw-idle-fee()
stSTXbtc token
token
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.ststxbtc-token-v2
source
readget-balance(account principal)
writetransfer(amount uint, sender principal, recipient principal, memo (optional (buff 34)))
stSTXbtc sBTC reward tracker (ststxbtc-tracking-v2)
other
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.ststxbtc-tracking-v2
source
readget-pending-rewards(holder principal, position principal)
writeclaim-pending-rewards(holder principal, position principal)
readget-claims-enabled()
stBTC Core (stacking-dao-core-stbtc-v1)
staking
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.stacking-dao-core-stbtc-v1
source
writedeposit(sbtc-amount uint, min-shares-out uint)
writeinit-withdraw(stbtc-amount uint)
writewithdraw(nft-id uint)
writewithdraw-idle(stbtc-amount uint)
readget-shutdown-deposits()
readget-withdraw-idle-fee()
stBTC exchange-rate data (data-stbtc-v1)
other
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.data-stbtc-v1
source
readget-sbtc-per-stbtc()
readget-sbtc-per-stbtc-up()
stBTC token
token
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.stbtc-token
source
readget-balance(account principal)
writetransfer(amount uint, sender principal, recipient principal, memo (optional (buff 34)))
stSTX <> stSTXbtc swap (swap-ststx-ststxbtc-v4)
exchange
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.swap-ststx-ststxbtc-v4
source
writeswap-ststx-for-ststxbtc(ststx-amount uint, min-out uint)
writeswap-ststxbtc-for-ststx(ststxbtc-amount uint, min-out uint)
stSTX withdrawal NFT (ststx-withdraw-nft-v4)
other
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.ststx-withdraw-nft-v4
source
readget-owner(token-id uint)
readget-last-token-id()
stSTX withdrawal records (withdraw-data-stx-v2)
other
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.withdraw-data-stx-v2
source
readget-withdrawals-by-nft(nft-id uint)
readget-withdraw-cooldown-blocks()
readget-withdraw-unlock-burn-height()
Native STX staking pool (native-pool-v1)
staking
SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.native-pool-v1
source
writedelegate(signer-manager <signer-manager-trait>, amount-ustx uint, num-cycles uint)
writedelegate-update(signer-manager <signer-manager-trait>, old-signer-manager <signer-manager-trait>, cycles-to-extend uint, amount-increase uint, signer-calldata (optional (buff 500)))
writeundelegate(old-signer-manager <signer-manager-trait>)
readis-delegating(staker principal, sm principal)
readcurrent-cycle()

Notes

Stacks is a Clarity-VM chain (non-EVM), so vm is 'mixed' and chainId is null; addresses are Clarity contract principals (deployer.contract-name), all deployed by SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG. Function signatures are in Clarity form (name(arg type, ...)); call them with a Stacks contract-call transaction and add post-conditions for STX/sBTC/token transfers. Core, data and swap addresses come from the docs' Core Contracts pages; tokens, NFTs, tracker, withdraw-data and native pool come from the official mainnet deployment list (61 contracts) in StackingDAO/stackingdao-smart-contracts. Each listed contract was confirmed to exist via the Hiro API and live parameters (pause flags all false, idle fee 1%, ratios, cooldowns) were read on 2026-11-24. Internal contracts (reserves, strategy, stakers, signer managers, rewards, governance) are left out; see the mainnet README for them. Older cores (stacking-dao-core-v6, stacking-dao-core-btc-v3, swap-ststx-ststxbtc-v2) are superseded and should not be used.

Sources

Researched 2026-11-24. Addresses are copied from the official sources above; check them before moving large amounts.