2.6 KiB
2.6 KiB
Quick Start Guide
Generate the Excel Workbook
Option 1: Windows (Double-click)
- Double-click
generate_excel.bat - The script will:
- Install xlsxwriter if needed
- Generate
DeFi_Collateral_Simulation.xlsx - Show success message
Option 2: Windows (Command Prompt)
generate_excel.bat
Option 3: WSL/Linux
./generate_excel.sh
Or manually (using virtual environment):
python3 -m venv venv
source venv/bin/activate
pip install xlsxwriter
python generate_defi_simulation.py
deactivate
Or manually (system-wide, if allowed):
python3 -m pip install --user xlsxwriter
python3 generate_defi_simulation.py
Option 4: Manual (Any Platform)
# Install dependency
pip install xlsxwriter
# Generate workbook
python generate_defi_simulation.py
Verify the Output
- Open
DeFi_Collateral_Simulation.xlsxin Excel or LibreOffice - Check the Assets sheet:
- Should show 4 assets (ETH, wBTC, stETH, USDC)
- All have ✅ in Collateral ON/OFF column
- Values calculate correctly
- Check the Summary sheet:
- Total Collateral Value = $85,000
- Total Max Borrowable = $62,500
- Health Factor = 2.50 (if Borrowed = $25,000)
- Status = ✅ Safe
- Check the Simulation sheet:
- Round 0 should match Summary sheet
- Try entering a swap amount in Round 1
- Verify Max Borrow recalculates (not static)
Troubleshooting
"Python not found"
- Install Python 3.7+ from python.org
- Make sure to check "Add Python to PATH" during installation
"pip not found"
- On Windows:
python -m ensurepip --upgrade - On Linux/WSL:
sudo apt-get install python3-pip
"ModuleNotFoundError: No module named 'xlsxwriter'"
- The script uses a virtual environment. If running manually:
- Create venv:
python3 -m venv venv - Activate:
source venv/bin/activate(Linux) orvenv\Scripts\activate(Windows) - Install:
pip install xlsxwriter
- Create venv:
"externally-managed-environment" error
- The script now uses a virtual environment automatically
- If running manually, use:
python3 -m venv venvthen activate it
Excel file doesn't open
- Make sure the script completed successfully
- Check file permissions
- Try opening with LibreOffice Calc if Excel fails
Next Steps
- Review
EXCEL_GENERATOR_README.mdfor detailed documentation - Follow
TEST_CHECKLIST.mdto verify all features - Customize assets in
generate_defi_simulation.pyif needed