A protocol for managing yield-bearing tokens with integrated merchant functionality.
This protocol implements a yield-bearing token system with the following key features:
- ERC20-compatible yield tokens
- Merchant functionality for token trading
- Role-based access control
- Secure withdrawal mechanism with signatures
src/
├── config/
│ ├── constants.sol # Protocol-wide constants and configurations
│ ├── errors.sol # Custom error definitions
│ └── roles.sol # Role definitions for access control
├── core/
│ ├── manager/
│ │ └── MMFManager.sol # Main Money Market Fund management contract
│ └── token/
│ └── FundToken.sol # Implementation of the yield-bearing token
├── interfaces/
│ ├── IAuthority.sol # Interface for role-based access control
│ ├── IMintableBurnable.sol # Interface for token minting/burning
│ └── ITokenPriceOracle.sol # Interface for price feed integration
└── utils/ # Utility contracts and libraries
-
MMFManager.sol: Core contract managing the Money Market Fund operations including:
- Token subscription (deposits)
- Token redemption (withdrawals)
- Fee management
- Price oracle integration
-
FundToken.sol: ERC20-compatible token representing shares in the fund
- Implements minting/burning functionality
- Tracks user balances and total supply
-
Interfaces: Define the contract interactions
IAuthority
: Role-based access controlITokenPriceOracle
: Price feed integrationIMintableBurnable
: Token minting and burning operations
- Foundry
- Solidity ^0.8.0
- Clone the repository:
git clone https://github.com/iost-official/rwa-infrastructure.git
cd rwa-infrastructure
Install dependencies:
forge install
Compile the contracts:
forge build
Test the contracts:
forge test
This project is licensed under the MIT License - see the LICENSE file for details.