videoDAC / android

Repository for storing code, configuration and information about the applications developed by videoDAC for Android.
GNU General Public License v3.0
3 stars 5 forks source link

Integrate Connext 2.0 into `videoDAC` template pay-to-play stream Consumer app #21

Open criticaltv opened 4 years ago

criticaltv commented 4 years ago

Current Situation

Currently, Video DAC's pay-as-you-go Android app template (e.g. used in Görli TV app) can be configured to make payment of 0.0005 ETH (~13¢) via the app every 1 minute using native onchain ETH transactions.

Each transaction requires gas to be paid (21,000 units), which at 2 gwei gas is 0.000042 ETH (~1.1¢), or 8.4% fees.

This is relatively expensive, when charging e.g. 10¢ per minute, and it hinders us from charging per second (instead of per minute).

Scope of this issue

This issue is about integrating the Görli TV app with Connext 2.0, to allow payments to be made with lower (preferably zero) per-payment transaction costs.

The app should release payment into the recipient's control after every 1s of streaming video content watched by the viewer.

Out of scope

The app does not need to:

Implications of this functionality

The key output of this functionality would be to allow the app to be configured to send smaller payments per unit of time. For example, sending

0.0001 $DAI per 1 second of video played. This equates to e.g. 0.6¢ per minute, or $0.36 per hour of video played.

It would also enable payments in ETH or an ERC-20 token (e.g. a Stablecoin such as $DAI, or a project's own coin such as $BAT, $MKR, $OMG, $SNT, $OXT, $ZRX, $PLN, $JULIEN, $cDAI, Tether).

Specific deliverables

Some specific requirements

Further context

This issue is related to the following issues:

https://github.com/videoDAC/apps/issues/8 https://github.com/videoDAC/apps/issues/7

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 130.0 LPT (196.3 USD @ $1.51/LPT) attached to it.

Abhimanyu121 commented 4 years ago

I am kind of unsure how connext will work, as they have only js SDK and I couldn't find RPC endpoint for their testnet either.

criticaltv commented 4 years ago

@Abhimanyu121 take a look at the J2V8 lib https://github.com/eclipsesource/J2V8 to integrate the connext npm package with Kotlin's Java bindings.

It runs the V8 javascript engine so it could be very performant.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of this issue was increased to 230.0 LPT (112.75 USD @ $0.49/LPT) .

criticaltv commented 4 years ago

Hi @mul1sh thank you for your application. We will accept your application.

Please take care to fulfil the Specific Requirements for this, namely:

Specific deliverables

Some specific requirements

gitcoinbot commented 4 years ago

@mul1sh Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

mul1sh commented 4 years ago

@gitcoinbot I've been actively working on this, will submit a PR soon! 😃

gitcoinbot commented 4 years ago

@mul1sh Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

mul1sh commented 4 years ago

Ok the rinkeby hub is working, time to connect it to the app now :)

criticaltv commented 4 years ago

Good work @mul1sh !

Ping me here if you hit any blockers!

gitcoinbot commented 4 years ago

@mul1sh Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

mul1sh commented 4 years ago

Ok will pause working on this for now, so that I research on better ways of doing the connext integration without the server side dependencies.

criticaltv commented 4 years ago

@mul1sh this makes sense. Thank you for the update.

Maybe there could be a very elegant solution in conjunction with the "work in progress" being done by @psudoanon on the MVP "Livestream-to-earn" Publisher Template App?

In that case, the Publisher device will be guaranteed to be "online" to "receive payment" because it's publishing the livestream.

If @mul1sh has done the work on the "Consumer" side to send micro-payments using Connext 2.0, then perhaps it might just be a case of doing the work on the "Publisher" side to receive them?

Thoughts?

mul1sh commented 4 years ago

@criticaltv yes correct so long as the pulisher can create a connext channel and we also have a way of querying the channels public id, then its very much possible to do the micro-payments.

criticaltv commented 4 years ago

OK, so, let let @psudoanon finish up https://github.com/videoDAC/android/issues/31 and then look at a new piece of work to connect the Publisher App with the Consumer App.

gitcoinbot commented 4 years ago

Issue Status: 1. Open 2. Cancelled


The funding of 230.0 LPT attached to this issue has been cancelled by the bounty submitter