Skip to content

KohRonald/CCIP-Rebase-Token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cross-chain Rebase Token

  1. CCIP Rebase Token: A protocol that allow users to deposit into a vault and in return, receive rebase tokens that represents their underlying balance.

  2. Rebase token -> dynamic balanceOf() to show changing balance with time.

    • Balance increases linearly with time
    • Mint token to users everytime an action is perform (minting, burning, transferring, bridging)
  3. Interest rate: Rate at which the balance is increasing linearly with time

    • Individualy set an interest rate on each user based on some global interest rate of the protocol at the time the user desposits into the vault
    • This global interest rate can only decrease to incentivise/reward early adopters.
    • Increases token adoption
    • Global Interest Rate Diagram

Contracts

  1. Token Contract

    • The core ERC-20 token with rebase (elastic supply) logic
    • Automatically adjusts token balances over time to reflect interest accrual
  2. Pool Contract

    • Manages liquidity and cross-chain transfers
    • An intermediary to safely "lock/burn" tokens on the source chain and "release/mint" on the destination chain
  3. Vault Contract

    • Acts as the collateral manager or "entry/exit gate" for the protocol
    • Collateral vault for ETH deposits/withdrawals
  4. Deployment Script

    • Deployment script for creating Rebase Token and Pool contracts on Sepolia Eth and ZKSync Sepolia.
    • Deployment script for creating Vault contract on Sepolia Eth.

Known Issues

  • Owners can set themselves the role of "MINT_AND_BURN_ROLE"

Design Flaws

  • A user can initally deposit into to get a more preferred higher interest rate, then some time later, in order not to get a new lower interest rate when depositing more (interest rate will be reduced over time), the user would be able to use a second wallet to send over the deposit, thereby, retaining the higher interest rate.

About

A hands-on exploration of Cross-Chain Rebase Tokens using Foundry. Covers cross-chain messaging, rebase mechanics, and best practices for secure, test-driven Solidity development with Forge.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors