Inspiration

I was inspired by SLA example in chainlink repo. I realized that currently, it is not very convenient and efficient to resolve SLA dispute. With blockchain, I can programmingly resolve the dispute. Another issue I identified in current cloud service is that most of cloud service is subscribed by month, but it is not fair price model for user with low utilization. I think it will be very helpful to enable micro payment for service they actually use. There are multiple micro payment solutions out there, but I found out only Celer is able to support conditional payment by querying on-chain information. With conditional payment, I can use service condition to trigger payment.

What it does

I built a new payment and dispute solution for cloud service. Users are able to make micro payment for the service they actually use by minutes. It also uses on-chain oracle to monitor the service status. If the service is always on within a minute, user will pay the service provider. If the service goes down, user does not need to pay the service provider, and the service provider will pay the user instead for its lost based on SLA.

How I built it

I use firebase to mock up a service status endpoint. I create a on-chain contract using Chainlink to record the service status if there is any change. I use Celer to send conditional payments betIen the user and the service provider. I write the two smart contract functions, which Celer will use to resolve conditional payment. I also develop a simple service, which will query service status locally every second, if the service status is changed, it will trigger related Chainlink on-chain function to record service status. If the service status is off, the payment condition will resolve immediately based on SLA rule.

Challenges I ran into

Celer payment is very new solution, so I need to work closely with the Celer team to figure out how exactly each API works.

ChainLink currently only supports limited adapter, such as it can only parse json response, and the response value must be int. Therefore, I need to design on-chain condition accordingly to make sure that it works for both Chainlink and Celer.

Accomplishments that I'm proud of

The solution I developed works as expected. Conditional payment is really a game changer for subscription based service. It offers many benefits for both users and providers. I believe this kind of solution will have great value and benefit in the real world and is able to bring blockchain technology to mass adoption.

What I learned

It is nice to work with the founding team together to learn its tech stack

What's next for Micro Subscription

Make it more users friendly, especially for non technical users Multiple state channel based payment provider support Reach out to some companies to see if they are interesting in adapter the new technology

Built With

Share this project:
×

Updates