Skip to content
Crypto.world

The Ledger

SIG’s Midnight Vault Demo Uses MPC to Sign Ethereum Withdrawals

SIG Network’s ERC-20 vault walkthrough describes how a Midnight contract queues a withdrawal and how an MPC service signs the corresponding Ethereum transfer. The example’s completion flow uses an attested outcome to decide whether the user’s shielded claim stays burned or is re-minted.

SIG’s Midnight Vault Demo Uses MPC to Sign Ethereum Withdrawals

“The withdraw round trip moves ERC20 tokens out of the vault's own EVM account to any destination the caller names, against shielded vault tokens the caller surrenders on Midnight.”

SIG Network’s withdrawal documentation authors

SIG Network’s experimental ERC-20 vault pairs shielded vault tokens on Midnight with ERC-20 assets held in an Ethereum account. Its published withdrawal walkthrough describes how the account’s multiparty-computation (MPC) signing service participates in a transfer—and how the contract handles an outcome reported as unsuccessful.

The vault burns a claim and queues a transfer

To begin a withdrawal, a caller surrenders a shielded vault coin matching the requested amount. The Midnight circuit checks that the coin represents the relevant ERC-20 vault token, burns it, and queues a withdrawal request. The ERC-20 itself remains in the vault’s EVM account until the Ethereum transfer is submitted and executed.

The circuit records the request with a placeholder nonce. When the queue is flushed, it assigns a nonce from the vault account and advances that account’s nonce for the next request. The walkthrough says each flushed vault-signed request receives a nonce not assigned to another such request.

The dApp then records the request and notifies the MPC service. The request specifies a transfer to the destination chosen by the caller; the MPC signs with the vault’s account, not the caller’s. Once the signature is returned and verified, the dApp assembles and broadcasts the transaction to the EVM chain. The signing response is therefore one part of the flow: the dApp handles transaction submission, and the request remains open until it is completed on Midnight.

Settlement depends on an attested result

After the transaction is broadcast, the MPC service posts an attestation describing its outcome. The documented flow checks the attestation, queues it on Midnight and flushes it before the caller can complete the withdrawal. The completion circuit verifies the attestation and requires the caller’s ownership commitment before closing the request.

If the attested result says the transfer executed successfully, the contract closes the request and the burned claim stays burned. If the ERC-20 transfer returned false, the transaction failed, or it became unviable because another transaction used its nonce, the circuit re-mints the surrendered amount of the vault token to the caller. The guide specifies that failed and unviable outcomes moved no tokens.

This distinction matters to the example’s design: an MPC signature alone is not the same as the completed withdrawal. The documented recovery described by SIG applies to outcomes the service attests and the contract verifies; the walkthrough requires a flushed attestation for completion.

The public demo uses testnets

SIG’s full-stack demo repository describes a web application for depositing, withdrawing and swapping ERC-20 tokens through a Midnight contract, with EVM transactions executed on Ethereum Sepolia and signed by an MPC responder. The repository identifies that responder as a “fakenet” service, says it signs Sepolia transactions and posts attestations, and lists Midnight stagenet and Ethereum Sepolia as the demo’s public testnet networks.

SIG’s examples repository describes its contracts as experimental and for educational purposes. Its protocol overview says the contracts record signature requests for the MPC, dApps relay signed transactions to foreign chains, and the MPC attests execution outcomes back to Midnight for contract validation. The withdrawal walkthrough provides the detailed example: a user’s claim is burned at the start, the vault’s account signs and sends the Ethereum transfer, and an attested result determines whether the claim remains burned or is re-minted.

Sources

  1. Original source SIG Network on GitHub · page 1 github.com

Other pages read

  1. SIG Network on GitHub · Full stack demo github.com
  2. SIG Network on GitHub · Midnight examples github.com

Related stories

Explore

More articles