TokenVault
TokenVault is a standard ERC4626 protocol for tokenized vaults that represent shares of yield-bearing tokens written in Solidity and Python using the brownie development framework. It allows users to deposit different ERC-20 tokens to a pool of tokens in exchange for vTokens (vault tokens).
Before you begin, ensure you have met the following requirements:
- Python (3.7 or higher)
- Brownie
- Ganache or an Ethereum testnet for development
- Metamask or another Ethereum wallet for interacting with your contracts
-
Clone the repository:
git clone https://github.com/hadesbaker/TokenVault.git cd TokenVault
-
Install the required Python packages
pip install -r requirements.txt
-
Deploy the ERC20 and TokenVault contracts:
brownie run scripts/deploy.py --network development
-
Interact with the deployed contracts using the Brownie console:
brownie console --network development
Run the tests to ensure your contracts function as expected:
brownie test
Before deploying your contracts to the Ethereum mainnet, ensure you have:
- Sufficient ETH for gas fees in your deployment account
- Completed a security audit of your contracts
- Considered legal and regulatory compliance
To deploy your contracts, modify the deployment script scripts/deploy.py to specify the deployment network and execute it:
brownie run scripts/deploy.py --network mainnet