Skip to content

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.

License

Notifications You must be signed in to change notification settings

OpenLeverageDev/openleverage-contracts

Repository files navigation

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

About

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.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •