Smart Contracts

StoneYield protocol smart contract repository

Smart Contracts

The StoneYield smart contracts are open-source and available for review, audit, and contribution.

Repository

🔗 GitHub: github.com/stoneyield/stoneyield-contracts

Contract Architecture

Core Contracts

  • STUSD: Transferable wrapper token with lock-aware transfers
  • StrategyRouter: Yield strategy routing and management
  • STUSDWrapper: sUSDC → STUSD wrapper with lock orchestration
  • SUSDC: Soul-bound staking token with lock-aware transfers

Technology Stack

  • Solidity: ^0.8.28
  • Framework: Hardhat
  • Testing: Hardhat + Chai
  • Network: Binance Smart Chain (BSC)
  • Standards: ERC20, ERC-4626, EIP-2612

Repository Structure

contracts/
├── STUSD.sol                 # Transferable wrapper token
├── SUSDC.sol                 # Soul-bound staking token
├── STUSDWrapper.sol          # Wrapper contract
├── StrategyRouter.sol        # Yield routing
└── interfaces/
    └── ISTUSDWrapper.sol     # Wrapper interface

test/
├── SUDC.test.js
├── StrategyRouter.test.js
└── Wrapper.test.js

scripts/
├── deploy.js
└── verify.js

Development Setup

Prerequisites

  • Node.js 18+
  • npm or yarn
  • MetaMask or similar wallet

Installation

git clone https://github.com/stoneyield/stoneyield-contracts.git
cd stoneyield-contracts
npm install

Compile Contracts

npx hardhat compile

Run Tests

npx hardhat test

Deploy to BSC Testnet

npx hardhat run scripts/deploy.js --network bscTestnet

Contract Addresses

BSC Mainnet

  • SUSDC (Proxy): 0xAd66385c6db496258771B5fD8AC376E3dd0D1536
  • STUSD: 0x806dD21Af6DE051Fb811760A5768d04A99160EB9
  • STUSDWrapper: 0xB4d3C1BB59be7B419aF4e10e9b240F425782b22A
  • StrategyRouter: 0x563f48aAD50a75Ef3662827a4d536dbd46aBb5a2
  • VenusUSDCVault: 0x375Defe9293671a4459CF7206Ac6f440d0Eb0970

BSC Testnet

  • SUDC (STUSD Token): TBA
  • StrategyRouter: TBA
  • sUSDCWrapper: TBA
  • sUSDC (sUSDC Token): TBA

Security

Audits

  • Status: Pending
  • Firms: TBA

Bug Bounty

We encourage responsible disclosure of security vulnerabilities:

  • Contact: security@stoneyield.io
  • Rewards: Based on severity

Best Practices

  • All contracts use OpenZeppelin libraries
  • Comprehensive test coverage
  • Reentrancy guards on external calls
  • Time-locked upgrades
  • Multisig ownership

Contributing

We welcome contributions from the community:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

Please read our contribution guidelines before submitting.

License

MIT License - see LICENSE file for details

Start of sectionNext topic