This could be implemented using a smart contract application:
Setup
-
BlackRock generates a key pair.
-
A box is created on BlackRock’s behalf inside the smart contract. The name of the box corresponds to their public key. The contents of the box corresponds to their balance, initialized to 0.
Deposit
To send money to BlackRock, a deposit call is made by Alice, an Algorand address A. The deposit call involves sending the funds to the smart contract and including a message M that has been signed by BlackRock (signature is also included). (Instead of Alice, we could also have a fellow box address held by Bob. The same logic could apply for Bob to fund BlackRock’s box.)
Message M should contain something along the following : “I allow address A to fund me”. The smart contract should verify that it is indeed address A that sent money, to prevent a replay attack by a malicious spammer copy+pasting M and signature. The smart contract also checks the signature against BlackRock’s box name.
If all goes well, the smart contract updates BlackRock’s box contents, incrementing the balance by the funds sent.
If BlackRock wants more control - rather than give Alice blanket-authority to send them funds in perpetuity - they could add more to the message M. For example, the fund amount should be added - maybe BlackRock only accepts funds above a certain amount.
Or a nonce (a random number) could be generated for each transaction and appended to the message M. Then after the deposit has gone through, the smart contract could store the nonce as the name of an empty box. The next time the SC would check and see if there is a box with that name and reject immediately (box names need to be unique). In this way, each transaction needs to be approved; there’s no way to repeat the same nonce twice.
Withdrawal
In order for BlackRock to spend the money it could make a withdrawal call. The withdrawal call would have the SC either send the money to an Algorand address, e.g. Alice, or to another box inside the smart contract (assuming BlackRock provides the necessary proof that they have permission).
Regarding the key pair
The Algorand AVM can “officially” verify the following type of signatures:
Ed25519 is a no-go because it is the same as the Algorand blockchain. A malicious spammer Sam could simply take BlackRock’s public key, transform it into an Algorand address and fund that address. BlackRock would have de-facto control over those funds - having proven knowledge of the secret key controlling the public key - even if they never asked for them.
Secp256k1 is what is used in Ethereum and Bitcoin. An adversary could simply fund them on those networks instead and claim that BlackRock has received the funds. But at least they’re safe in the Algorand world.
Secp256r1, also known as P-256, is actually supported on certain other blockchains like Tezos. (Tezos supports all 3 aforementioned variants.)
You could choose to use RSA here, implementing a custom solution in AVM (TEAL). I don’t think there’s a blockchain out there that relies on RSA lol.
However, interestingly the post-quantum signature scheme Falcon (which is used in state proofs) is available as an opcode in vFuture. I.e., an opcode that can be experimented with in your local sandbox environment, but one that is not yet in Mainnet. Now that would be interesting to see.
Of course you could take this ad-absurdium - what if I specifically created a new blockchain using Falcon as the signature scheme just so I could send funds to an account only BlackRock could in theory spend from?
Okay but what if the PK is longer than allowed box name length?
You can do a SHA512/256 hash of the PK and have that be the name instead. And then each time a signature is to be verified, the PK gets supplied as part of the deposit call and the SC does a hash in ad-hoc to get the box name.
Alternatively, they first X bytes inside the box could be dedicated to holding the public key, and everything after is dedicated to holding the balance. Then the box name could be something completely random and the PK is extracted out of the box ad-hoc to verify the signature.
What if spammer Sam just sends the funds to the smart contract?
Well the SC would hold the funds but BlackRock would have no control over them. Unless the SC’s logic allows for it, they would have as much control over them as they had when the funds were in Sam’s address.