The dangerous Dusk address is not always an invalid one. It can be a perfectly valid address from the wrong transaction model.
Both Moonlight and Phoenix addresses are Base58, so a simple “does this look like Base58?” check tells me too little. Moonlight is one compressed BLS12-381 G2 public key. Phoenix is two compressed Jubjub points. Same alphabet on screen, different structure underneath.
That matters if I am building a DUSK deposit or withdrawal form around Moonlight. Dusk’s exchange path is explicitly Moonlight, while Phoenix needs a different custody and scanning model. If my address field only checks characters, I can accept a shielded Phoenix address into a workflow built to assign, scan, or send against public Moonlight accounts.
The failure shows up late. The user sees “address accepted.” My database stores it. Then the transaction builder or deposit pipeline is the first place that discovers the address belongs to the wrong family.
I would parse the address structurally at the boundary and assert the expected model before I save it.
On Dusk, valid address and valid destination are two different checks.
$GNO $SOXSB #dusk $DUSK @Dusk
Both Moonlight and Phoenix addresses are Base58, so a simple “does this look like Base58?” check tells me too little. Moonlight is one compressed BLS12-381 G2 public key. Phoenix is two compressed Jubjub points. Same alphabet on screen, different structure underneath.
That matters if I am building a DUSK deposit or withdrawal form around Moonlight. Dusk’s exchange path is explicitly Moonlight, while Phoenix needs a different custody and scanning model. If my address field only checks characters, I can accept a shielded Phoenix address into a workflow built to assign, scan, or send against public Moonlight accounts.
The failure shows up late. The user sees “address accepted.” My database stores it. Then the transaction builder or deposit pipeline is the first place that discovers the address belongs to the wrong family.
I would parse the address structurally at the boundary and assert the expected model before I save it.
On Dusk, valid address and valid destination are two different checks.
$GNO $SOXSB #dusk $DUSK @Dusk