This document provides deep technical analysis of SHELTR's blockchain implementation, smart contract architecture, and security protocols. Designed for developers, blockchain engineers, and security auditors.
SHELTR implements the world's first dual-token charitable ecosystem on Base network, combining participant protection through SHELTR-S (stable token) with community governance via SHELTR (growth token). Our revolutionary architecture ensures 80% of donations reach participants as stable value while building sustainable long-term solutions through smart contract-governed fund allocation.
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; contract SHELTRCore is AccessControl, ReentrancyGuard, Pausable { // Distribution constants (immutable for security) uint256 public constant DIRECT_SUPPORT = 80; uint256 public constant HOUSING_FUND = 15; uint256 public constant OPERATIONS = 5; uint256 public constant WELCOME_BONUS = 100 * 1e18; // 100 SHELTR-S function processDonation( address donor, address participant, uint256 amount ) external onlyRole(DISTRIBUTOR_ROLE) nonReentrant whenNotPaused { uint256 directSupport = (amount * DIRECT_SUPPORT) / 100; uint256 housingContribution = (amount * HOUSING_FUND) / 100; uint256 operationsFee = (amount * OPERATIONS) / 100; // Mint SHELTR-S tokens for participant (1:1 with USDC) ISheltrStable(address(sheltrStable)).mint(participant, directSupport); emit DonationProcessed(donor, participant, amount, directSupport, housingContribution); } }
const BASE_CONFIG = { network: 'base-mainnet', chainId: 8453, rpcUrl: 'https://mainnet.base.org', blockTime: 2, // seconds contracts: { sheltrCore: '0x...', sheltrStable: '0x...', sheltrGrowth: '0x...', usdcReserve: '0xa0b86a33e6...' } };