The chief similarity is that young men come into possession of an object with fantastic magical powers. In both cases they have a possession that enables them to have anything in the world they want. Both, of course, end up with beautiful wives, because that is the one possession young men want more than anything else. Your question suggest persuasively that Robert Louis Stevenson got the idea for his story from the well-know story "Aladdin and the Magic Lamp." Aladdin was perfectly happy with his lamp until his wicked uncle managed to get it away from him by offering new lamps for old. The hero of "The Bottle Imp" was only happy at first, but then he began to realize that his possession could be terribly dangerous unless he could get rid of it by selling it for less than he had paid for it. Aladdin wants to get his magic lamp back, while Keawe only wants to get rid of his magic bottle. But both seek to retain the wealth and happiness they received from their magical objects.