Core smart contracts of Rysk Ciao.
Rysk Ciao is a decentralized protocol for a multi-derivative orderbook. For speed reasons, the orderbook and matching algorithm are performed in an off-chain server. This repo contains contracts for settlement, margining, and liquidation.
contracts
├── crucible
│ ├── Crucible.sol
│ ├── SpotCrucible.sol
│ └── PerpCrucible.sol
├── interfaces
│ ├── Errors.sol
│ ├── Events.sol
│ ├── IAddressManifest.sol
│ ├── ICiao.sol
│ ├── ICrucible.sol
│ ├── IFurnace.sol
│ ├── ILiquidation.sol
│ ├── IOrderDispatch.sol
│ ├── IPerpCrucible.sol
│ └── IProductCatalogue.sol
├── libraries
│ ├── AccessControl.sol
│ ├── BasicMath.sol
│ ├── Commons.sol
│ ├── EnumerableSet.sol
│ ├── MarginDirective.sol
│ └── Parser.sol
├── AddressManifest.sol
├── Ciao.sol
├── Furnace.sol
├── Liquidation.sol
├── OrderDispatch.sol
└── ProductCatalogue.sol
oracle provider is stork: https://docs.stork.network/available-stork-feeds
For those intrerested in local development in foundry.
- Install foundry following the instructions here: https://book.getfoundry.sh/getting-started/installation
- Install solmate dependencies
forge install transmissions11/solmate
- Install openzeppelin contract dependencies
forge install OpenZeppelin/openzeppelin-contracts
- Install openzeppelin contract upgradeable dependencies
forge install OpenZeppelin/openzeppelin-contracts-upgradeable
- Add envs according to env.example
forge test