Technical Architecture
Getting Started
Introductory guide to Stakefy’s architecture — understand how components interact on-chain and off-chain.
Stakefy’s core integration is the StakePay SDK and CLI, which let developers convert subscriptions into stake-based flows. The system is built on secure on-chain contracts (written in Rust/Anchor) and scalable APIs. Developers can use either the provided CLI or SDK libraries to interact with the StakePay protocol. For example, a stake transaction on Solana might use an Anchor program invoking the SPL Token program:
This example (adapted from Anchor docs shows how tokens are transferred from a user’s wallet into a provider’s staking vault. In StakePay, such a transfer locks the user’s tokens on-chain, granting service access while the provider collects the staking yield.
Getting Started
Install prerequisites: Node.js, a Solana toolchain, and Rust/Anchor if building the on-chain program.
Install the Stakefy CLI/SDK:
This provides commands like
stakefy stakeand imports the StakePay SDK for coding.Configure your environment: Create a
stakefy.config.jsonwith your network settings and contract addresses (e.g. the StakePay program ID on Solana).Deploy (if self-hosting): Use Anchor to build and deploy the StakePay program to a Solana network:
The deployed program acts as the “payment rail” for staking-based transactions
Join our Community Forum
Any other questions? Get in touch