Here is another take at the example showcased by the Elixir team for an AENS Marketplace.
In this case we use transaction delegation to allow the contract to transfer names on behalf of the caller.
The example contract supports also selling a name directly to an account or openly put a name for sale and also selling the whole marketplace to another merchant.
For the source code check the github repo.
EDIT: there are some updates on the repo, it nows includes the configuration to run a local node to run the demo locally