Skip to content

Instantly share code, notes, and snippets.

@ramkumarvenkat
ramkumarvenkat / dreamland.md
Last active January 2, 2024 11:40
Dreamland technical question

Dreamland is a new age AI+metaverse company and has a concept of games, where every user can play these games with AI agents and win DREAM tokens multiple times a day. A user can win upto 5 DREAM tokens on a single day.

DREAM tokens are a virtual currency and have a real monetary value. At the end of every hour, the tokens won by the user are converted to USD by calling a third-party API that provides the rate (for the assignment, we can hardcode to 15 cents per token).

Every time a user is issued a token and it gets converted to USD, there will be fees which we need to keep track of (the user will not bear the fees, but Dreamland will)

In the backend, there are double-entry accounting ledgers that keep track of a user's tokens, the current USD value and the fees.

Imagine you are building APIs for Dreamland:

In a highly regulated industry in the US, there is a regulation that states that all communications should be archived and available for querying at any time.
For example, lets assume that the company uses the following internal tools:
1. Google for emails
2. Slack for internal communication
3. Whatsapp for customer communication
4. Zoho for customer support
As an engineer working with the compliance team, your task is to design a system that stores all the data from the above systems in a cloud and make it available for querying.