Skip to content

Latest commit

 

History

137 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fixed Rate Vaults

Smart contracts for fixed-rate lending vaults built on the Venus Protocol ecosystem.

Overview

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.

Development

Prerequisites

Build

forge build

Test

forge test

Format

forge fmt

Gas Snapshots

forge snapshot

Environment Setup

Copy .env.example to .env and fill in your values:

cp .env.example .env

Required variables:

  • PRIVATE_KEY — deployer private key
  • ETHERSCAN_API_KEY — for contract verification (Etherscan V2 API key works across chains)
  • RPC_URL_* — RPC endpoints for each network

Deploy

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 --verify

Alternatively, 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 --verify

Verify

forge verify-contract <contract-address> <ContractName> --chain bsc_testnet

Links

About

Fixed Rate Vault Smart Contracts for the Venus Protocol

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages