Protox Core is a high-performance vault and reward distribution protocol built on the Stellar network using Soroban. It provides a modular, secure, and efficient way for users to deposit tokens, track balances, and receive proportional reward distributions.
- Vault Deposits: Securely deposit tokens and receive vault shares.
- Balance Tracking: Real-time tracking of user balances and total vault liquidity.
- Reward Distribution: Pro-rata reward distribution based on vault shares.
- Modular Design: Separated concerns for storage, events, and error handling.
- Developer-First: Extensively documented and designed for open-source contributions.
Protox Core is built as a set of Soroban smart contracts. The core vault contract manages:
- Token Interactions: Integration with Stellar's Asset Contract interface.
- Share Accounting: Maintaining accurate ledger entries for each depositor.
- Reward Logic: Scalable reward calculation using a "Reward-per-Share" pattern.
See architecture.md for a deep dive into the protocol design.
protox-core/
├── contracts/
│ └── vault-contract/ # Core vault smart contract
│ ├── src/ # Contract source code
│ └── Cargo.toml # Rust dependencies
├── scripts/ # Deployment and initialization scripts
├── tests/ # Integration and end-to-end tests
├── docs/ # Technical documentation
└── .github/ # GitHub templates and workflows
-
Clone the repository:
git clone https://github.com/protox/protox-core.git cd protox-core -
Build the contract:
cd contracts/vault-contract cargo build --target wasm32-unknown-unknown --release -
Run unit tests:
cargo test
Refer to the scripts/ directory for deployment and initialization examples using TypeScript.
We welcome contributions! Please see CONTRIBUTING.md for guidelines on how to get involved.
Contribution Areas for Newcomers:
- Implement reward claiming logic.
- Optimize storage gas costs.
- Add support for multiple reward tokens.
- Improve security validation checks.
Protox Core is open-source software licensed under the MIT License.