OpenLeverageDev
openleverage-contracts
JavaScript

OpenLeverage Smart Contracts, including lending pools, margin trade, treasury, farming pool, DAO-based governance, OLE ERC-20 token, and time-weighted vote escrow xOLE components.

Last updated May 31, 2026
97
Stars
41
Forks
4
Issues
0
Stars/day
Attention Score
49
Language breakdown
JavaScript 56.5%
Solidity 43.5%
Shell 0.1%
Files click to expand
README

Node.js CI

OpenLeverage Protocol =================

The OpenLeverage Protocol comprises Smart Contracts in Solidity for permissionless lending and borrowing assets for leverage trading with DEX integration.

  • Through provided API, anyone can create a pair of lending pools for a specific token pair.
  • LToken, similar to CToken of Compound, is an interest-bearing ERC-20 token to be received by the fund supplier when they supply ERC-20 tokens to the lending pools. The LToken contracts track these balances and algorithmically set interest rates with a kinked model for borrowers.
  • All margin trades will be executed against the liquidity pool of DEX, like Uniswap.
  • Risk is calculated with real-time price from AMM.
  • Positions are protected with OnDemand Oracle utilizing TWAP from AMM.
Before starting this repo, please read the OpenLeverage Documentation, describing how OpenLeverage works.

Installation


To compile OpenLeverage Smart Contracts, pull the repository from GitHub and install its dependencies. You will need npm installed.

git clone https://github.com/OpenLeverageDev/openleverage-contracts.git cd openleverage-contracts npm install truffle compile

Testing


To run the tests, you will need ganache-cli:

npm install -g ganache-cli

Truffle contract tests are provided under the tests directory. run: truffle test

Audits


Licensing
The primary license for OpenLeverage is the Business Source License 1.1 (BUSL-1.1), see LICENSE, effectively a time-delayed GPL-2.0-or-later license. The license limits the use of the OpenLeverage source code in a commercial or production setting for up to two years, at which point it will convert to a GPL license into perpetuity.

Discussion


For questions about the protocol, visit us on Discord to discuss.

For security concerns, please visit OpenLeverage Security or email security@openleverage.finance.

_© Copyright 2021, OpenLeverage Team

© 2026 GitRepoTrend · OpenLeverageDev/openleverage-contracts · Updated daily from GitHub