Wasn't that how ads were actually implemented on Firefox's homepage several years ago? IIRC, Mozilla developed it in cooperation with IAB as a solution to privacy (the ad-funded web being practically unavoidable), deployed it (maybe only in alpha or beta), and then people went ballistic over advertising in Firefox - without realizing it was a huge privacy gain - and Mozilla pulled it. Here's one article I found quickly; note that ads are based on local browser history.
https://www.cnet.com/news/mozilla-officially-kicks-off-ads-i...
And it looks like Mozilla is trying it again, though this is from a few months ago. What happened to it?
https://blog.mozilla.org/futurereleases/2018/04/30/a-privacy...