Building a Self Custodial Debit Card & Smart Permissions Alejandro Perezpaya Jorge Izquierdo Tuyo
Ethereum Denver·Thu, Oct 9, 2025, 12:00 AM
Learn how to build a completely a self-custodial debit card on top of smart accounts with rule-based spending. This talk delves into the technical architecture, challenges of building smart permissions, and innovations driving the next generation of decentralized financial tools.
Transcript
[Music] hello everyone uh thanks for having us in this amazing amazing event my name is Gorge and together with my cofounder Alejandro uh we're going to talk today about building a self- custodial crypto card using smart permissions so before we get started just some some background and context about about Toyo what Toyo is uh first and for is a self custodial crypto app uh and we take the self custodial part very very strongly uh at so much I don't know if you know Spanish uh but Toyo mean literally means yours in Spanish uh so we take it to the roots in our name uh with Toyo you can trade earn and now spend crypto um right on your phone with a great user experience and we also have the ability to treat uh stable coins basically as first class citizens and like one usdc in Toyo is kind of of like having one usdc in a in a bank account and the whole thing should feel like the best experience that you can have in a centralized exchange or that you can have in a modern Neo Bank uh but have it fully self- custodial and money in too is always yours so one thing that when we were building too I was missing is like okay but how do we spend we allow people to spend crypto daily to use crypto on a daily basis because in order for us to breach that Gap it has to feel as simple and intuitive and not cumbersome as using the traditional cards from a from a bank account so we decided that we had to build a build a card in order to bridge this Gap uh and be able to use this today when we look at the at landscape of crypto cards uh we saw that they were generally bad and like all the crypto cards in the market right now they do have at least one of these problems uh either they're custodial so you're basic basically sending your money off to someone else's wallet and then hope that whenever you're going to pay your money is going to be there and that they're not going to run off with your entire balance so this is this is bad the other issue is that they feel like prepaid cards uh and like some of them they like they're marketed as not prepaid cards and they're not prepaid cards but it still feels like prepaid and prepaid is like if you have to be constantly topping up some balance that you wouldn't have there it still does feel good like a crypto card should feel exactly like having a card and a bank account and if there's money in your account you can use your card and there's there's virtually no crypto card that fails this way and the third one for the ones that do not have this problem is that they lack onchain privacy um given how onchain transactions work and how easy is to trace People based on who do you pay what transactions do you make if you have a card attached to your account that can be traced back to you if you see every single transaction ction on chain that's like a huge privacy concern because like maybe you don't see exactly what someone paid but if you can see the time or the amount of the transaction you can fairly you can make pretty good approximations of what someone is doing so if I'm if I'm at 1:00 a.m. doing like several $15 charges someone might say okay he went out he's having drinks he keeps paying for drinks and this is not great because like to a bad actor they may tell them like he's not at home he's is out drinking and like this is this is not great we shouldn't have every single transaction that we make with our card leave an unchain footprint for Bad actors to see forever so what what are the properties of a of a great crypto card that that we needed to build first of all it has to be non-custodial so users stay in control and self custody of their funds until the moment these funds are spent second it needs to have a debit card feeling and here like feeling is very important because like people shouldn't be doing treasury management to make sure that they can pay for a coffee it should just work you have money in your account it's self custodial but you can still use the card third it needs to be rack proof and this is very important for us uh because like if we if it has these properties but then people can pay but they don't they're not in a hook for what they spend we go bankrupt and if we go bankrupt we have to close the card so this is not great the card needs to be rack proof and proof from double spending attacks and so on and for it needs to be as private as possible and here we work with the constraints of public blockchain so there's only so much that we can do but we should ofus skate as much as possible so that looking at my on footprint of me using the card someone cannot look at and say okay this person is traveling this person's outside of the house or they might be in another time zone so before we get into how we build this uh we're going to do a little bit of background on how C transactions work and which informs the the infrastructure we had to build so first the someone goes to a to a merchant and they have to pay for something so this is the presentation of the card which triggers an authorization via the card Network and here's where we come in and when we have to make a decision uh very very fast so basically the card uh Network ask us hey this person wants to pay this amount of money for this can they pay for it or not and we have less time than what it like takes to land a transaction to decide this and this is a final decision that if you say yes then in the terminal in the payment terminal the user like the merchant will say you're going to get paid and then it's it's done and then in one to three days uh the settlement URS uh once the transaction is completed it's when the funds move and here there's a lot of as senet cases but this is typically what happens and at this point we need to make sure that if we were if we authorize a payment that the user at this point is going to pay and bear in mind that the user needs to stay in custody of their funds for the entire for the entire period the second background is how smart account permissions work to use built on Smart accounts with um um infrastructure with from zero Dev um so these are like some special accounts that run on Smart contracts and like the usual flow for this uh and we' fitted some things here for clarity is the owner of the account has a private key or has a pass key they sign some payload for a user operation the smart contract checks hey the owner did sign for this and then the the transaction any action can go through from the account but we can also set this other type uh of uh of permissions which are a little bit more complex but basically allow us to have arbitrary stateful smart contract logic that validates transactions in the wallet so in this case the owner of the smart account will install this permission in which it will allow Aigner which in this case it would be the car provider uh to execute stuff in the account but within some very specific thresholds um and this is basically smart contract code that for every transaction that the signer uh signs it can Ransom code decide whether the transaction uh can go through or not and then it happens but it's like being able to allow program a atic permissions for very very scope uh actions so yeah uh coming back to this uh how did we pull it together uh to build a um a great crypto card that has the four properties that we saw that we saw before and the first step is this this thing that we call the periodic pull permission uh this is smart account permission that users get installed into their account which basically allows to you um to pull a certain amount of money from the users's balance daily but it's just that amount that will be able to be spent with the with the card and here you can see how it looks like the permission in the in the app when the card is activated we ask the user hey do you consent to this permission which basically pull to pull the card daily limit on the on the user's account and then whenever there's time to rebalance this uh there's this um this policy that runs which allows us to just trigger that specific actions which goes directly from the user main account into this other component that we called the collateral account the pull permission allows us to be sure that that's the only way in which funds can move it can only go in a certain flow which is the car daily limit and go from the smart account to go to the collateral account of the user and that's the only thing that we can do and it's something that can be triggered uh automatically so the user doesn't have to manage their balance and then the collateral account this is where the user funds that can be spent with the card live um so this is a smart contract it's like a sub account from the from the user that has the feature that basically in order to release funds too has to coign uh those releases um and through the poll permission we saw before this can be automatically toped up then whenever there's money in that account when we get the authorization we can check hey are is the user going to pay for this do they have balance on this are we going to be able to instantly the moment that we say yes are we going to be able to lock those funds and this is what happens whenever the user expenses uh we're able to implicitly log the funds which in practice means too will refuse to cosign any releases on top of the dep that the user that the user already has and as you will see in the in the demo this ords absolutely transparently for the user it's just it's just magical and handle everything in the in the background then after the card transaction are settled um to you can trigger a settlement again these flows are very very strict so like money can only move from like specific accounts to specific accounts so whenever like transactions are completed we're able to pull uh pull the trigger and the funds are settled directly with the with the card provider and this is really good because it allows Studio to never have custody of the user funds and we're basically just making sure this entire automation works and go goes from like a user owned smart contract which is fully self custodial all the way to pay him for the carard transactions and the whole thing fills great and then at any point since the user is in custody of their funds they can trigger an ejection which is basically saying like I don't want this I don't want this any longer and then they will after some cool down period everything gets uh gets removed the user is the only one with powers over that money and at this point the card will stop working because we are not we're not sure that we can provide the service with all the all the guarantees and now we're going to we're going to do a live demo of the of the entire thing um Alex okay so everything that we can tell is great but H it's better if we feel it so we are going to do like a live pchas of something um as you can see like I have not enough balance like to do anything so like or card uses USM base I will try like to get something in two you can receive money from bank accounts uh people sending usdc or Euros through a swift or sear veils can send it directly to your account and you can do it otherwise you can also like deposit directly from your coinbase account and in this case we will be using like our wallet and using like Standalone ebm transactions maybe someone wants to send me money and I will welcome it but jge if you have some spare something that I can use to buy okay so yeah you just send me some if I cannot do anything with this because like as you can see here or card just spends um just this on base so I'm going to sell this just in too2 that you can trade in multiple chains but we are not going through that rabit hole today and let the change work yeah we're here so we are ready to spend money this is all happening in real time this is not prepaid as J told you is in the collateral account let's like buy some Robot Unicorn that I see there let's see if they sell something in Etsy that can be similar to that come on internet no there's not wi okay ER robot [Music] unicorn well the connection is not helping me a lot with this let's just buy the first thing that appears here so we can save some time yeah here it is just byy this random thing l same color number one bember okay so right now we can do the checkout we are going to use Apple pay and yes uh no way I cannot ship this to the [Music] U let's look for another item they don't ship this to Spain yeah whatever okay let's see if this works yeah we can do that it's not very cheap but let's do it okay we done let's see yeah we receive here the payment let's open the a push it already happened like Etsy $99 all working so this is something that feels very good to be able to do it once and for all you are paying with crypto you still remain s custodial until the end but uh where's the AR here but you are not giving any explanation to anybody you go to a standard in shop random place you pay like a normal human being you don't need to give any excuses to onboard them into crypto to get them into a wallet whatever so behind this that looks very simple there are a lot of pieces that come together H ones are like our partners rain that are here and cheers to them for making this happen in two H the other thing is like the networks and the merchants and ourselves so the life cycle here is very easy like the user initiates a payment we receive a network U like the network and the iser and all the people involved request like too for the authorization to do this payment we check if the user has like in all the collateral account the expenditure that they done already and everything has availability like to cover this operation and regarding that we decline or accept the payment if the purchase is approved like everything goes well the user receives the push notification and the purchase is done if it's decline it will happen likewise but uh in the decline State and the user will be locked for the authorized amount when this H payment is settled we will receive the settlement message and we will H allow our Machinery behind like to batch that transaction with all the payments that we have like completed for the user and to settle that in one just just one transaction and yeah the good news is that we are releasing the too card in the US today so anyone like here can download it today you can pay with usdc on base paying any Merchant that accept Visa is 100% Fe free you don't need to pay any set of fees you don't need to pay any monthly subscription or monthly fee and you can spend in store now using Apple pay or Google pay and as of as follow we will be releasing for South America and the physical card will be also coming soon uh Europe will be also coming but we don't have like a close estimate for that and if you want to come and change the future of finance and shape it with us uh we are hiring so we are looking for talented people that if you are interested just go too.com get the app or or send us your CB and we will be happy like to review it uh yeah here's the link thank you very much [Music]
Automatic transcript — names and jargon may be misspelled.