Implement the invest action

But it's untested