Files
zeekay abf99d05fc papers: reorganize into per-paper dirs, add Antje Worring as co-author
Restructured from flat .tex/.pdf files into per-paper subdirectories.
Added Antje Worring as co-author on all papers.
Synced PDFs to pdfs/ for download site.
2026-04-18 21:50:07 -07:00

67 lines
2.7 KiB
TeX

\section{Transfer Patterns}
\label{sec:patterns}
\subsection{Lock-and-Mint}
The most common pattern for bridging native tokens from a source chain to a destination chain:
\begin{definition}[Lock-and-Mint Transfer]
\begin{enumerate}
\item User locks $n$ tokens in a bridge contract on the source chain.
\item A proof of the lock event is relayed to the destination chain.
\item The destination bridge contract verifies the proof and mints $n$ wrapped tokens.
\item To return tokens: burn wrapped tokens on destination, relay proof, unlock on source.
\end{enumerate}
\end{definition}
\begin{algorithm}[H]
\caption{Lock-and-Mint Transfer Protocol}
\label{alg:lock_mint}
\begin{algorithmic}[1]
\Procedure{Lock}{user, token, amount, dstChain}
\State Transfer $\mathsf{amount}$ of $\mathsf{token}$ from user to BridgeVault
\State $\mathsf{nonce} \gets \mathsf{nonces}[\mathsf{dstChain}]$++
\State Emit $\mathsf{LockEvent}(\mathsf{user}, \mathsf{token}, \mathsf{amount}, \mathsf{dstChain}, \mathsf{nonce})$
\EndProcedure
\Procedure{Mint}{proof, lockEvent}
\State Verify $\mathsf{proof}$ against source chain state root
\State Verify $\mathsf{lockEvent}$ matches proof data
\State Verify nonce has not been processed
\State Mint wrapped tokens to $\mathsf{lockEvent.user}$ on destination
\State Record nonce as processed
\EndProcedure
\end{algorithmic}
\end{algorithm}
\subsection{Burn-and-Release}
The reverse of lock-and-mint, used when returning wrapped tokens to their native chain:
\begin{algorithm}[H]
\caption{Burn-and-Release Transfer Protocol}
\label{alg:burn_release}
\begin{algorithmic}[1]
\Procedure{Burn}{user, wrappedToken, amount, srcChain}
\State Burn $\mathsf{amount}$ of $\mathsf{wrappedToken}$ from user
\State $\mathsf{nonce} \gets \mathsf{nonces}[\mathsf{srcChain}]$++
\State Emit $\mathsf{BurnEvent}(\mathsf{user}, \mathsf{wrappedToken}, \mathsf{amount}, \mathsf{srcChain}, \mathsf{nonce})$
\EndProcedure
\Procedure{Release}{proof, burnEvent}
\State Verify $\mathsf{proof}$ against destination chain state root
\State Verify $\mathsf{burnEvent}$ matches proof data
\State Verify nonce has not been processed
\State Transfer native tokens from BridgeVault to $\mathsf{burnEvent.user}$
\State Record nonce as processed
\EndProcedure
\end{algorithmic}
\end{algorithm}
\subsection{Native Transfer (Intra-Lux)}
Between Lux appchains sharing the same native token (LUX), transfers use a burn-on-source, mint-on-destination pattern without wrapped tokens:
\begin{definition}[Native Interchain Transfer]
LUX burned on appchain $A$ is minted on appchain $B$ via Warp proof. The total LUX supply is conserved: $\sum_k \text{Supply}_k = \text{const}$.
\end{definition}