typto

Decentralized tipping for youtube creators, even if they don't have an ethereum address yet

Description

Ad revenue is not sufficient for the majority of creators so another income source is needed in all cases. Platforms like patreon are centralized and demand hefty fees, similarly platform-centric tipping as seen on twitter or twitch leaves creators beholden to a single entity. DeFi is the obvious solution to the problem. What we have built is a smart contract for facilitating routing of tips to a content creator. The user doesn't need to know the eth address of the creator as we refer to a chainlink oracle to get it directly from the creator's youtube page. If the user does not have an address then the contract router takes the coins into custody (trustlessly) and stores the tip details in an array. The creator can then receive by adding an eth address to their channel description. Next Steps The mechanism so far only allows for one-directional interaction: users -> creator. We're very excited about making this interaction bidirectional. One idea is to allow the creator to reward tippers by sending back a token upon receipt of a tip. There are a couple of ways to design this, but we want to spell out one we find particularly interesting: The creator may decide to reward tippers with a badge or NFT for tipping within a certain time period, for example shortly after a video was uploaded. The reward amount can be 1 token per tip transaction, 1:1 tokens per tip value (if price oracle available), 1 token randomly allocated via lottery to anyone who tipped in a certain time period. We're exited about this 'rewards' feature not only because it incentivises more tipping, but it helps establish a more visceral bond between the creators and their community. Only support youtube at the moment but adding other platforms is as easy as created new extension adapters.

typto showcase

How it's made

There are two core points in our DAPP where trustlessness is essential: - The routing (and potential custody) of tips - The resolution of youtube IDs to ethereum addresses Users can send a tip to a creator by calling the deposit function. In addition to specifying the amount and address of the ERC20Token they wish to send, they need to specify an address for the address-resolution-oracle, as well as a youtube username. The Router can then by 'poked' to initiate the address resolution. It will then lookup the addresses by calling the specified oracle, and if an address was found, it will transfer the funds to the recipient. We allow for the user to specify any address-resolution-oracle address to add an additional layer of trustlessnes. In our own front-end this will be hard-coded to the chainlink oracle. Note that the specified address-resolution-oracle has to implement the AddressOracle interface for this to work. We decided to tap into ChainLink to facilitate the trustless resolution of youtube IDs to ethereum addresses. Since there was no existing adapter in the network that provides the "youtube_id -> address" API, we decided to build it. The lookup works in two parts, 1) retrieve the youtube channel description details 2) run a regex over the details string to extract an eth address, or return 0x0 if not found.

Technologies used

ChainlinkSolidityTruffle