Inside Braavos’ Development of a Wallet on StarkNet: A Behind-the-Scenes Look

The power of smart contract wallets on StarkNet: enhance security, 2FA, account segmentation & streamline transactions. Discover more now!
Smart Contract Wallet
• Oct 16, 2022
10 min read
Inside Braavos’ Development of a Wallet on StarkNet: A Behind-the-Scenes Look

Meet Motty Lavie, Braavos’ Founder and CEO for a series of Q&A that help to understand how Braavos is organized to build the most innovative wallet on StarkNet, the network evolution and more. This is the #Braavosianstalks.

Q: Why don’t you start off by introducing yourself?

Sure, I’m the co-founder and CEO of Braavos, a smart contract based wallet on top of StarkNet. Previously, I was what you can call, a classic web2 entrepreneur, as I spent most of the last decade in a company I co-founded and managed, doing products for the payTV industry — everything from AI and video understanding, cloud software, embedded software and back in the day, even physical hardware.

As for crypto, I’m a late comer as I wasn’t really into the web3 space until a year and a half ago. Like the cliché goes, I fell down the rabbit hole and started to learn what crypto is and I had the luxury to take the time to study the different Layer-1s and Layer-2s solutions before deciding to settle on StarkNet.

Q: Why did you start looking into crypto so late knowing that there was a lot of media and social push around web3 for a couple of years already?

Before I had the time to study the space, I heard all the fear, uncertainty and doubt, so I mainly looked at it from afar and was skeptical.

But then, a handful of people around me who I respect got interested in the crypto space. And these are not the kind of people interested in “numbers go up”, so I thought maybe there is something there that I’m missing. And when I dived deep, it turns out there was.

I had the privilege to touch a lot of technological domains in my history, so when I fell down the rabbit hole I could see the depth of the technology and the innovative ideas that the crypto space has to offer and will continue to offer with orders of magnitude improvements as the years go by.

And I simply got hooked! That’s how I came to build in web3.

Q: What’s your exact role at Braavos? And is there anybody else from your team that you’d like to mention?

I founded Braavos and I’m the CEO but my original background is engineering. The passion is for technology and the impact that we can make on people’s lives with it.

As for the team — Abraham, Yoav and Yaron — we have known each other for over 15 years, so this venture didn’t come up with an “ad hoc” kind of team.

And these are people I highly respect because they have the unique combination of: extremely strong brain power, product understanding and the ability to execute, which is rare to find these three characteristics within one person.

Luckily for me, they’re my partners and I feel blessed.

Q: I want to dive deeper into the Braavos wallet, can you give us your two minute elevator pitch on Braavos?

If we look at crypto today, we see that most projects don’t have the values of decentralization and self custody, and in fact 80% to 90% of crypto users still use centralized solutions.

We saw the problems of centralized solutions with all the bankruptcy that happened in the past few months, where people basically lost all their funds, because of Celsius for example.

But as an industry, we must face the fact that most people turn to centralized solutions because the decentralized ones are simply not good enough. They’re still too complex, scary and extremely technical, which forces people to put in the time and effort to understand and to operate them in a secure manner.

At Braavos we want to eliminate this complexity, to reduce the burden of learning and taking care of your crypto assets’ security. To do that, we must get rid of all the buzzwords that users don’t care about and provide a solution that is self custodial, decentralized, but with the experience that we are all used to.

And we’ll achieve that because we’re building on StarkNet, an Ethereum Layer 2 ZK rollup with low gas fees and zero knowledge proofs, which allows us to use very advanced cryptography to provide an intuitive and comfortable experience without sacrificing neither decentralization nor self custody.

Q: Why StarkNet? What have you been doing on StarkNet and how do you plan on expanding into the future?

So you may know that the Braavos smart contract wallet on Starknet is the second protocol we’ve launched, but before deciding to settle on StarkNet, we examined all other possibilities.

First of all the decision was to build on Ethereum as opposed to other L1s, but as we all know, Ethereum did the trade-off of optimizing for decentralization and security while sacrificing scalability. Luckily, we have Layer 2s and roll-ups that allow Ethereum to scale, so it was now clear that we would build on Ethereum, and the new question was: “On which roll-up should we build?”

After examining all other scaling solutions at that time, we came to the conclusion that StarkNet has the most promising and battle tested technology, which are STARK proofs. It has the highest potential to bring orders of magnitude of scaling to Ethereum without sacrificing security nor decentralization.

But the issue with StarkNet was that, unlike most other chains, it’s not EVM compatible meaning that you don’t write StarkNet contracts in Solidity (Ethereum’s and other blockchain’s language) but in Cairo, a relatively new language dedicated to StarkNet.

