Files
papers/lux-security-token-standard/sections/02-token-interface.tex
zeekay 4a753bb639 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

99 lines
3.7 KiB
TeX

\section{Token Interface}
\label{sec:interface}
\subsection{Core ERC-1400 Interface}
The Lux Security Token Standard implements the full ERC-1400 interface:
\begin{lstlisting}[language=Solidity,caption={Core security token interface.}]
interface ISecurityToken is IERC20 {
// Document management
function getDocument(bytes32 name)
external view returns (string memory uri, bytes32 hash, uint256 timestamp);
function setDocument(bytes32 name, string calldata uri, bytes32 hash) external;
function getAllDocuments() external view returns (bytes32[] memory);
// Controller operations (MPC threshold required)
function isControllable() external view returns (bool);
function controllerTransfer(
address from, address to, uint256 value,
bytes calldata data, bytes calldata operatorData
) external;
function controllerRedeem(
address holder, uint256 value,
bytes calldata data, bytes calldata operatorData
) external;
// Partition management
function balanceOfByPartition(bytes32 partition, address holder)
external view returns (uint256);
function partitionsOf(address holder)
external view returns (bytes32[] memory);
function transferByPartition(
bytes32 partition, address from, address to,
uint256 value, bytes calldata data
) external returns (bytes32);
// Transfer restriction
function canTransfer(address to, uint256 value, bytes calldata data)
external view returns (bytes1 statusCode, bytes32 appCode);
function canTransferByPartition(
bytes32 partition, address to, uint256 value, bytes calldata data
) external view returns (bytes1 statusCode, bytes32 appCode, bytes32 partition);
// Issuance
function isIssuable() external view returns (bool);
function issue(address holder, uint256 value, bytes calldata data) external;
function issueByPartition(
bytes32 partition, address holder, uint256 value, bytes calldata data
) external;
// Redemption
function redeem(uint256 value, bytes calldata data) external;
function redeemByPartition(
bytes32 partition, uint256 value, bytes calldata data
) external;
}
\end{lstlisting}
\subsection{ERC-1404 Transfer Restrictions}
Transfer restriction checking extends ERC-1404 with a richer status code system:
\begin{lstlisting}[language=Solidity,caption={Transfer restriction interface.}]
interface ITransferRestriction {
function detectTransferRestriction(
address from, address to, uint256 value
) external view returns (uint8 restrictionCode);
function messageForTransferRestriction(uint8 restrictionCode)
external pure returns (string memory message);
}
\end{lstlisting}
\begin{table}[H]
\centering
\caption{Transfer restriction codes.}
\label{tab:restriction-codes}
\begin{tabular}{clp{6cm}}
\toprule
\textbf{Code} & \textbf{Name} & \textbf{Description} \\
\midrule
0x00 & SUCCESS & Transfer permitted \\
0x01 & SENDER\_NOT\_ELIGIBLE & Sender fails compliance check \\
0x02 & RECEIVER\_NOT\_ELIGIBLE & Receiver fails compliance check \\
0x03 & SENDER\_LOCKUP & Sender's tokens are in lockup period \\
0x04 & RECEIVER\_LIMIT & Receiver would exceed maximum holding \\
0x05 & JURISDICTION\_BLOCKED & Transfer blocked by jurisdictional rule \\
0x06 & ACCREDITATION\_EXPIRED & Receiver's accreditation has expired \\
0x07 & REGULATORY\_HOLD & Tokens subject to regulatory hold/freeze \\
0x08 & MAX\_HOLDERS & Transfer would exceed maximum holder count \\
0x09 & PARTITION\_RESTRICTED & Partition-specific restriction applies \\
0x0A & KYC\_INCOMPLETE & Receiver has not completed KYC \\
0x0B & AML\_FLAG & AML screening flag on sender or receiver \\
0xFF & UNKNOWN & Unspecified restriction \\
\bottomrule
\end{tabular}
\end{table}