Skip to content
QORECHAIN
Register

Cross-VM

Haven Ledger

Paid only when the Native receipt names that payout.

Share on X

About

A payer puts fUSD in a contract with one payee. The money leaves only for that payee, or comes back only to the payer. It leaves only with the payer's fresh ML-DSA-87 signature. In the same transaction the contract writes a receipt into qday-receipts, a Native contract governance has already approved. The receipt carries a commitment to that exact payout, and the payout stores the receipt id. The contract accepts the Native reply only when the sender is the ledger's own qor1 name and the note is the note it just sent. If the Native contract refuses, or the token transfer fails, neither lane changes. A classical key can send the transaction and still cannot pay, refund, or name a third address.

How it's made

Haven Ledger is one Solidity contract. The payer, the payee, the fUSD token, and the Native receipt book are fixed in the constructor. There is no owner and no upgrade. pay sends fUSD to the payee. refund sends it back to the payer. Both need the payer's fresh ML-DSA-87 signature, checked in the contract with pqcVerify against the key read from pqcKeyStatus. The signed message binds the chain, the ledger, the payer, the action, the nonce, the deadline, the recipient, the token, the amount, and the memo. A classical signature, a replay, and a signature for the other action are refused before the bridge is called. In that same transaction the contract calls executeCrossVMCall on the bridge precompile 0x…0901, with target VM Native and target qday-receipts. The note carries the payout commitment. The contract then transfers the fUSD. A Native refusal or a failed transfer reverts the whole transaction, so a receipt never exists without the payment, and a payment never exists without the receipt. The payer's ML-DSA-87 key must already be registered with proof of possession. Deploy and the calls run inside an EVM window that lists the bridge and the ledger. Foundry tests cover a payout, a refund, a Native refusal, a transfer that fails after the Native write, a junk signature, a replay, an unlisted target, and a bridge reply that lies about the sender or the note. Authorisation comes from haven-pq-kit. Its PqAuth interface follows Adityaakr's public qore-pq-kit (Apache-2.0). Deployment and the payer's signature use the QoreChain SDK, @qorechain/evm, and qorechain-pqc. Still to come, and this text will be updated when they land: the testnet scenes, the contract address, and a page that reads the EVM payout and the Native receipt and checks that they name each other.

Timeline

Haven LedgerCross-VM

Pushed 1 commit to main

  • ee49424 Match each refusal to its recorded reason. · datharnu
Haven LedgerCross-VM

Pushed 1 commit to main

  • 62e1293 Add the Apache-2.0 license. · datharnu
Haven LedgerCross-VM

Newly verified on chain: AMM pools, EVM window (incl. scoped), QoreSeal and the encryption key registry, Smart accounts and spending rules

Haven LedgerCross-VM

Newly verified on chain: Hybrid ML-DSA-87 transactions, PQC key registration with proof of possession, Test tokens fUSD, fETH, fBTC

Haven LedgerCross-VM

Pushed 1 commit to main

  • 7bbdfb8 Name the hosted page that checks both lanes. · datharnu
Haven LedgerCross-VM

Pushed 1 commit to main

  • 1ed4701 Check both lanes of every payout in the browser. · datharnu
Haven LedgerCross-VM

Pushed 1 commit to main

  • 331f8af Add the README, the kits map and the AI usage note. · datharnu
Haven LedgerCross-VM

Pushed 1 commit to main

  • 1773ea3 Add the evidence check and the test workflow. · datharnu
Haven LedgerCross-VM

Pushed 1 commit to main

  • 06f032b Record the testnet scenes for both lanes. · datharnu
Haven LedgerCross-VM

Pushed 1 commit to main

  • c235e16 Add the TypeScript client and the shared vectors. · datharnu
Haven LedgerCross-VM

Pushed 1 commit to main

  • 4136809 Add the ledger contract and its Foundry tests. · datharnu

Comments and questions

  • No comments yet.