https://github.com/unboxed-software/token22-staking
https://github.com/unboxed-software/token22-staking
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/unboxed-software/token22-staking
- Owner: Unboxed-Software
- Created: 2024-02-06T02:14:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-15T03:29:41.000Z (over 2 years ago)
- Last Synced: 2025-08-01T15:51:11.913Z (11 months ago)
- Language: TypeScript
- Size: 128 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solana Token 2022 Staking program
This repo contains a staking contract that allows users to create staking pools and stake tokens, all incorporating the new Token 20222 program!
## Instructions
### `init_pool`
Initializes a new staking pool. The pool is a pda with the address of the token mint that the pool is intended for and "state" as seeds.
### `init_stake_entry`
Initializes an account to hold state about a user's stake position. PDA with the User's pubkey, mint of token, and "stake_entry" as seeds.
### `stake`
Transfers tokens from a User token account to the program token vault, where they are kept while staked.
### `unstake`
Transfers tokens from the staking pool back to a user.
User can call this at any time.
Users can only unstake tokens that they have staked themselves.