https://github.com/casatrick/sui-staking-smart-contract
sui staking smart contract , enabling users to stake SUI tokens and earn rewards. Developed using the Move programming language.
https://github.com/casatrick/sui-staking-smart-contract
defi move smart-contract staking sui
Last synced: 9 days ago
JSON representation
sui staking smart contract , enabling users to stake SUI tokens and earn rewards. Developed using the Move programming language.
- Host: GitHub
- URL: https://github.com/casatrick/sui-staking-smart-contract
- Owner: casatrick
- Created: 2025-05-18T06:53:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-18T07:10:08.000Z (about 1 year ago)
- Last Synced: 2026-06-19T07:36:50.970Z (10 days ago)
- Topics: defi, move, smart-contract, staking, sui
- Language: Move
- Homepage:
- Size: 4.95 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sui Staking Smart Contract
This project implements a robust staking mechanism on the Sui blockchain, enabling users to stake their SUI tokens and earn rewards over a specified duration.##Dev
## Dev
- Telegram: [@defai_maxi](https://t.me/defai_maxi)
- Twitter: [@defai_maxi](https://x.com/defai_maxi)
## Overview
- RewardState: Tracks reward-related parameters such as duration, finish time, and reward rate.
- UserState: Maintains individual user staking information, including balances and rewards.
Treasury: Holds the total staked SUI tokens and manages reward distribution.
## Features
- Secure Staking Mechanism: Users can stake SUI tokens to earn rewards.
- Reward Distribution: Implements a reward distribution system based on staking duration and amount.
- User State Management: Tracks individual user stakes, rewards, and balances.
- Treasury Management: Manages the pool of staked tokens and distributes rewards accordingly.
- Admin Controls: Allows administrators to set reward durations and amounts.
## Usage
- Staking Tokens:
Users can stake their SUI tokens by invoking the stake function, which updates their UserState and the global Treasury.
GitHub
- Claiming Rewards:
After the reward duration, users can claim their rewards using the claim_rewards function, which calculates and transfers the appropriate amount based on their stake.
GitHub
- Unstaking Tokens:
Users can unstake their tokens at any time by calling the unstake function, which updates their UserState and the Treasury.
## Security Considerations
- Access Control: Only authorized administrators can set reward durations and amounts.
- Safe Math Operations: All calculations are performed using safe math to prevent overflows.
- Audit: It's recommended to perform a thorough audit before deploying to the mainnet.