Staker Security

Sam Presnal
Staker
Published in
3 min readJan 26, 2021

Security is the most important component when it comes to storing funds safely. The Staker team has gone through and implemented many of the best practices suggested for storing and accessing information securely on iOS and Android devices.

Non-custodial Wallet

The private key is generated on device and never exposed to the Staker team. Two different standards are used for wallet generation — BIP32 and BIP39. Supporting these standards mean the mnemonic phrase is compatible with other 24 word storage devices like Trezor and Ledger.

The mnemonic phrase is stored to secure device storage using the native device secure storage implementation (Keychain for iOS & KeyStore for Android). Additionally, the phrase is AES encrypted before storage. The mnemonic phrase is only loaded into memory from secure storage when needed to sign transactions.

Backup to cloud is currently disabled.

Smart Wallet

Smart wallet is the term commonly used for a contract deployed on the Ethereum blockchain that acts as a wallet for the user — interacting with other contracts on behalf of the user.

Smart wallets extend the capability of what’s possible for users allowing for transaction batching (issuing multiple commands in one call), paying for transactions with ETH or ERC20s, and transaction relay service. These things will improve the quality of life greatly for app users.

Staker utilizes Gnosis Safe v1.1.1, which has security audits that can be found here and is currently the most used version. Gnosis Safe currently stores approximately $8.3b for users including ETH and ERC20s. Each user of Staker will have a Safe owned by the wallet generated on the device.

Smart Wallet Ownership Transfer

Example of smart wallet ownership transfer to new user wallet

Gnosis Safe provides the capability to transfer the ownership of the Safe. The ability to transfer smart wallet ownership allows users to:

  1. Transfer ownership to a hardware wallet
  2. Change ownership of stakes without emergency end staking
  3. Gift a staked smart wallet

Although the ability to transfer ownership is not yet supported by the Staker app, the Gnosis Safe has the functionality available and can be utilized in the future.

Sending Transactions

Transactions are constructed locally on device and must be signed by the smart wallet owner. Staker cannot create or sign transactions on behalf of users.

Once a transaction has been constructed and signed, it is forwarded along to the Staker backend service and later forwarded to the Rockside relay service. These transactions cannot be tampered with since they must be signed by the smart wallet owner.

What if Staker goes down?

Part of the reason we chose Gnosis for our smart wallet is because users can still access their funds if something were to happen to Staker. Gnosis hosts their own site, with custom built apps that integrate with the Safe — 1inch, Balancer, etc..

In the future we’d like to have a custom app added to their site that supports interacting with the HEX contract. However, without that in place today users can still execute transactions against the HEX smart contract through their site (similar to using Etherscan).

The process would look like the following — load seed words onto a compatible wallet like Ledger, connect Ledger to the Gnosis site, import Safe, and create the needed transaction.

Planning for the Future

Losing the mnemonic seed phrase is an unfortunate occurrence that does happen. Gnosis allows for extensions using modules. One module that we foresee supporting in the future is social recovery or a guardian allowing dedicated recovery options.

One of these options available already today allows users to select three addresses and if all three agree, the owner of the Safe can be transferred to a new address.

--

--