This repository contains the core smart contract code for Kresko protocol, which supports the creation and management of crypto-backed synthetic assets. Prices for synthetic assets are committed on chain by trusted oracles. Kresko uses a proxy system so that contract upgrades are not disruptive to protocol functionality. This is a usage and integration guide that assumes familiarity with the basic economic mechanics as described in the litepaper.
Install dependencies:
pnpm i
Create local .env file:
cp .env.example .env
Example values:
MNEMONIC=your mnemonic here
LIQUIDATION_INCENTIVE=1.1
LIQUIDATION_THRESHOLD=1.4
MINIMUM_COLLATERALIZATION_RATIO=1.5
MINIMUM_DEBT_VALUE=10
FEE_RECIPIENT_ADDRESS=0x0000000000000000000000000000000000000FEE
Run tests:
pnpm test
Compile and dry-run the deployments on hardhat-network:
pnpm deploy
Deploy to external networks:
pnpm deploy --network <network>
Open source contributions to Kresko Protocol are encouraged, feel free to open an issue or pull request.
Critical bug disclosures and inquiries should be directed to: