verify_loan_eligibility that takes Alice’s confidential balance (protected with a shared secret between Alice and the MXE), the minimum balance requirement (protected only for the MXE), and a Shared type parameter representing the loan officer who will receive the result.
The function checks if Alice meets the minimum balance requirement for loan eligibility without revealing her actual balance to anyone. The boolean result is then re-encoded specifically for the loan officer using their public key. This way, Alice’s financial confidentiality is preserved: the loan officer only learns whether she’s eligible, not her actual balance, and Arx nodes never see plaintext, only secret shares.
What’s next?
Protecting Inputs
Learn how to protect data before sending to the MXE.
Invoke from Solana
Call confidential instructions from your Solana program.