Assemby of the Knights
The high-level concepts and progress updates can be found on Medium.
An informal video offering a summary of the smart contracts.
Install and update submodules:
git submodule init
git submodule update
Install hardhat dependencies:
npm install
forge build
Because the tests interact with mainnet contracts, tests must be run in mainnet fork mode.
forge test --fork-url <mainnet-rpc-url>
⚠️ Some tests are currently failing, they are under active development
Hardhat Ganace is more reliable than ganache itself for UI testing so we provide an integration with hardhat as well. This will be run the deploy script on default network, but don't be shy to use other hardhat options for it
npx hardhat run scripts/deploy-local.js --network localhost
For deploying using mock cvx and wbtc use this script
npx hardhat run scripts/deploy-mock.js --network YOUR_SELECTED_NETWORK
For minting mock wbtc or cvx use this tasks
npx hardhat --network YOUR_SELECTED_NETWORK mint-wbtc --address YOUR_SELECTED_ADDRESS --amount YOUR_SELECTED_AMOUNT
npx hardhat --network YOUR_SELECTED_NETWORK mint-cvx --address YOUR_SELECTED_ADDRESS --amount YOUR_SELECTED_AMOUNT
An informal video offering a summary of the system.
- Access Control
- Citadel Token
- Staked Citadel
- Locked Citadel
- Emissions and Distribution
- Knighting Round
- Oracles
- Other
-
Assume all allocated role permissions are correct in the setup of the system.
- e.g. holders of CONTRACT_GOVERNANCE_ROLE won't rug or set malicious permissions for other roles.
- However, if roles can be set in an unintended manner, this is a very valid finding,
See BaseFixture.sol for how the system components are wired together in practice.
- All (non-test) contracts in this repo.
- The modified convex locker from our staked-citadel-locker repo.
- The MedianOracle from ampleforth.