Smart contracts for fixed-rate lending vaults built on the Venus Protocol ecosystem.
Fixed Rate Vaults enable users to lock in fixed interest rates for borrowing and lending within the Venus Protocol. These contracts provide predictable yield and borrowing costs by abstracting the variable-rate nature of the underlying Venus markets.
- Foundry
- Solidity 0.8.25
forge buildforge testforge fmtforge snapshotCopy .env.example to .env and fill in your values:
cp .env.example .envRequired variables:
PRIVATE_KEY— deployer private keyETHERSCAN_API_KEY— for contract verification (Etherscan V2 API key works across chains)RPC_URL_*— RPC endpoints for each network
The PRIVATE_KEY is loaded from .env inside the deploy script via vm.envUint("PRIVATE_KEY"), so no need to pass it on the command line:
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);forge script script/Counter.s.sol:CounterScript --rpc-url bsc_testnet --broadcast --verifyAlternatively, you can skip vm.envUint in the script and pass the key directly:
forge script script/Counter.s.sol:CounterScript --rpc-url bsc_testnet --private-key $PRIVATE_KEY --broadcast --verifyforge verify-contract <contract-address> <ContractName> --chain bsc_testnet