This project implements a Cross-Chain Rebase Token Protocol where users can deposit assets into a vault and receive dynamic, interest-accruing tokens in return. These rebase tokens automatically reflect yield over time and enable seamless cross-chain interactions.
- Users deposit assets into a secure vault.
- In return, they receive rebase tokens representing their deposit.
- The
balanceOf()function is dynamic:- Token balance increases linearly over time.
- Rebase occurs automatically on every action:
- Minting
- Burning
- Transferring
- Bridging
- Each user has a personalized interest rate fixed at the time of deposit.
- The interest is calculated based on a global protocol interest rate.
- The global rate is designed to only decrease over time:
- Early adopters benefit more.
- Incentivizes early participation and adoption.
-
Deposit into Vault
- Users deposit approved assets into the protocol vault.
-
Mint Rebase Tokens
- Protocol mints rebase tokens to user address.
- Initial balance is proportional to the deposit value.
-
Interest Calculation
- Each user’s balance increases linearly using their fixed interest rate.
- The balance increases without needing manual claims.
-
Bridging Across Chains
- The rebase token is designed for cross-chain compatibility.
- Rebase logic ensures consistent balance on any supported chain.
- Solidity — For smart contract logic
- Foundry — Fast, efficient smart contract testing
- Chainlink — (Optional) Oracle integration for price feeds
- OpenZeppelin — Secure, reusable smart contract libraries
# Clone the repository
git clone https://github.com/nifeesleman/ccip-rebase-token.git
cd ccip-rebase-token
# Install dependencies
forge install
# Run tests
forge test