REEE (REcommendation Engine Extension)

Users share YouTube watch history with us and get video recommendations (what did users with similar histories watch), and also get corresponding quantities of our coins.

transparency

To prove that our video recommendation extension sustains privacy and is trustworthy, we made it source-available (without a license). Furthermore, it’s buildless – no obfuscation, no minimization, no bundling. Similarly, the smart contract is audit-friendly.

implementation

(There are links in the diagram – but they only work when viewed directly (right-clickOpen Image in New Tab or anything analogous) – and also it’s more convenient overall.)

REEE

Omitted in the diagram:

frontend (the extension)

At first we wanted to fork youtube-watchmarker that “asks” YouTube for user’s watch history. Soon we figured out that for our use cases “asking” the browser is better.

blockchain, smart contract, fungible token

At first, we created a completely ordinary ERC20/BEP20 “currency” by publishing onto the Binance’s BNB Smart Chain a completely simple smart contract written in Solidity.

Luckily, before we began using it we realized that there’s a potential for easy yet huge cost optimization – one big operation is radically cheaper than many small ones. So, we added our own methods – wrappers that take arrays in place of single values and call the wrapped builtin methods in a loop.

While at it, we figured that for transparency a simple import is better than dependency-free approach. After this change our modifications are isolated and apparent, and the rest is done by a trustable third party with conveniently proper distribution of code across files and folders.

backends

MetaMask wallet

At the time wallet standards were at their infancy and the wallets hardly tried to cooperate in establishing them. Thus, it wasn’t possible to support a choice of wallets without half of code being hacks and workarounds. Anyway, only MetaMask had both the popularity and the decent official documentation.

As a result, we used eth_signTypedData_v4.

conclusion

We published an alpha version of the extension for free and attempted to promote it on relevant social media groups/hashtags/subreddits. Of course, the aforementioned rewards were a part of our marketing strategy. After getting a disappointing number of users, we had to cancel the project.

info

link:
https://addons.mozilla.org/en-US/firefox/addon/recommendationengine/
client:
Woj
stack:
WebExtension, Ethereum, Binance, REST, Express, PostgreSQL, DigitalOcean
skills:
Firefox, Chrome, Chromium, HTML, CSS, JS, ERC20, App Platform, MetaMask, JSON-RPC
billing:
hourly without escrow
role:
developing everything outside of the video recommendation engine itself