Implement contract balance handling.