Subvault Technical Docs
Contract Overview
Contract Name: Subvault
Symbol: STS
Token Type: ERC20 (non-transferable)
Primary Asset: USDC (ERC20-compatible stablecoin)
Stake Token: STS (Subvault Token Share)
Security Modules: Pausable, ReentrancyGuard, Ownable, Chainalysis Oracle
🗃 Data Structures
solidityCopyEditstruct StakeRecord {
uint256 stsShares; // Amount of STS minted during stake
uint256 durationDays; // Lock period (0, 90, 180)
uint256 lockEndTime; // Epoch time after which stake can be redeemed
bool active; // Active status
}
User stakes are stored in:
solidityCopyEditmapping(address => StakeRecord[]) public userStakeRecords;
🧠Business Logic Flow
Staking
User approves and calls
stake(amount, duration)
STS minted and stake recorded
USDC transferred in
Unstaking
Lock expires → user calls
unstake(index)
STS burned → USDC redeemed
Acquisition
Admin calls
withdrawForAcquisition(to, amount)
Vault USDC decreases → STS dilution occurs
📦 Deployment Details
Compiler: Solidity 0.8.17 (locked)
Libraries: OpenZeppelin ERC20, SafeERC20, Pausable, ReentrancyGuard, Ownable
Decimals: STS follows 18 decimals; USDC assumed to use 6
Chainalysis Oracle: Must be deployed and compatible with
SanctionsList
interface
Last updated