Introducing TrueUSD AutoSweep — An Easy Wallet Management Feature for Exchanges and OTC Desks

TrueFi
5 min readJan 14, 2019

TrueUSD AutoSweep

Today, we’re proud to announce a new feature for TrueUSD users: AutoSweep. AutoSweep is a registry for client deposit addresses that makes it easy to accept and manage TrueUSD deposits.

With AutoSweep, exchanges can give each client a unique TUSD deposit address that automatically settles into the exchange’s primary wallet, with zero gas fees. AutoSweep can save exchanges from the gas fees and accounting overhead that are currently needed to receive TUSD deposits from large numbers of clients.

Creating a TrueUSD AutoSweep address is similar to creating an email alias on a company email account. With email aliases, users can set up multiple outward-facing addresses (e.g. Jeff@amazon.com; Jeff.Bezos@amazon.com; ceo@amazon.com) that receive emails into a single inbox.

Likewise, AutoSweep allows anyone to create multiple outward-facing deposit Ethereum addresses that automatically settle into a single Ethereum wallet.

As far as we know, TrueUSD AutoSweep is the first implementation of this “alias” feature in an Ethereum-based token.

Who is AutoSweep for?

Anyone can use TUSD AutoSweep. It is designed for the needs of:

  • OTC Desks
  • Exchanges
  • Merchants who accept payments in TUSD
  • Crypto custodians who have centralized cold storage wallets

What problem does AutoSweep solve?

Today, exchanges and OTC desks face a tradeoff between clean accounting and efficient token management.

When an OTC desk receives a payment from a client, the OTC desk generally must choose between two inefficient solutions:

  1. Generate a unique deposit address for that client. After the payments arrive, the funds in these deposit addresses need to be manually swept into the OTC’s central wallet, costing time and gas fees.
  2. Ask all clients send deposits directly to the OTC’s central wallet. This jumbles the OTC’s accounting records, since they need to manually verify the sending address for each transaction from each client.

Likewise, exchanges, merchants, and crypto custodians often need to generate a unique deposit address for each user. Deposits in these addresses are then swept to a central hot wallet. Each sweep typically incurs a gas cost.

With AutoSweep, exchanges can have both clean accounting and efficient token management when receiving TUSD.

The solution

TrueUSD AutoSweep lets you give each client a unique address that automatically forwards TUSD transactions to your central wallet, without incurring a gas cost. AutoSweep only works with TUSD, although we may enable it for other tokens that we launch in the future.

This gives you the best of both worlds:

  1. You can maintain clean accounting, since each client deposit address represents an organized transaction history from that client. In the event that you are audited, you can prove the origin of each client’s TUSD payments to you.
  2. You save the time and gas costs to sweep depository accounts, since all client transactions are automatically forwarded to your central wallet.

How to set up AutoSweep

To set up TUSD AutoSweep for your address:

  1. Determine the wallet address that you want TrueUSD deposits to be forwarded to. This is called your TUSD central wallet.
  2. Send a minimal amount of ETH (e.g. 0.00001 ETH) from your central wallet to 0x00000000000Da14C27C155Bb7C1Ac9Bd7519eB3b. This is a smart contract that will enable AutoSweep for your address.
  3. Sending ETH will trigger the smart contract to register your central wallet in the registry.

Congratulations: you can now send each of your clients a unique deposit address that will automatically forward to your central wallet.

Your Client Addresses

The AutoSweep saves the first 35 characters of your central wallet address as the “base” address, and uses the remaining 5 digits as unique client IDs.

For example, say that your central wallet’s address is 0x1234567890123456789012345678901234567890.

When you send a transaction to the AutoSweep Deposit Registry Address (above), you register the “base” address of 0x12345678901234567890123456789012345xxxxx.

Now, you can assign each of your clients any of the available addresses based on the first 35 characters:

  • Base address |Client ID
  • 0x12345678901234567890123456789012345xxxxx
  • 0x1234567890123456789012345678901234500000 Client 0
  • 0x1234567890123456789012345678901234500001 Client 1
  • 0x1234567890123456789012345678901234500002 Client 2
  • … …
  • 0x12345678901234567890123456789012345FFFFF Client 1,048,575

Since there are 5 characters and 16 symbols (0–9; a-f) available, you can generate 16⁵ = 1,048,576 potential client addresses per central wallet.

From the perspective of the TrueUSD smart contract, these addresses are “aliases” to the central inbox.

How does AutoSweep ensure that deposit addresses don’t overlap?

AutoSweep addresses are first come, first serve. If you try to register with a base address (the first 35 characters) that is already registered, the transaction will fail. This way, if the transaction succeeds, you can know for certain that you “own” that base address.

What are the chances of a collision between central wallet addresses? Negligible. Since the base address consists of the first 35 characters of the Ethereum address, and each character has 16 possible options (0–9; A-F), the probability of a collision is 1 in 16³⁵, or

1 / 1,393,796,600,000,000,000,000,000,000,000,000,000,000,000.

We intentionally chose the length of the client ID to be 5 digits, since it enables up to 1,048,576 client IDs per central wallet address, which should be enough for most applications, yet has security comparable to Ethereum itself. If you need more client IDs, you can register multiple central wallets.

Why did the TrueUSD team build this?

Stablecoins are the world’s first truly programmable currency. Through TrueUSD, we can create new ways for traders to store and transact value. We plan to release more advanced tools like AutoSweep to make TrueUSD even more liquid and convenient to use. Our vision for TrueUSD isn’t only a dollar-backed token; it’s to build an ecosystem of partnerships and tools that traders love.

Our team comes from technology and trading backgrounds, and we’re keenly interested in how to make TrueUSD more useful to our users. TrueUSD development is driven by listening to our users, including exchanges, OTCs, funds, market makers, dApps, financial services, and institutional traders.

We’d like your feedback on this feature, and suggestions for other features. Please email info@trusttoken.com with suggestions or questions.

Appendix

AutoSweep launched on January 3, 2019. If you’re reading this post, you can start using it.

Security

Even if you had the computing power of IBM Summit OLCF-4 (currently ranked number one on the TOP500 list as the fastest supercomputer in the world), which is

1.435 x 10¹⁵ floating point operations per second (flops), then assuming there are 86,400 seconds a day and about 365 days a year, and assuming (very generously) it only takes 1 flop to generate a new public key, then a collision with your original 35-character public key would occur once every

1365 *186,400* 16351.435 * 1035= 10,644,200 years.

AutoSweep code locations

--

--

TrueFi

Building TrueFi, the world’s largest credit protocol | $1.7B originated, industry leading underwriting record | Visit truefi.io to lend or launch your portfolio