StarkEx v2.0
MichaelRiabzev-StarkWare
released this
26 Oct 11:22
·
15 commits
to master
since this release
StarkEx v2.0 is the first major update to StarkEx. Below are the main added features, both functional and non-functional.
Please note that the contract functions are not backward compatible and every interaction needs to be updated with the new version ABI.
Functional Features
Conditional Transfer
- Off-chain transfers conditioned on a predefined on-chain event- Allows arbitrary on-chain logic to be defined as the condition, thus allowing complicated interactions between L2 and L1.
- Specifically, this primitive is used to facilitate Fast Withdrawals.
Deposit
- L1 users can deposit to any L2 user.- In v1.0 users could only deposit to their own account.
Withdrawal
- Users can withdraw to any recipient Ethereum address.- In v1.0 users could withdraw their funds from the contract only to the Ethereum address registered with that vault’s owner stark key.
Register
- Multiple StarkEx keys - Users can register many StarkEx keys to one Ethereum address.
- In v1.0 the contract allowed only 1:1 mapping between Ethereum addresses and StarkEx keys.
- Simplified Registration - Registration can be done by any sender.
- In v1.0 the registered Ethereum address had to be the sender.
- There is no need to own Ether in order to register.
- Enhanced signature security - Added a prefix to the
userAdmin
signature.- This protects the
userAdmin
signer from an unexpected interpretation of their signature. - The
userAdmin
signature now has the following structure:
bytes32 signedData = keccak256(abi.encodePacked("UserRegistration:", ethKey, starkKey))
.
- This protects the
- Multiple StarkEx keys - Users can register many StarkEx keys to one Ethereum address.
- ERC721 support - StarkEx now supports trading ERC721 tokens.
- Off-chain minting support - The StarkEx v2.0 contract supports off-chain minting of tokens of compatible ERC20MINTABLE / ERC721MINTABLE types.
Non-Functional Features
- Cairo - StarkEx v2.0 is fully implemented on top of Cairo - our Turing-complete framework for STARKs.
- Optimised statement design, supporting more efficient transaction packing in batches - enabling more transactions in each batch.