1/5
## Introduction to Rebase Tokens on CCIP We created our rebase token. It was an ERC20 and it was ownable with access control, all using OpenZeppelin. We created a way to grant the mint and burn role so that the vault and the token pools could mint and burn. We had a global interest rate for the smart contract, which could be decreased over time by the owner. And this was the interest rate that new minters would inherit. We created a way to get the principle balance of, which was the total amount of tokens which had actually been minted to the users. We created a mint function, which minted tokens to the users when they deposited into the vault or they sent their tokens cross-chain, and minted any accrued interest if relevant, and then set their interest rate to the current interest rate in the smart contract. We created a way to burn tokens, which also minted any accrued interest before burning those tokens. We created this funky balance of, which calculated the balance of the user based on any accumulated interest. We created ways to transfer tokens to other users and we learned how to calculate linear interest based on some interest rate. And this interest rate was specific to the user based on their time of minting. We then created an internal function to mint any accrued interest by calculating any interest that had accrued, and then minting that to the user. And then, some helpful getter functions. We created a vault for users to be able to deposit ETH and then gain rebase tokens of an equal amount, and then a way to redeem so that they could burn their rebase tokens and then be sent some ETH. We also implemented a receive function to be able to send rewards to this smart contract. We then enabled our token for CCIP by creating a token pool for our rebase token, which implemented lock or burn and release or mint to be able to burn tokens when sending them to another chain or mint tokens when we were receiving them from another chain. We created some scripts to deploy our token and token pools and vault, and set the CCIP admins. We then created a script to configure the pool to enable another chain to be able to send them cross-chain. And then, finally, we created a script to send our tokens cross-chain by creating a CCIP message and then calling CCIP send on the router. We created some fuzz tests for our rebase token and we created folk tests for our cross-chain rebase token, using CCIP local, and learning about create select fork and create fork to create fork tests on Sepolia and Arbitrum Sepolia. Finally, we deployed our smart contracts to Sepolia and zkSync Sepolia, did all of the CCIP configuration, and then sent our tokens cross-chain. And we use the CCIP explorer to be able to see that cross-chain transfer, and it was all successful. So there, we have learned so so much in this section so you should be very very proud of yourselves for how much you have accomplished. If you have any questions or anything doesn�t make any sense, then please head to the discussions tab of the GitHub repository of this course or join our Discord where you can chuck your questions in there and one of the Cypher Team will be happy to help you. So, give yourselves a massive pat on the back, go get yourself an ice cream, go get yourself a hot cross bun and I will see you or Patrick will see you very shortly.
A comprehensive recap of the rebase token project. The lesson covers the basics of setting up a rebase token, deploying contracts on Sepolia, and sending tokens cross chain.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Advanced smart contract development
How to develop a stablecoin
How to develop a DeFi protocol
How to develop a DAO
Advanced smart contracts testing
Fuzz testing
Manual verification
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Guest lecturers:
Juliette Chevalier
Lead Developer relations at Aragon
Nader Dabit
Director of developer relations at Avara
Ally Haire
Developer relations at Protocol Labs
Harrison
Founder at GasliteGG
Last updated on March 11, 2025
Solidity Developer
Advanced FoundryDuration: 36min
Duration: 3h 06min
Duration: 5h 02min
Duration: 6h 02min
Duration: 2h 47min
Duration: 1h 23min
Duration: 4h 28min
Duration: 1h 19min
Duration: 1h 10min
Course Overview
About the course
Advanced smart contract development
How to develop a stablecoin
How to develop a DeFi protocol
How to develop a DAO
Advanced smart contracts testing
Fuzz testing
Manual verification
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Guest lecturers:
Juliette Chevalier
Lead Developer relations at Aragon
Nader Dabit
Director of developer relations at Avara
Ally Haire
Developer relations at Protocol Labs
Harrison
Founder at GasliteGG
Last updated on March 11, 2025
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar