There are 3 main pieces in Compound Farm contract:
This is the contract for CMP token with max supply 200,000,000.
https://github.com/primes-dev/cmp-contracts/blob/master/CMPToken.sol
This is the farming logic, with all the pools info.
https://github.com/primes-dev/cmp-contracts/blob/master/Farm.sol
This is the vault, responsible for compound investing.
https://github.com/primes-dev/cmp-contracts/blob/master/StratX_MDEX.sol