It was a concern for us, so we started playing with Cairo to see how powerful it is and what we can do with it.

Which is why the first protocol that we built started as an educational project. It was mySwap, a classic DEX automatic market maker and the first DeFi app launched on StarkNet testnet earlier this year.

Since it was an educational project for us, we didn’t think that anyone would care, so we didn’t even announce the launch of mySwap, but people found out and started using it.

The first few days, it was only a few dozen users, then hundreds and thousands of users, then over 10.000 users a day, which was amazing and incredible for us, as it was only testnet.

And by the way, mySwap is also the first DEX live on StarkNet mainnet, so you can try it out right now to add liquidity, swap and review the protocol’s analytics dashboards.

After we had mySwap live on testnet, we understood that it would take time until mainnet was ready, so we thought about what the ecosystem needed, and how we could best leverage the possibilities that StarkNet gives us.

When I started to get into the web3 space, I saw how cumbersome and deterring the classic wallet experience is, but I also saw the huge potential that a wallet with a good UX can bring as a segway to crypto and especially what smart contract based wallets enable.

So we decided to build Braavos, a smart contract wallet (Also called Account Abstraction). We deployed the wallet browser extension about four months ago. The extension is now live on almost all browsers (ChromeFirefox and more), and we also have a wallet app for Android and iOS, which is currently the only way to access StarkNet on mobile.

In this first period which I call the “bread and butter”, we focused on developing the basic features that every wallet should have.

For us, these were creating a solution that runs on the most popular browsers and phones, as well as the kind of features which make basic operations more pleasant and smoother, such as a built-in NFT gallery, clear transaction explainer and protection against transferring funds to non-existing addresses.

And from this point forward, we will focus on what we call the “smart contract wallets features”, which will allow us to improve users’ experience even further.

Q: Can you explain what’s the difference between traditional wallets and smart contract wallets?

So we all know there are gazillion crypto wallets out there, but most of these crypto wallets are client-side only, meaning you have a private key and a public key that are kept on the client side.

And from this client side you sign transactions and send them to the blockchain. This was certainly nice for the first wave of crypto, but we can and should do much better, and smart contract based wallets enable us to do that.

Smart contract based wallets on Starknet means that we have a manifestation of our wallet on the blockchain as a smart contract, so the wallet can run logic that will be verified and secured by the blockchain. This opens a completely new design space both in terms of security and experience that we cannot do with client-side only wallets.

Here’s a few examples to make it more tangible:


Let’s start with a basic smart contract wallet feature. We have multicalls, meaning we can aggregate transactions (contract calls) together into one transaction instead of issuing multiple transactions.

Let’s say you want to access an on-chain exchange on Ethereum L1, after you connect your traditional wallet to the dApp via the integrated Starknet dApps portal, and before you can issue the first swap transaction, you have to allow the dApp to access the maximum amount of money possible, you’d have in your wallet, by default. There is no limit on how much the dApp you just signed into can technically withdraw.

That’s not a very nice feature in terms of security, right?

It’s like if you signed on a blank check and the protocol can write as large of a sum as it wants… Many crypto hacks in the past were built on that issue.

But when we have smart contracts on-chain that executes the transaction, we can set up the allowance for the protocol to only take X amount of money for the transaction and then call the contract to execute the operation (e.g.: swap) — all in the same transaction.

So we don’t need to approve the maximum amount of money possible for the exchange to take from the wallet, we can approve only the amount that is needed for this specific transaction.

Similarly, if I want to buy an NFT for 100 USDC, then I give the dApp an approval for only 100 USDC instead of an infinite amount, and it won’t be able to withdraw any more than that.

Two-factor authentication (2FA)

Another example of the brand new capabilities of smart contract wallets on Starknet is that we can have two-factor authentication, meaning we need to sign with two different keys (factors) and verify both, before we allow a transaction to be executed.

Now this is something that we all know from web2 solutions when we try to move money from our bank. Logging in with a password isn’t enough, we also get some kind of SMS or email with a number that we have to enter on the site.

Smart contract wallets enable this without keeping personal information on a centralized service, but on the blockchain instead.

Account segmentation

Yet another example is what we call account segmentation, it’s the ability to define different types of accounts such as a checking account and a savings account.

And I can have, for example, different withdrawal limits and time delays for each account.

So for my checking accounts, I might want to set no time delay but with a withdrawal amount limit. And for my savings accounts I won’t set up limits but I want a long time delay between withdrawals, so if anything happens I can revert the operation.

That way I’ll feel much safer holding my funds in a self-custodial wallet.

