Trustless Custodians: A Decentralized Approach to Cryptocurrency Custodianship

A Decentralized Approach to Cryptocurrency Custodianship

Custodians play a crucial role in the shielding mechanism that turns cryptocurrencies - like BTC, ETH and USDT - into privacy coins [Incognito, 2019a].

Existing custodian solutions like Bitgo and Coinbase Custody are centralized and expensive. Trusted third parties are security holes [Szabo, 2001]. In addition, the very nature of centralized custody necessitates the sharing of a user’s private information to third parties.

Incognito takes a decentralized approach to custodianship; there are multiple custodians instead of one centralized authority like Bitgo or Coinbase Custody. Anyone can become a custodian by simply supplying a bond.

We implemented a smart contract on Ethereum that controls bonds and runs exactly as programmed. Not only is the Bond smart contract trustless, it also provides real-time processing, as opposed to the multi-day manual process adopted by centralized custodian companies.

We initially implemented a fixed custodian fee structure for simplicity’s sake. This could be further improved by implementing a market-driven custodian fee structure where users are able to set their own fees and custodians are able to compete for user deposits.

INCOGNITO BITGO
Privacy
Trustless
Insured by collateral
Processing time Instant Days
Fees Low High

Table 1. A comparison between Incognito and centralized custodians like Bitgo and Coinbase Custody.

The Bond Smart Contract

The Bond smart contract glues together Incognito, custodians, and other cryptonetworks like Bitcoin and Binance Chain. There will be multiple implementations of the Bond smart contract on different cryptonetworks, including Incognito itself, using their respective cryptoassets as collateral.

The first implementation is programmed as an Ethereum smart contract [Wood, 2014]. We chose Ethereum because its smart contract platform is battle-tested and it has many liquid cryptoassets that are suitable collateral types.


Figure 1. The Bond smart contract is programmed to glue together custodians, Incognito, and other cryptonetworks like Bitcoin and Binance Chain.

The Bond smart contract is programmed to:

  • Escrow collateral, in ETH and liquid ERC20 tokens, bonded by custodians
  • Set the maximum total amount of user deposits that a custodian can accept based on the Collateral-to-Deposit ratio
  • Verify deposit proofs on other cryptonetworks and submit valid proofs to Incognito for minting privacy coins
  • Verify burn proofs of privacy coins on Incognito and instruct custodians to release public coins
  • Verify custodians’ release proofs on other cryptonetworks and free up their collateral; custodians can withdraw their collateral tokens or take new user deposits
  • Liquidate collateral when custodians misbehave or collateral amount drops below deposit amount

Over-Collateralized Bonds

Custodians must first bond some collateral into the Bond smart contract. Bonded collateral tokens are required as a recourse when custodians misbehave. The Bond smart contract only accepts ETH and liquid ERC20 tokens as collateral.

Because cryptocurrency prices are volatile, bond values are also volatile. It is necessary to ask custodians to overbond so that the total amount of user deposits to a single custodian does not exceed the total value of the collateral bonded by that custodian.

We introduce a parameter α, initially set as 150%. α is the Collateral-to-Deposit ratio, which makes sure that user deposits never exceed the amount of total custodian collateral even if there is a significant drop in collateral value.

For example, as a custodian, Alice needs to bond at least $1,500 worth of ETH and ERC20 tokens in the Bond smart contract if she wants to take $1,000 worth of BTC user deposits.

Auto-Liquidation

Over-collateralization ensures that custodians do not misbehave.

During the unshielding process, if Alice doesn’t send the public coins back to Bob in full, Alice’s bonded collateral will be used to repay Bob. In this case, the public coins that Bob receives – Alice’s collateral to be precise – may be different from Bob’s original public coin, but their total value is the same or greater than the value of Bob’s original deposit.

Auto-liquidation also kicks in if the value of bonded collateral drops significantly. Custodians must add more collateral to avoid auto-liquidation. We introduce a parameter 𝛽, initially set as 110%. If α is the upper bound, 𝛽 is the lower bound or the liquidation threshold. 𝛽 is designed to make sure that total custodian collateral amounts do not drop below total user deposits.

A future improvement could be automatically liquidating collateral on a decentralized exchange like Kyber [Luu and Yaron, 2017], Uniswap [Adam, 2018], or Incognito pDEX [Incognito, 2019b].

Incentives

First, custodians earn shielding fees and unshielding fees. The initial fee structure is simple – a fixed shielding fee of 0.01% and an unshielding fee of 0.01%.

Later, as part of a market-driven pricing structure, users could set their own fees and custodians could choose to process the transactions with the highest fees first. A more complex fee structure would take into account shielding, unshielding, and custodial times.

Second, custodians also earn PRV, the native coin of Incognito, through shield mining. In traditional cryptonetworks, mining rewards come solely from block mining, where miners earn rewards for producing new blocks. In Incognito, there is shield mining in addition to block mining, where custodians also mine PRV for shielding public coins. The more a custodian shields, the bigger the PRV rewards the custodian earns. The Incognito DAO funds shield mining rewards.

The shield mining reward ri for a custodian ci at block height k, is computed as follows, where Rk is the total shield mining reward for that block, n is the number of custodians, and bi is the bonded collateral value from custodian ci .

CodeCogsEqn%20(1)

Conclusion

We have proposed a decentralized approach to custodianship. While this mechanism is designed for Incognito specifically, we hope that the community will find this design helpful and expand upon it to build more fully-decentralized systems of custodians.

Related Topics

References

[Adam, 2018] Adam, H. (2018). Uniswap whitepaper. URL https://hackmd.io/C-DvwDSfSxuh-Gd4WKE_ig.

[Incognito, 2019a] Incognito, T. (2019a). Shielding cryptocurrencies: turning cryptocurrencies into privacy coins. URL Shielding Cryptocurrencies: Turning Any Cryptocurrency Into a Privacy Coin.

[Incognito, 2019b] Incognito, T. (2019b). pDEX: The first privacy-protecting decentralized exchange. Technical report, pDEX: The first privacy-protecting decentralized exchange.

[Luu and Yaron, 2017] Luu, L. and Yaron, V. (2017). Kyber network: A trustless decentralized exchange and payment service. URL https://home.kyber.network/assets/KyberNetworkWhitepaper.pdf.

[Szabo, 2005] Szabo, N. (2005). Trusted third parties are security holes. White Paper. URL: https://nakamotoinstitute.org/trusted-third-parties/

[Wood, 2014] Wood, G. (2014). Ethereum: A secure decentralised generalised transaction ledger. URL https://ethereum.github.io/yellowpaper/paper.pdf.

1 Like

I’ll be publishing a video about this soon, focusing on the technical details of the mechanism. Let me know if there’s any specific issues/questions you’d like me to cover :pray:

1 Like

thanks in advance @Grant. The video should be covering Portal’s mechanism and it’ll be better if we can include shielding & unshielding processes from this post (Shielding Cryptocurrencies: Turning Any Cryptocurrency Into a Privacy Coin) along with trustless custodians approach so that readers can have better understanding about the context.

1 Like

@duc:wave: I want to become custodians!

1 Like

appreciated @zes333. Custodian plays a crucial role in Incognito generally and Portal specifically so will need someone like you to make it operational. (MrRobot is one of my favorite shows btw :call_me_hand:)

1 Like