SunStaker is a set of on‑chain yield‑farming smart contracts for the Sun Protocol.
It is intended as a modular, upgradeable system for staking, reward distribution, and
strategy management around Sun ecosystem tokens.
Note: This repository contains only the smart contracts and related tooling.
Frontend applications, deployment scripts, and protocol documentation may live in separate repositories.
- Staking & Unstaking: Users can deposit supported tokens into staking pools and withdraw them at any time, subject to the pool’s rules.
- Reward Distribution: Rewards are distributed over time based on users’ share of total stake in each pool.
- Pool Configuration: Each pool can be configured with its own reward rate, reward token, and allocation parameters.
- Administrative Controls: Restricted functions for protocol operators (e.g. adding pools, updating parameters, pausing certain operations).
The exact layout may evolve, but typical directories include:
contracts/: Core protocol contracts and interfaces.test/: Unit and integration tests for the contracts.scripts/: Optional deployment, migration, and maintenance scripts.lib/ornode_modules/: Third‑party dependencies and libraries.
-
Clone the repository
git clone <this-repo-url> cd sunstaker-contract
-
Install dependencies
Depending on the tooling used (Foundry, Hardhat, Truffle, etc.), install the corresponding dependencies. For example, with Node.js:
npm install # or pnpm install # or yarn install
-
Compile contracts
Use the configured tooling in this repository. Typical examples:
npx hardhat compile # or forge build
Run the test suite with the configured framework, for example:
npx hardhat test
# or
forge testPlease refer to the project’s configuration (e.g. hardhat.config.*, foundry.toml)
for the exact commands supported in this repository.
Deployment is environment‑specific (testnet vs. mainnet) and usually driven by
scripts under scripts/ or by configuration files in the root of the project.
Typical steps:
- Configure environment variables (RPC endpoints, private keys, etc.).
- Run the appropriate deployment script for your target network.
- Verify deployed contracts on the relevant block explorer (if supported).
Consult internal documentation or deployment scripts for network‑specific details.
- Use at your own risk: This code may be experimental and subject to change.
- Audits: If third‑party audits have been performed, refer to audit reports for security findings and mitigations.
- Responsible disclosure: If you discover a vulnerability, please follow a responsible disclosure process and contact the maintainers privately rather than opening a public issue.
Contributions are welcome. To propose a change:
- Fork the repository.
- Create a feature branch.
- Make your changes and add tests where appropriate.
- Open a pull request with a clear description and rationale.
Unless otherwise stated in a dedicated LICENSE file, the default license for this
repository is unspecified. Please check with the project maintainers or your
organization’s guidelines before using this code in production.