dtube icon indicating copy to clipboard operation
dtube copied to clipboard

Support for Ethereum alongside Avalon/Steem

Open danimesq opened this issue 5 years ago • 8 comments

  • [ ] Simple smart-contract for storing CID's containing video files as .json data (like Peepeth is doing for peeps and their images)
  • [ ] Login with 3Box
  • [x] ERC20 token paired by 1:1 exchange with DTC, for using it with Ethereum

danimesq avatar Jan 19 '20 17:01 danimesq

Then editing your video or posting a comment, or voting will cost you gas?

I don't think ETH it's very fitting for a social network app

skzap avatar Mar 11 '20 11:03 skzap

Hi. Thanks for not being skeptical and open for discussions.

Concerning about gas costs is a common outsider thought, but it is already a solved issue in different ways.


https://medium.com/@abcoathup/evolution-of-decentralised-social-media-dfe567d23e54


https://bit.ly/3cIQyvs


For Peepeth, it could use DTC and exchange it once a month for a Ether pool. Every hour (or 5 hours or a day) it makes a transaction (with a fee of less than 0.0X USD) containing a IPFS hash of a JSON file, which also contains the IPFS hash of new videos.

danimesq avatar Mar 11 '20 16:03 danimesq

Any user action such as comment or voting will not cost gas. They will keep using Steem and Avalon, while for Ethereum attaching this data to a JSON file.

danimesq avatar Mar 11 '20 16:03 danimesq

So basically, take the real json of videos on avalon, package them into an ipfs folder, and put the resulting hash on the ETH blockchain.

Sorry but to me this feel like a band-aid. Ethereum network wouldn't generate rewards, wouldn't be able to do critical features like rankings and voting. Only login and publishing?

It would also require putting a whole blockchain in IPFS and storing it ad vitam eternum. STEEM / Avalon can grow quickly because of short interval between blocks. STEEM's data is in the 100GB+ I believe atm. Still, it doesn't seem impossible.

I like the idea of having a pegged token on the Ethereum blockchain, and I don't mind having automated stuff happening in smart contracts, it can enable a lot of features that avalon doesn't and never will have. I guess it will be a good first step to your proposition, then we can start maybe building interoperability features once the pegged token exists.

Let me know if I'm understanding this right, and if that sounds like a good first step to you too :)

skzap avatar Mar 12 '20 16:03 skzap

So basically, take the real json of videos on avalon, package them into an ipfs folder, and put the resulting hash on the ETH blockchain.

Yes, put videos info into their own JSON files. About the hourly/daily listing, no, not a folder, but a JSON file of the day/hour's new videos, containing the hash of their videos' JSON.

Edit: it could be a folder, but a json file is better because you can put quick/important info about the listed videos.

An example:

Every 1 hour, create JSON file of every video info, then insert/list their CID in a main JSON file. This JSON represents this period (hour, or day for lighter usage).

Sorry but to me this feel like a band-aid.

As smart-contracts aren't a band-aid for Bitcoin, cross-chain interoperability also isn't.

Ethereum network wouldn't generate rewards, wouldn't be able to do critical features like rankings and voting. Only login and publishing?

Yes, a lot of sourcery can be done from the alchemy of Solidity's smart-contracts. Both rewards, ranking, voting and even governance and monetization. But ethical design is to do it simple, which focus is user logins and a wrapper token for both Steem and DTC, like there is WBTC.

It would also require putting a whole blockchain in IPFS and storing it ad vitam eternum. STEEM / Avalon can grow quickly because of short interval between blocks.

I totally agree. That's why the Ethereum's best games uses other blockchains such as Loom Network, for professional blazing speeds. And good that DTube haves its own. It isn't putting a whole blockchain on IPFS, and else is also untrue: it isn't putting files in the blockchain, but their CIDs inside a simple JSON file. So, a transaction can contain only one CID (enables cheap micro transactions) of a JSON file containing other CIDs from video's own JSON file. This model is already being used by some sites, and it is called stateless, cheap transactions for social networks.

