The createStrategy() function first deploys a proxy contract and sets the deployed Strategy contract as the implementation. It then adds the contract address to the TokenRegistry contract and initializes the Strategy with relevant token metadata and its initial structure. Finally, it calls setupStrategy() in StrategyController which sets the strategy state and does the first deposit.