Non-Custodial Account
Last updated
Last updated
We mentioned how the assets of an exchange are held within a smart contract and can only be retrieved by the asset's owner. We aspire for users' assets to be self-custodial, with the exchange merely providing trading services. Any operations involving user assets must be authorized by the user before they can be executed, unlike traditional centralized exchanges where the assets are protected and managed by the exchange. This centralized approach has led to instances where exchanges may misuse user funds; and in the event of an exchange's losses, the users' assets also suffer. Therefore, we require a special type of non-custodial account that not only safeguards assets, but also provides protection against account loss.
We will integrate OpenID and MPC to manage user assets and logins. For the administration of cryptographic assets, the initial step involves creating an account, typically derived from a private key. Hence, reliable and recoverable private key management becomes an indispensable factor for the generation of user accounts and the recovery of lost accounts. Additionally, given the characteristics of exchanges trading various tokens, the account itself must be adaptable to different blockchains, enabling asset storage for various tokens.
In this context, we employ the Threshold Signature Scheme (TSS) for key and asset management. TSS is a highly favored asset custody solution within the realm of MPC. In blockchain, a valid transaction or authorization often relies on a user's signature message. If a single private key is safeguarded by either the user or the exchange, it introduces a single point of failure (SPoF). TSS excels in generating signatures through the collaborative efforts of different parties. Importantly, each party responsible for signature generation only possesses a share, without any materials related to the private key. Even if an attacker gains access to a share, they cannot reconstruct the private key.
TSS can support commonly used signature algorithms in blockchain (e.g., ECDSA, EdDSA, BLS, Schnorr). Whether it's Bitcoin, Ethereum, Filecoin, Cosmos, or other tokens, TSS enables asset storage and transaction signing. Because TSS does not reconstruct the private key during the process, it ensures no one can sign the transaction directly. Instead, at least shares are required to execute the action. For simplicity, in a 2-out-of-2 example, one is the user and the other is the exchange. The user can request to send the transaction, but without the share owned by the exchange, he can do nothing. In contrast, the exchange can not move the fund without the initiating request from the user. The responsibility of the exchange is to secure the share and work together with the user to generate the signature. Accordingly, we can separate control and responsibility among the participants.
While TSS provides users with the benefits of separation of duties and security, users still need to securely manage their shares. If a share is lost, the assets are also lost. For the secure storage of shares, we employ the PAKE (Password Authenticated Key Exchange) method. A user's share is generated jointly by the user's password and the server's secret. The advantage here is that users only need to safeguard their passwords, while the exchange needs to secure the secret value of that account. Even if the exchange is compromised, attackers cannot calculate the share because they don't know the user's password.
We advocate adopting a 2-of-3 TSS as the figure below, which provides users with an additional disaster recovery share to ensure ultimate reliability and security. Another notable benefit is that the Secure Remote Password (SRP) protocol is a PAKE (Password Authenticated Key Exchange) protocol that can be seamlessly integrated with OpenID, allowing users to control their assets simply by managing their passwords effectively.
In summary, by combining Open ID with MPC, we can create exchange accounts for JayX users for depositing and withdrawing funds, with the following significant advantages:
Accounts are no longer created by JayX, thereby preventing JayX from arbitrarily using user funds.
Users have ownership of their accounts, providing a user experience comparable to Web2, complete with account recovery functions.
Users can still manage their assets even if JayX stops providing services.
JayX does not need to provide proof of solvency.