Only login and publishing?

Not only login. It will drive a increased value for DTC with its own wrapped token for 1:1 exchange, get new uses from anti-steem users and Ethereans (the biggest community after BTC which we can't disdain, and the pure DTC is part of the BTC spectrum), and also enable Basic Attention Token transfers. Other benefits and combinations are also a thing.

STEEM's data is in the 100GB+ I believe atm. Still, it doesn't seem impossible.

100GB+ on-chain, but in JSON files it really is feasible and secure.

I like the idea of having a pegged token on the Ethereum blockchain, and I don't mind having automated stuff happening in smart contracts, it can enable a lot of features that avalon doesn't and never will have.

It means DTC can be exchanged for ETH, tokens and even Bitcoin (throught WBTC/tBTC) and stablecoins (USDT, USDC, DAI), and used in DeFi protocols and also as collateral to generate DAI. A lot of combinations can be done from a token, and even more when it is a utility token linked to a external coin (DTC). Yes, every hour/day saving videos to JSON files in a main JSON file will require its own smart-contract and a daemon/cronjob periodically interacting with this contract (in this case, submiting a transaction with a IPFS CID).

I guess it will be a good first step to your proposition, then we can start maybe building interoperability features once the pegged token exists.

It is a choice of which is less work to do: a exchange with a pegged token, or a smart-contract with a funded cronjob interacting with.

Let me know if I'm understanding this right, and if that sounds like a good first step to you too :)

Yes, with some misunderstanding but you're very heads-up with that. Personally, and I think externally, the first step before a pegged token is inserting web3.js and getting user ETH address from MetaMask/wallet, then storing it in a user profile and other users can copy this address or use the Gift feature to send ETH/tokens such as BAT, or even NFTs to be displayed in profile such as CryptoKitties. Ask.fm had a awesome feature of exhibiting user's gifts fixed in their profiles like a schoolbag with bottons. Also, DTube can use a existing service to distribute its own NFTs, for example, according to milestones in subscribing, a good and modern alternative to YouTube's physical plates. As Avalon above Steem was a groundbreaking change very welcomed, Ethereum will also be a huge step for DTube positioning as a modern dapp.

danimesq avatar Mar 13 '20 03:03 danimesq

For simplifying the use of web3.js and avoiding redundant work, you can use that: https://3box.io/. If DTube uses ReactJS, it just will be about inserting drop-in components. Alongside Steem and Avalon login buttons (which should have a design improvement - https://github.com/dtube/dtube/issues/141), also a button for logging with 3Box (should be called Ethereum to avoid confusion). Then, it changes Avalon/3Box user info directly from Steem and vice-versa like a sync. There is a lot of users which haves their 3Box accounts but doesn't for a Steem account.

3Box isn't a fork of Ethereum, but a framework for implementing user profiles on it and being easier for developers on implementing MetaMask/wallet logins (the Connect popup for sharing ETH address with the site). Users can have the same profile in different sites (so, the sites such as DTube doesn't haves the work of storing and managing user profiles) and choose which info they want to change throigh MetaMask popups for consent. Also, sites can create their own userdata fields specific to their site, which can also be read in other sites upon user consent (user only have to consent with private data, but the majority in 3Box is public data, like in DTube).

danimesq avatar Mar 13 '20 03:03 danimesq

"ERC20 token paired by 1:1 exchange with DTC, for using it with Ethereum" is done 🍮

danimesq avatar Apr 22 '21 01:04 danimesq

"Ethereum network wouldn't generate rewards, wouldn't be able to do critical features like rankings and voting. Only login and publishing"

The idea isn't replacing HIVE/Avalon, but adding an alternative layer for composition. But using an layer2 solution on Ethereum can enable real-time rewards/ranking/voting without gas and speed hurdles.

danimesq avatar Apr 22 '21 01:04 danimesq