Sub Protocol — CryptoForge

Yield Subscription

ERC-4626 vault where yield pays subscriptions, principal stays.
Contract Details
Categorycontracts
Files14
Price$19.99
Tech Stack
Solidity ^0.8.24 OpenZeppelin v5 Foundry
Chains
Ethereum Arbitrum Base Optimism
Description
ERC-4626 vault where deposited yield pays for subscriptions while the principal remains intact. Users deposit once, yield streams to the service provider, and the user keeps their deposit. Inspired by Superfluid streaming but with vault-native yield.
Features
yield-subscription.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @title Yield Subscription
/// @notice ERC-4626 vault where yield pays subscriptions, principal stays.
contract YieldSubscription {
    address public immutable owner;
    uint256 public constant VERSION = 1;

    event Initialized(address indexed deployer);

    constructor() {
        owner = msg.sender;
        emit Initialized(msg.sender);
    }

    // ... full implementation in purchased package
}
$19.99
Buy Now — $19.99