This repository contains the Soroban (Stellar) implementation of the DSponsor protocol, originally developed for EVM chains. DSponsor is a decentralized sponsorship protocol that enables funding through visibility shares, aligning sponsors' and sponsees' interests.
DSponsor allows the creation of tokens representing advertising spaces. These tokens can be purchased to acquire exclusive rights to place advertisements in specific spaces (websites, apps, etc.) for defined time periods.
The main contract serving as the protocol's gateway. Key features:
- Creation and management of ad spaces
- Handling ad proposals and validations
- Protocol fee collection system
- Integration with native XLM and other Stellar tokens
NFT contract implementation with features:
- Token minting with multiple currency support (XLM and other Stellar tokens)
- Metadata management
- Price settings for both native and custom tokens
- Token allowlist functionality
Factory contract for deploying new DSponsor NFT contracts with:
- Standardized initialization
- Contract deployment tracking
- Admin rights management
-
Token Standards
- Replaced ERC721/ERC4907 with Soroban-specific token implementations
- Adapted token metadata handling for Stellar ecosystem
-
Currency Handling
- Integration with native XLM instead of ETH
- Modified token approval mechanisms for Stellar's token interface
-
Event System
- Implemented Soroban-specific event emission
- Adapted indexing mechanisms for Stellar blockchain
[Previous sections remain unchanged...]
- Rust toolchain
- Stellar CLI
- Soroban CLI
The project uses a Makefile to simplify development operations. Here are the main commands:
# Build all contracts
make build
# Run all tests
make test
# Format code
make fmt
# Clean build artifacts and rebuild
make clean
# Build and run tests and deploy in one command
make allThe Makefile includes commands for deploying contracts to the Stellar network:
Before deploying the contracts, you need to generate a Stellar keypair using the Stellar CLI. After generating your keypair, you'll need to update the Makefile by setting your key name in the SOURCE_ACCOUNT and FEE_RECIPIENT variables.
# Deploy factory contract
make deploy-factory
# Deploy admin contract
make deploy
# Initialize admin contract with configuration
make initializeDeployment variables can be configured in the Makefile:
SOURCE_ACCOUNT: The deployer accountFEE_RECIPIENT: Account receiving protocol feesNETWORK: Target network (default: testnet)NATIVE_XLM: Native token contract address- Contract addresses are automatically set after deployment
Important contract addresses (testnet):
The contracts are deployed on:
- Stellar Testnet
- Stellar Mainnet (pending)
- All contracts include comprehensive test coverage
- Implemented Stellar-specific security best practices
- Adapted access control mechanisms for Soroban
- Security audit conducted using Scout (CoinFabrik) - see audit/README.md for details
- Fork the repository
- Create a feature branch
- Submit a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details