prepare contract class for margin management