mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
57 lines
2.2 KiB
TeX
57 lines
2.2 KiB
TeX
\section{Implementation Considerations}
|
|
|
|
%%==========================================================================
|
|
|
|
\subsection{P-Chain Modifications}
|
|
|
|
Implementing the full suite of appchain economic mechanisms requires the following P-Chain
|
|
changes:
|
|
|
|
\begin{enumerate}[leftmargin=1.5em]
|
|
\item New transaction type \texttt{SetAppchainEconomicsParams} allowing appchain creators
|
|
to publish their fee sharing and LWES parameters;
|
|
\item Modified \texttt{AddAppchainValidator} transaction to include capacity commitment
|
|
$K$ and opt-in reward acceptance;
|
|
\item New epoch-based reward distribution logic collecting SSF and distributing to
|
|
Primary Network validators;
|
|
\item Elastic scaling signals as P-Chain events monitored by the LRP node sidecar.
|
|
\end{enumerate}
|
|
|
|
\subsection{Smart Contract Infrastructure}
|
|
|
|
C-Chain contracts required:
|
|
|
|
\begin{enumerate}[leftmargin=1.5em]
|
|
\item \texttt{AppchainTokenFactory}: Deploys ERC-20 appchain tokens with LWES emission schedule built in;
|
|
\item \texttt{SSFCollector}: Receives security surcharge payments from appchains;
|
|
\item \texttt{CrossAppchainMEVOracle}: Monitors Lux Teleport (LP-6332) events and runs MEV auctions;
|
|
\item \texttt{ElasticScalingCoordinator}: Issues expansion/ejection signals and manages
|
|
validator admission queues.
|
|
\end{enumerate}
|
|
|
|
\subsection{Gas and Overhead Analysis}
|
|
|
|
The additional P-Chain transactions introduced by appchain economic mechanisms add
|
|
approximately 8\% overhead to P-Chain processing. Given P-Chain's current capacity,
|
|
this is well within acceptable bounds. C-Chain contract interactions cost:
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\caption{Appchain Economics Smart Contract Gas Costs}
|
|
\label{tab:econ_gas}
|
|
\begin{tabular}{lrr}
|
|
\toprule
|
|
\textbf{Contract Function} & \textbf{Gas Used} & \textbf{Cost at 25 gwei} \\
|
|
\midrule
|
|
\texttt{deployAppchainToken} & 1,243,000 & \$0.054 (one-time) \\
|
|
\texttt{collectSSF} (per epoch) & 87,400 & \$0.004 \\
|
|
\texttt{distributeSSF} (50 validators) & 312,000 & \$0.014 \\
|
|
\texttt{runMEVAuction} & 234,100 & \$0.010 \\
|
|
\texttt{issueScalingSignal} & 52,300 & \$0.002 \\
|
|
\texttt{vestValidatorRewards} & 98,700 & \$0.004 \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{table}
|
|
|
|
%%==========================================================================
|