These are just a few examples to give a more concrete sense of what a smart contract based wallet can do, but essentially the design space and the options are very wide.

Q: While we’re on the subject of smart contracts, I need to know what is your experience developing in Cairo compared to Solidity?

Cairo is what I call an acquired taste like dark chocolate or beer. It’s definitely rougher to write in Cairo because the language is very new so it lacks some of the tools and libraries that more mature languages have, and it’s quite hard to debug.

It’s getting better and better, but it’s still more difficult than traditional languages. You really need to put in the effort in order to write good smart contracts in Cairo.

But when taking in perspective where Cairo and StarkNet as an ecosystem were nine months ago and where we are today, with the amount of developers and teams that onboard StarkNet and the progress of the supporting libraries, etc. I can say that the vector of progress is amazing.

Q: Do you have some advice for the new Cairo developers?

Yes. First of all, be strong 🙂

And second, I highly recommend you understand the Cairo virtual machine before jumping to writing code.

I think that the best way to start is to read the Cairo whitepaper, which is a bit long but reads relatively fluently. When you understand how the VM works, you’re able to develop much better and much more secure contracts.

And of course there are very nice tutorials that the StarkWare team put forward for StarkNet, I recommend doing them all without skipping any.

Plus, there is also a very open and willing-to-help community, which new devs can use for assistance, whether for architectural questions or syntax questions.

If you need help, talking to the StarkNet dev community is definitely the right place.

Q: About Braavos, what differentiates you from other wallets on Starknet? What are the next stages for Braavos?

I think compared to the other wallets out there, smart contract based wallets are completely underestimated. And that in the future all wallets will be smart contract based wallets because they simply allow us to give users much better security and a much better experience with more flexibility than client-side-only wallets can bring.

Smart contract wallets combined with L2s’ very low gas fees become not only possible in a technological sense, but from an economical sense. They will disrupt the majority of other wallets out there, seeing the very few that are smart contract based.

At Braavos, we have our vision of where we want to go and we execute on that vision relentlessly. Consider that in the past four or five months, we brought many new things to StarkNet that weren’t available before we arrived, whether it’s:

  • Support for multiple browsers
  • Having a StarkNet mobile wallet for iOS and Android
  • Enabling NFTs in the wallets and other sorts of assets
  • Presenting the transaction explainer, allowing users to understand what they are signing on.
  • Having an intuitive user interface with smooth execution, in which the user does not need to wait for things to take place (at least from the wallet side).

But I consider all these things as the bread and butter that every wallet has.

In the next few weeks and months we’re going to focus on smart contract wallet features, so expect to see some of the things that I’ve mentioned earlier, whether it’s 2FA or account segmentation and other things we still can’t share yet, but that are very exciting.

Q: I want to touch base about the Merge because that’s all over the news.

How do you see Layer 2 protocols staying relevant once Ethereum becomes more scalable?

Well, I think that people tend to confuse the Merge with scalability.

But actually the Merge does not change Ethereum’s scalability, it only moves the chain from proof of work to the proof of stake which makes Ethereum much more flexible and environment friendly.

But in terms of scalability, it’s not like we’ll move from 10–15 transactions per second, to something much higher, even on the next steps of the roadmap when sharding will be introduced, etc.

Ethereum will still rely heavily on roll-ups in order to increase TPS (transactions per second) dramatically, so Ethereum and L2s’ roadmaps are completely aligned and we can even say they aid each other, for instance with the EIP-4488 helping (calldata) gas costs reduction and making roll-ups even more cost-effective, which should make transactions’ price almost negligible.

So in the very near future, we are talking about a cost of transaction two orders of magnitude lower from Ethereum, maybe even lower further down the road.

It’s amazing because for decentralized crypto to really go mainstream, we need less than 5 cents per transaction and that’s exactly what ETH plus roll-ups will bring us.

Get Braavos crypto smart wallet with 2FA (2-factor-authentication) or 3FA (3-factor-authentication) and benefit from the Hardware Signer and Multi-Signer by downloading the Braavos smart wallet on StarkNet on mobile: Android and iOS, and on multiple browsers:Braavos Chrome extension,Braavos Firefox addon, and more.

Thanks to GammaX for the interesting interview.
If you don’t know, they’re building an order book-based decentralized derivatives exchange with an onchain transaction settlement layer and an off-chain order book and matching engine in order to provide the best user experience.




You can find the Q&A here. The recap was edited for length and clarity.

Bertrand Blancheton

Bertrand Blancheton

Be The First To Know

Subscribe now and receive monthly updates and interesting news about Braavos and Starknet ecosystem.