Strike Staking
tx3 protocol for Strike Finance staking on Cardano.
Status: WIP — This tx3 off-chain implementation is under testing and may not cover all edge cases yet.
Overview
Strike Finance allows users to lock STRIKE tokens in a staking contract and earn ADA rewards. On initial stake, a credential NFT pair (tracker token + owner identifier NFT) is minted. The tracker is locked in the script and the owner NFT is returned to the staker as proof of ownership.
Transactions
| Transaction | Description |
|---|---|
stake | Lock STRIKE tokens and mint credential NFTs |
add_stake | Add more STRIKE to an existing stake position |
withdraw_stake | Reclaim all STRIKE + accumulated ADA rewards, burning credential NFTs |
Important Considerations
- Network profile required: The
envblock references on-chain addresses, policy IDs, and reference script UTxOs that must be configured per network (mainnet/testnet) in the trix profile. - Reference scripts: Both spend and mint validators are consumed via reference scripts (
spend_script_ref,mint_script_ref). These UTxOs must exist on-chain and be correctly referenced. - Owner NFT: The
add_stakeandwithdraw_staketransactions require the staker to hold their owner NFT (minted with their payment key hash as asset name). - Collateral: All transactions require 5 ADA collateral from the staker.
- Validity window: The
staketransaction uses a validity window oftip_slot() + 200.
Caller Preparation
stake / add_stake
staked_at_time: Int— Current POSIX timestamp in milliseconds. tx3'sslot_to_time()returns seconds, not milliseconds, so the caller must compute this value externally (e.g., current Unix time * 1000). This is needed because the datum spread workaround requires explicit field assignment.
add_stake
staking_utxo: UtxoRef— The existing staking position UTxO to add to. Must be queried on-chain.additional_amount: Int— Amount of STRIKE tokens to add.
withdraw_stake
staking_utxo: UtxoRef— The staking position UTxO to withdraw from.- The staker must hold the owner NFT (minted with their payment key hash as asset name).
tx3 Limitations
Minor tx3 bugs required workarounds (param/field name collisions, datum spread failures, slot_to_time() returning seconds instead of milliseconds). None are blocking — all 3 transactions are fully functional. For details, see tx3-limitations-strike-staking.md.
CBOR Verification
All transactions have been compared against real on-chain transactions from the active contract. See invoke-args/comparison-report.md for the full field-by-field comparison.
Smart Contract
- PlutusV3
- Source: strike-finance/staking-smart-contracts
strike-staking
Published by
@strike-finance