---
# System prepended metadata

title: Certik Audit Batch 2

---

# Certik Audit Batch 2

Scope (in order of importance)

- Contracts in folders reserve, staking, ubi
- Upgrade process script and contract 
    - scripts/upgradeToV2/upgradeToV2.ts
    - utils/ProtocolUpgrade.sol
    - utils/ProtocolUpgradeFuse.sol
- GDX + GDAO merklehash calculations for airdrop
    - scripts/gdx/gdxAirdropCalculations.ts
    - scripts/governance/airdropCalculations.ts
- Helpers contracts in utils folder
    - NameService.sol
    - DAOContract.sol
    - DAOUpgradeableContract.sol

### Contracts to fully audit

#### Staking
- SimpleStaking.sol - Basic logic used by all staking contracts
- BaseShareField.sol - helper contract to calculate staking rewards pro-rata
- compound/GoodCompoundStaking.sol - instance of SimpleStaking using Compound
- compound/CompoundStakingFactory.sol - factory for GoodCompoundStaking
- aave/GoodAaveStaking.sol - instance of SimpleStaking using Compound
- aave/AaveStakingFactory.sol - factory for GoodCompoundStaking

#### Utils
- ProtocolUpgrade.sol - DAO actions to execute by Avatar to migrate existing DAO to new version on mainnet
- ProtocolUpgradeFuse.sol - upgrade process on fuse
- NameService.sol - simple contracts registery
- DAOContract.sol - simple helper contract to get basic DAO data
- DAOUpgradeableContract.sol - DAOContract that is UUPS upgradable and can be upgraded only by DAO (avatar)


### The following contracts should only be audited for changes

#### Governance
- GReputation.sol vs previous certik audit (setReputationRecipient)

#### Reserve
- GoodMarketMaker.sol vs https://github.com/GoodDollar/GoodContracts/blob/b84605c983cb431cbca11ecd3185f1afd1494ce4/stakingModel/contracts/GoodMarketMaker.sol

- GoodReserveCDai.sol vs https://github.com/GoodDollar/GoodContracts/blob/b84605c983cb431cbca11ecd3185f1afd1494ce4/stakingModel/contracts/GoodReserveCDai.sol

#### Staking
- GoodFundManager.sol vs 
https://github.com/GoodDollar/GoodContracts/blob/b84605c983cb431cbca11ecd3185f1afd1494ce4/stakingModel/contracts/GoodFundManager.sol

#### UBI
- UBIScheme.sol
https://github.com/GoodDollar/GoodContracts/blob/b84605c983cb431cbca11ecd3185f1afd1494ce4/stakingModel/contracts/UBIScheme.sol

### Scripts to audit
- scripts/upgradeToV2/upgradeToV2.ts
- scripts/gdx/gdxAirdropCalculations.ts
- scripts/governance/airdropCalculations.ts
