Polkadot Hub - Smart Contracts - Feature - HTTPS post / WebHook to Web2 endpoint

I just heard that the Polkadot App will allow users to interact with Polkadot Hub Smart Contracts. If so, this is a really cool feature. What would make Polkadot Hub Smart Contracts the “killer app” that the Polkadot ecosystem really needs is to allow the Smart Contract to pass state variables to a Web2 endpoint using an HTTPS post / WebHook. This would really place emphasis on the Smart label in Smart Contracts and allow quick Web2 integration. The passing of state variables should happen post block creation so as not to slow down block production.

As an example, a real estate company could accept crypto payments for monthly rents. They could create a Smart Contract on Polkadot Hub to accept crypto as payment for an apartment lease. The real estate company could then direct their tenant to install the Polkadot App. The tenant could then interact with the Smart Contract by depositing USDC or some other asset. Upon contract execution, the real estate company receives an HTTPS post / WebHook passing certain state variables such as Amount, ApartmentName, Date, MobileNumber, Email, TransactionHash, PublicAddress etc. Now, the real estate company can easily update their database showing that the payment has been made. The tenant can either connect their Wallet with the real estate companies Web2 portal (public address linked to account) or perhaps pass their mobile number, email (some unique identifier) etc… using the Polkadot App with their payment. The feature effectively allows millions of businesses to use the Polkadot App to receive crypto payments.

If properly marketed, this could be a key reason why businesses choose to build on Polkadot.

1 Like

If you are looking to push on chain activity to a Web2 HTTPS endpoint, this is already possible today with Ocelloids.

For your specific use case the right piece would be the Informant agent. It lets you filter any event or extrinsic and deliver it to your HTTPS endpoint via webhooks.

You can define exactly what to monitor, apply fine grained filters, and format the payload using templates so the POST body matches what your endpoint expects.

Delivery is reliable, webhook calls are retried until acknowledged, and payloads are authenticated and signed using HMAC 256 so you can verify they are genuine. For an extra level of security, storage proofs could also be delivered (this is not implemented yet but is easy to add if your use case requires it).

Docs: https://www.ocelloids.net/docs/capabilities/webhooks/

If you have a concrete use case you want to implement, feel free to DM us.

1 Like

Ok, here comes my analytical product mind :joy:

  1. With multi in app unique smart contract deployments for payments what is the unique identifier for the purchaser? Or are you sending direct in app to a singular user like a bill?
  2. With Proof of Personhood (POP), email & phone shouldn’t come into play here as that’s the promise Polkadot made.
  3. Seems like tokenized ownership transfer isn’t far off here & dare I dream… but with a lease, could a temporary tokenized contract not be far off? This is digital after all, temp holds like a pre-with in finance could play a role in Realestate exchange/borrow?
1 Like