π Unfamiliar terms? See the glossary for definitions.
Know your sellerβs ready before you pay. Device health prevents fraud before it happens.
Device health checks are diagnostic metrics sent by the sellerβs bot as part of the Nostr payment info response. They tell the buyer whether the sellerβs device is in good condition to receive bank notifications and lock BCH.
When MarΓa requests payment details from a seller, she doesnβt just get a bank account numberβshe also gets:
If the sellerβs device is unhealthy (bank app disabled, battery dead, notifications broken), MarΓa sees a warning before she sends fiat. She can cancel the covenant and pick a different seller. No money wasted on a seller who canβt complete the trade.
Without health checks:
1. MarΓa creates covenant
2. MarΓa sends β¬100 via Bizum
3. Seller's bank app is disabled (no notifications received)
4. Seller never locks BCH (doesn't know payment arrived)
5. MarΓa waits 48 hours, covenant expires, funds returned
6. MarΓa lost time, seller reputation damaged (maybe innocent)
Or worse:
1. MarΓa creates covenant
2. Seller's phone battery is at 2% (about to die)
3. MarΓa sends β¬100 via Bizum
4. Seller's phone dies 30 seconds later
5. Seller doesn't see notification, doesn't lock BCH
6. MarΓa stuck waiting
Or actual fraud:
1. Malicious seller disables bank app notifications
2. Posts bulletin board listing (looks legitimate)
3. MarΓa sends payment
4. Seller claims "never received notification"
5. Dispute process triggered (costly, slow)
6. Seller keeps fiat, never locks BCH
With device health checks:
1. MarΓa creates covenant
2. MarΓa requests payment info via Nostr
3. Seller's bot responds with health metrics
4. MarΓa's app sees: "β οΈ Seller's bank app is disabled"
5. MarΓa cancels covenant, picks different seller
6. No fiat sent, no fraud possible
Proactive fraud prevention. Catch problems before money moves.
The sellerβs bot reports five critical metrics:
| Metric | What It Checks | Why It Matters |
|---|---|---|
| Bank app installed | Is the sellerβs bank app present on their phone? | If not installed, notifications impossible |
| Bank app enabled | Is the app disabled by the user or system? | Disabled apps canβt send notifications |
| Battery optimization | Is the bank app excluded from battery optimization? | Android kills optimized apps, blocking notifications |
| Battery level | Current battery percentage (0-100%) | Low battery means phone might die soon |
| Charging state | Is the phone plugged in? | Charging = more reliable availability |
All checks automated. The sellerβs bot performs them in milliseconds, sends results with payment info.
Health checks are part of the payment_info_response message.
{
"type": "payment_info_request",
"covenant_id": "covenant_xyz789",
"amount_eur": 100,
"payment_method": "Bizum",
"sender_pubkey": "npub1maria..."
}
{
"type": "payment_info_response",
"covenant_id": "covenant_xyz789",
"payment_method": "Bizum",
"account_number": "+34-612-345-678",
"reference": "ASGAYA-XYZ789",
"amount_exact": "β¬100.00",
"expires_at": "2026-06-10T15:30:00Z",
"device_health": {
"bank_app_installed": true,
"bank_app_enabled": true,
"battery_optimized": false,
"battery_level": 67,
"is_charging": true,
"timestamp": "2026-06-10T15:00:00Z"
}
}
Encrypted. Only MarΓa can read this. Health metrics are privateβother buyers donβt see the sellerβs battery level.
MarΓa doesnβt see JSON blobs. The app translates health metrics into simple warnings or confirmations.
βββββββββββββββββββββββββββββββ
β Pay β¬100.00 to: β
β Phone: +34-612-345-678 β
β Reference: ASGAYA-XYZ789 β
β β
β β
Seller ready (67% battery, charging) β
β β
β [Open Bizum App] β
βββββββββββββββββββββββββββββββ
Green light. MarΓa proceeds with confidence.
βββββββββββββββββββββββββββββββ
β β οΈ SELLER DEVICE ISSUES β
β β
β β’ Bank app disabled β
β β’ Battery at 8% (not charging) β
β β
β Seller may not receive your β
β payment notification. β
β β
β [Pick Different Seller] β
β [Continue Anyway] β β
βββββββββββββββββββββββββββββββ
MarΓa decides: Cancel and pick a healthy seller (recommended), or proceed with risk (her choice).
βββββββββββββββββββββββββββββββ
β π SELLER NOT READY β
β β
β β’ Bank app not installed β
β β
β This seller cannot receive β
β payment notifications. β
β DO NOT PAY. β
β β
β [Pick Different Seller] β
βββββββββββββββββββββββββββββββ
Red flag. Payment blocked. Prevents definite fraud.
Sellers donβt manually report healthβitβs automatic. But they do need to maintain device health for good reputation.
When a seller installs the Asgaya bot (or BizumParser monitoring app), the app guides them:
βββββββββββββββββββββββββββββββ
β SELLER SETUP CHECKLIST β
β β
β 1. β
Bank app installed β
β 2. β οΈ Battery optimization β
β β Tap to disable β
β 3. β
Notifications enabled β
β 4. βΉοΈ Keep battery above 20% β
β or stay plugged in β
β β
β [Continue to Dashboard] β
βββββββββββββββββββββββββββββββ
One-time setup. After this, the bot monitors health automatically.
The sellerβs dashboard shows real-time health:
βββββββββββββββββββββββββββββββ
β DEVICE HEALTH β
β β
β β
Bank app: Healthy β
β β
Battery: 67% (charging) β
β β
Notifications: Working β
β β
β Last trade: 3 min ago β
β Total today: 12 trades β
βββββββββββββββββββββββββββββββ
If health degrades:
βββββββββββββββββββββββββββββββ
β β οΈ DEVICE HEALTH WARNING β
β β
β Battery at 15% (not charging) β
β β
β Buyers will see warnings. β
β Plug in your phone to β
β maintain good reputation. β
β β
β [Dismiss] β
βββββββββββββββββββββββββββββββ
Proactive alerts. Sellers fix issues before buyers notice.
Different banks, different apps, different Android package names. The bot needs to know which app to check.
| Bank | Package Name | Notes |
|---|---|---|
| Caja Rural | com.rsi.nba |
Primary Phase 0 target |
| BBVA | com.bbva.bbvacontigo |
Phase 0 testing |
| Santander | es.bancosantander.apps |
Phase 1+ |
| Sabadell | es.bancsabadell.mobilebancohd |
Phase 1+ |
| ING | es.ingdirect.ing |
Phase 1+ |
Seller selects their bank during setup. The bot automatically checks the correct app.
If bank not listed: Debug mode allows sellers to capture their bankβs notification format and package name, submit it for future support.
Health checks rely on Android system APIs:
// Check if bank app is installed
fun isBankAppInstalled(packageName: String): Boolean {
return try {
packageManager.getApplicationInfo(packageName, 0)
true
} catch (e: PackageManager.NameNotFoundException) {
false
}
}
// Check if bank app is enabled
fun isBankAppEnabled(packageName: String): Boolean {
val state = packageManager.getApplicationEnabledSetting(packageName)
return state != PackageManager.COMPONENT_ENABLED_STATE_DISABLED
}
// Check battery optimization status
fun isBatteryOptimized(packageName: String): Boolean {
val powerManager = getSystemService(Context.POWER_SERVICE) as PowerManager
return !powerManager.isIgnoringBatteryOptimizations(packageName)
}
// Get battery level and charging state
fun getBatteryInfo(): Pair<Int, Boolean> {
val intent = registerReceiver(null, IntentFilter(Intent.ACTION_BATTERY_CHANGED))
val level = intent?.getIntExtra(BatteryManager.EXTRA_LEVEL, -1) ?: -1
val status = intent?.getIntExtra(BatteryManager.EXTRA_STATUS, -1) ?: -1
val charging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
status == BatteryManager.BATTERY_STATUS_FULL
return Pair(level, charging)
}
These APIs are standard Android. No root required, no special permissions (beyond what the bot needs for notification listening).
Phase 0 focuses on Android (where bank apps send actionable notifications). iOS support deferred to Phase 1+.
Why Android first:
iOS challenges:
Phase 1+ iOS strategy:
To the buyer (MarΓa):
To relays (Nostr intermediaries):
To the blockchain:
Phase 0 acceptable. Seller voluntarily discloses basic device health to facilitate trade. No identifying metadata leaks.
Can a malicious seller fake health metrics?
Yes. The sellerβs bot self-reports health. A custom bot could lie:
{
"device_health": {
"bank_app_installed": true, // LIE: actually false
"battery_level": 100, // LIE: actually 5%
"is_charging": true // LIE: actually unplugged
}
}
But it doesnβt help them:
Lying about health is self-sabotage. Honest sellers report accurate health to complete trades and earn fees.
Reputation reinforces honesty: Sellers who frequently fail to lock BCH (due to real or fake health issues) get downranked by the app. Buyers avoid them.
Scenario: Sellerβs bot is online (responds to Nostr), but health data is missing from the response.
Mitigation:
Phase 0 acceptable. Missing health is suspicious, not fatal.
Scenario: Health check passes at payment info request, but battery dies while MarΓa is opening her Bizum app.
Timeline:
15:00:00 - Health check: 30% battery, not charging
15:00:05 - MarΓa receives payment instructions
15:00:45 - MarΓa completes Bizum payment (40 seconds later)
15:00:50 - Seller's phone dies (battery drained)
15:00:51 - Notification never received
Mitigation:
Phase 1+ improvement:
Phase 0 trade-off: Accept rare edge case (battery dies mid-payment) in exchange for simpler implementation. Covenant timelock protects buyer.
Scenario: MarΓa sees βBank app disabledβ warning, clicks βContinue Anyway,β sends payment.
Outcome:
Mitigation:
Phase 0 philosophy: Informed consent. We warn, user decides.
Phase 0: Health checked once (at payment info request).
Phase 1+: Health checked continuously during payment window:
1. MarΓa requests payment info β health check #1
2. MarΓa opens Bizum app (20 seconds later) β health check #2
3. MarΓa confirms payment (40 seconds later) β health check #3
4. If any check fails β alert MarΓa before she sends fiat
Requires: WebSocket connection or frequent Nostr pings during critical window. More complex, but catches degrading health in real-time.
Phase 0: Binary health (healthy/unhealthy).
Phase 1+: Predictive alerts based on historical patterns:
Requires: Long-term health telemetry, machine learning models.
Phase 0: One seller = one device.
Phase 1+: Sellers run bots on multiple devices (phone + VPS):
{
"device_health": [
{
"device_id": "phone",
"bank_app_installed": true,
"battery_level": 25,
"is_charging": false
},
{
"device_id": "vps",
"bank_app_installed": false, // VPS doesn't have bank app
"always_online": true,
"forwards_notifications": true // Phone forwards notifications to VPS
}
]
}
Redundancy: If phone dies, VPS continues operating.
| Feature | Asgaya (Device Health) | Centralized Exchange (Coinbase, Kraken) |
|---|---|---|
| Fraud prevention | Proactive (check before payment) | Reactive (freeze account after fraud) |
| Seller screening | Automated, instant | Manual KYC (days/weeks) |
| Privacy | No KYC, health metrics stay private | Full KYC, government surveillance |
| User control | Buyer sees warnings, decides | Platform decides (account bans) |
| Seller experience | Run bot, maintain device health | Submit documents, wait for approval |
Asgayaβs approach: Trust, but verify. Sellers self-report health, buyers validate before payment. Reputation replaces KYC.
Device health turns Asgaya from reactive (wait for fraud, then dispute) to proactive (prevent fraud before it happens). Buyers pay with confidence. Sellers maintain good reputation. Fraudsters canβt hide.
When regulators ask βhow do you prevent fraud without KYC?β this is the answer: Automated device health checks, covenant timelocks, and reputation-based filtering. No centralized database. No government surveillance. Just code doing what banks canβt.
Author: Suso + Claude Sonnet 4.5
Updated: 2026-07-15
Related research: RS075 (3C Toolbox decompilation), RS072 (BizumParser notification listener)
| π Home | β The Mechanism | β Nostr Coordination | π Glossary |
Related: Nostr Coordination Overview Β· Dispute Resolution Β· Notification Bot Β· Implementation Guide