Blog

encumber hero image

Encumber: Enabling Non-custodial DeFi

Coburn Berry, Staff Engineer & Mykel Pereira, VP of Product • June 2023

Introduction

DeFi eliminates the need for intermediaries, allowing anyone with an internet connection to access financial services in a permissionless and non-custodial manner. Despite being non-custodial, most DeFi applications require assets to be transferred into a protocol while attributing those assets to users through internal accounting. However, there are use cases that wouldn’t need to take ownership so long as the protocol had a guarantee on some future right to transfer assets. Today, we are thrilled to introduce Encumber - a concept that takes non-custodial DeFi even further.

What is Encumber?

Encumber is a mechanism to let users separate their ownership of tokens from the right to transfer them. When a token owner encumbers their tokens to another account, they give it the exclusive right to transfer the tokens while maintaining ownership. This enables token holders to commit to terms within a smart contract without transferring ownership of their tokens to an external address.

By using Encumber, token holders can retain ancillary ownership benefits such as airdrops, governance rights, or access to content and events while still participating in DeFi. Encumber advances the non-custodial ethos of DeFi while streamlining some of the most successful DeFi use cases, such as collateral for lending markets, options contracts, and swaps.

How does it work?

The Encumber functionality works by adding two main actions, encumber and release, to existing token standards. These actions are facilitated through the following functions:

  1. encumber(taker, amount) - Token owners can lock a specified amount of their tokens to a particular taker. This allows the taker to move tokens when necessary (e.g. by calling transferFrom) and also prevents any other action from reducing the available balance below amount.

  2. encumberFrom(owner, taker, amount) - Approved addresses can encumber on behalf of a token owner.

  3. release(owner, amount) - An address that has received an encumbrance can relinquish it and return to the owner the ability to move their tokens.

Encumber is a stronger version of ERC-20 allowances. While ERC-20 approve grants another account the permission to transfer a specified token amount, encumber grants the same permission while ensuring that the tokens will be available when needed.

supply legacy image supply future image

With encumber, collateral only leaves your wallet if your position is liquidated.

The typical flow of interacting with DeFi protocols is for users to approve a protocol contract, and then subsequently having the protocol invoke transferFrom in order to move assets from the user to the protocol. With encumbrances the flow is nearly identical, but with the simple modification of protocols invoking encumberFrom instead of transferFrom. When the protocol would ordinarily transfer tokens back to the user, it would instead call release. If the protocol needs to ultimately transfer tokens away from the user, it can then do so with transferFrom. Since there is a mapping of encumbrances from token owners to an address, users could call the encumber function directly if a protocol does not need to take action in response to receiving an encumbrance.

Potential use cases

For protocols that don't require pooling assets, encumber can be used in place of transfer seamlessly while unlocking new possibilities. Here are just a few:

  • Collateral For Lending Markets: Borrowers can encumber tokens as collateral to lending markets, guaranteeing access for potential liquidations while keeping tokens (and their benefits) in the user’s wallet.

  • Aligning incentives in protocol governance: Token holders could be required to encumber their tokens to a governance contract to ensure they have a “skin in the game”. Tokens can be released once a condition has been met, e.g. a proposal has been executed.

  • Short-term financing / temporary ownership schemes: Token holders can transfer a token to another account and atomically retain an encumbrance back to a smart contract. This contract could contain tracking of ongoing payments to maintain the rental of a token or a time period to allow the token to revert back to the original owner.

  • Options: Token owners can encumber their assets to a logic contract which sells the right to purchase the tokens at a future timestamp at a given price. If the timestamp passes, the contract should contain a function to release the encumbrance. If the contract is not bought or expires, the tokens never leave the seller’s account.

Explore more

For more details and inspiration about implementing the encumber interface, we have created an example repo with ERC-20 and ERC-721 implementations. For a more full fledged integration, see this work in progress Encumber Factory to wrap the ERC-20 tokens we know and love with the encumber interface. Finally, let us know what you think by contributing to the Encumber ERC specification or its conversation page!