Contest ran 14 April 202220 April 2022

6 day contest

Badger Citadel contest

Bringing BTC to DeFi

$75,000 USDC

Total Awards

Badger Citadel contest details

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.

Getting Started

Prerequisites

Installation

Install and update submodules:

git submodule init
git submodule update

Installation

Install hardhat dependencies:

npm install

Compilation

forge build

Tests

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 deploy

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

System Overview

An informal video offering a summary of the system.

Contract / Subsystem Overviews

Code4rena: Audit Scope & Assumptions

  • 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.

What's in scope?