Skip to content

Conversation

@sidvishnoi
Copy link
Member

@sidvishnoi sidvishnoi commented Oct 29, 2025

PR Checklist

  • Linked issue added (e.g., Fixes #123)
  • If blog post was added:
    • Ensure images have been optimised
    • Update dates to reflect the actual publishing date when merged (file names, folder names, and frontmatter)

Summary

Follow up of #163.
Aiming to get it published by Dec 8.

@sidvishnoi sidvishnoi force-pushed the sidvishnoi/wm-ext-op-part-2 branch from 13b9580 to 323423d Compare December 4, 2025 13:27
@sidvishnoi sidvishnoi marked this pull request as ready for review December 4, 2025 13:27
addedLinkElements.forEach((elem) => {
const id = assignId(elem)
const walletAddressInfo = await validateAndFetch(elem.href)
dispatch('start_monetization', { walletAddressInfo, id })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again I realise that you're assuming base knowledge of WM but I think clarity just makes reading easier. This can make it seem like monetization is starting all link elements simultaneously rather than setting them up to all be available for receiving. Unless I am behind on changes, my understanding is that each wallet address takes a turn to get paid? It might be nice to clarify that above or below. Like being on a site with 10 wallet addresses costs no extra per second than being on a page with 1.

Copy link
Member Author

@sidvishnoi sidvishnoi Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced the start_monetization with setup_monetization and also added a paragraph about multiple link elements in start. I hope that reduces the confusion.


### Manually finding minimum sendable amount

We use a probing method to find the minimum sendable amount. For example, if we try to send MX$0.01, we receive a "non-positive receive amount" error. We note this error and then attempt MX$0.02, which also fails.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it sound like you are trying to make payments with no upper boundary, like we try to send this and it doesn't work so we try sending more. What you're actually doing is checking the quotes. I think in terms of building confidence in new standards it helps to talk in ways that don't make people anxious before they understand the full context. So you could phrase this around quotes, or non fulfill-able payment requests or something rather.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in da945bb.

We observed that MX$0.16 was not sendable, while MX$0.32 was sendable. Therefore, the minimum sendable amount lies somewhere in between. This is a textbook use-case of the binary search algorithm!
The midpoint between the two amounts is MX$0.24, which is sendable, but it is still above the minimum sendable amount. When we find the midpoint of MX$0.16 and MX$0.24, we get MX$0.20, which is also not the minimum sendable. After some back and forth, we determine that MX$0.17 isn’t sendable, but MX$0.18 is, concluding that MX$0.18 must be the minimum sendable amount.

Each test to determine whether an amount is sendable or not costs us one create quote request, which can add up significantly and delay the time it takes to send money to the recipient. To optimize this process, we can utilize currency exchange rates. Instead of starting our tests from MX$0.01, MX$0.02, MX$0.04, and so on up to MX$0.32, we can begin at MX$0.18. This way, we’ve trimmed our search space by a considerable margin. We still need to confirm whether the amount is sendable, as there may be associated fees, and to verify if it is indeed the minimum sendable amount. However, we have minimized the number of unnecessary requests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have now increased the amount sent, it would be nice to add an explanation of increasing the time period too, to keep average payments / second at a relatively constant pace. Because, again, this feels like you agree to one thing up front in the extension and now all of these changes are happening outside of your control and readers may want some reassurance that they won't suddenly be sending 18x what they had planned per second.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 7f00c56.


Before creating the outgoing payment with our previously acquired tokens, the Open Payments API requires us to set up a receiving channel.

The process begins by creating an incoming payment grant on the receiver's wallet. This grant is non-interactive, meaning the user does not need to manually approve each incoming payment, which would be very cumbersome. Once we obtain the permission, we can proceed with creating the actual incoming payment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this confusing on first read. You say you don't need approval but you're waiting for permission. It would help to be clearer about user approval vs authorization servers granting permission.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 5b9ed35.

@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for developers-preview ready!

Name Link
🔨 Latest commit 988d0e3
🔍 Latest deploy log https://app.netlify.com/projects/developers-preview/deploys/6936b72b65c08d0008624926
😎 Deploy Preview https://deploy-preview-164--developers-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants