Lotto: clean rpc calls and rule