The state government spent nearly $10 billion on 161 projects – including the Commonwealth Games dispute – using a secretive fund known as the treasurer’s advance.