strike-staking

@strike-finance

• v0.1.0

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

TransactionDescription
stakeLock STRIKE tokens and mint credential NFTs
add_stakeAdd more STRIKE to an existing stake position
withdraw_stakeReclaim all STRIKE + accumulated ADA rewards, burning credential NFTs

Important Considerations

  • Network profile required: The env block 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_stake and withdraw_stake transactions 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 stake transaction uses a validity window of tip_slot() + 200.

Caller Preparation

stake / add_stake

  • staked_at_time: Int — Current POSIX timestamp in milliseconds. tx3's slot_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

strike-staking

Published by

@strike-finance

Publication datePublished a day ago
Back to all Protocols