ShieldUSD is a privacy-preserving fiat-backed stablecoin built on Midnight (a Cardano partner chain) that implements programmable shielded tokens, combining the privacy features of native shielded tokens with the programmability of contract-based tokens, enabling compliance actions like freezing and seizing while maintaining transaction confidentiality through a three-role system (issuer, auditor, compliance officer) that requires collaboration for any compliance action.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Cardano: NerdOut - ShieldUSD
Added:Today on Nerd Out, Shield USD.
[music] Welcome back to Nerd Out, the show where we take a look at Cardano. We break it down, but don't dumb it down. Today, we're taking a look at one of my own projects called ShieldUSD, and we're going to do a little bit of a demo. So if you have not heard about ShieldUSD, you can follow them on X. Uh ShieldUSD is a a product from the W3I Moneta team, same as that does USDM.
ShieldUSD is a privacy stable coin on Midnight, a partner chain of Cardano. So we're going to dive into it here. uh give you a little bit of background the basic basic background and then mostly just doing a demo today.
So there are various different token types on midnight. There are the two native token types. So this is like supported by the midnight ledger directly. So they have native unshielded tokens. This is like the night token. It works exactly like a Cardano native token. There's no privacy. There's no programmability or custom spending logic. It's just a a public token that lives in a public address in your wallet. If you spend it, move it, send it to a contract, anyone can see what's happening with this unshielded token. Uh there's also native shielded tokens and these use Z swap for privacy.
And how they work is your wallet scans the blockchain looking for shielded notes. This is the equivalent of UTXOs um and it's looking for ones that it can decrypt. If it can decrypt them, that means it owns them and it can spend them. There's also no programmability here, but if you send one of these native shielded notes to somebody else, no one can see uh what happened there.
So there's there's perfect privacy here uh but limited programmability meaning there's there's no uh no ability to do compliance on any of these particular tokens. So it it's more like a a Zcash or a Monero where there's just privacy period.
Uh the next category I've got here is programmable unshielded. So, a programmable token is similar to an ERC20 on Ethereum where the token lives inside of a contract. Um, it's kind of a virtual token owned by the contract and when you send something to somebody else, it's just moving the little record or, you know, decrementing a balance over here and incrementing a balance over here over there. But it's all inside of the contract. It is account-based. Uh, and there's and there's no privacy with this. Um, there's certain contracts that are being worked on that give you some level of privacy. Uh, but those are still kind of in in development right now. Even though they're not perfect privacy, they're they're kind of like you can see that some value was moved, but maybe some aspect of it was uh was private and some aspect was public. Like say you could see that these two accounts are continuously interacting with each other. So the amounts might be private but maybe the the spin tree is is not private. The last category is what I call programmable shielded. Uh there's no standard for this yet, but this is where I feel like shield USD fits. Um it is a virtual token owned by a contract.
It's similar to a Z swap token like the native uh shielded one over here, but it uh it lives in the contract the whole time and it is kind of UTXO based and it can be perfectly private.
Um but because it lives in the contract, you can do compliance actions on on that token. And there's some additional things that ShieldUSD does that kind of bridges the gap between this unshielded and shielded. We'll we'll get into that in the demo. So without further ado, let's uh let's go ahead and do that.
U let's go ahead and pull up the Perdict wallet. So Perdex is a demo wallet I've I've created for the purposes of highlighting what Shield USD can do.
And let's go ahead and just poke around it a little bit. So, right now I have five different wallets loaded in here.
We have Alice, who is a user. We have Bob, who is a user. We have a special account called issuer. This is the one and only wallet that is allowed to issue new tokens.
So, that's kind of a a private um whoever the issuer is. In this case, it would be Monetta would own this issuer wallet. They would be able to mint and burn. Uh we have an auditor role. So the auditor for compliance is able to see everything and we'll we'll dig into that in a minute. And then the final role is compliance officer. This is the role that can can do compliance actions like like freeze or seize. Um, these three roles kind of work together in order to create an entire compliance suite. So, one role without the others isn't very powerful. They all have to collaborate to do any type of compliance action. We'll talk about that in a bit, but first, let's just do some some normal stuff. So, let's go to let's take a look at Bob. So, Bob has some night tokens. He's generated a bit of dust. He currently has no ShieldUSD in his private balance. Now, ShieldUSD also has a public side. And that's one of those things that you can do is move value from the private side to the public side and back. So, if there's some contract or DEX or something where the balance needs to be public, this contract can be used to move some of that value over, do DeFi, and then move it back to the private side.
And so let's go ahead and find um find Bob's address and send him some shield USD from Alice. So, let's go down here and find uh we'll copy his shielded address and let's go over change to Alice and we'll go down to shield USD and we want to do a transfer action and we'll go put in Bob's address here and we have 10,000 shield USD from Alice. Let's send half of that to Bob.
So, we'll send uh 5,000 to Bob. And then we'll review the transfer 5,000 selected notes. So, there's one UTXO in the contract that contains the 10,000. And then we'll end up with two notes. So, we'll have a private change note, 5,000 coming back to us, Alice, and then the resulting private balance for Bob will be 5,000. So, we'll go ahead and confirm that.
And now it's building our transaction.
And um proving takes a little while.
Privacy is uh something you do have to pay for.
So a lot of times this takes 40 seconds to a minute to do the entire process of proving, signing, submitting, confirming, and finally synchronizing the contract state.
And I'm running a local proof server for extra security. Some wallets, they talk to remote proof servers or they'll talk to uh secure enclave secure compute environments to ensure that nobody can see the proof they're running. Okay, so we're now submitting it to the blockchain and then it should confirm and synchronize fairly quickly once the submission happens.
And the first transaction always takes a little longer than the others. Okay, so we're confirming.
And now we're synchronized. So now if we look up here, we see we now only have 5,000 shield USD under Alice. No public balance. Let's go ahead and switch over to Bob. Make sure he looks good.
So, Bob, you see now Bob has 5,000 and uh no public balance.
Uh let's say we wanted to do some DeFi on Bob's side. So, let's go ahead and uh copy his shielded address again and let's move some of his um balance and make it public.
So, we're going to put his address in here. And let's say he wants to do a little D5, maybe 500 bucks.
So, let's review that conversion.
And we'll go ahead and confirm that. So, we'll be left with a private change note of 450. Let's confirm that.
Oops.
Precon conversion confirm.
Oh, it is going here. Sorry.
I hope I didn't run two transactions, but we'll see. Yep, it failed because I messed it up.
Okay, let's try that again. Review conversion. I'll click it once and let's try. This is why we do demos live here. Let's go to Alice. Let's go back to Bob.
Back to Shield USD.
Oh, it says another transactions already running. Okay.
So, it may actually convert here in a minute.
Well, while we're waiting on that, let's do the same thing over with Alice. And I won't click the wrong button.
Okay. So, let's go get Alice's shielded address. Let's make public.
And she's a little more conservative.
Let's just move 300 over for her. So, we'll review conversion confirm. Okay.
And then we'll just wait for this to prove.
And while we're waiting for that, let's go ahead and take a look at her private notes.
So, she still has a 5,000 unspent note and previously she had a 10,000 that got spent. So, that one was spent and the change was 5,000 when we moved it to Bob. And you see I've been running a whole bunch of test transactions here. Uh, testing out the system.
So, let's go back over here and see what our status is. Okay, we are in the submit phase.
Confirming and synchronize.
So now when we go up, we should see that Alice has 300 shield USD, 4,700 on the private side. So she's got some on the private side, some on the public side.
And if we look at private notes now, we should see a note of 4,700 that's been unspent. And the 5,000 one was spent when we moved some of that to the public side. So that's kind of how the spending transferring works. Um, and again, you can transfer stuff on the the public side. I'm not going to demo that just because it's not that exciting. Uh, let's dig into uh a little bit of the compliance roles.
So if we look at um well let's look at the issuer first.
So the issuer also has the ability to see their own private note. So they're a regular shield USD account. They can spent. You see originally this account minted 10,000 ShieldUSD. So everything that's minted is always minted to the issuer first. So the issuer has to mint and then send it out.
It's kind of a fan out transaction. to whoever mints the token.
So, right now they just have a single spent note where we sent that 10,000 to Alice way in the past before this video.
And if you look at their activity, there's only two transactions here where they received some night from the faucet and where they sent 10,000 shield USD out to Alice.
Uh let's look at the auditor next.
So the auditor is a special role that can see everything but they can't do anything on their own. They're they're basically a readonly position for everything in the contract.
So if we look at audit activity here, we can see that 41 different things have happened on this contract so far. Uh there's 29 private notes that we've seen and we can look at the different families. There's been some conversions.
There's been private notes created and this is the audit activity. Let me widen the screen just a little bit here.
Yeah, some of those uh we don't have truncation there, but so you see we have a a self transfer here along with a private to public. So that was where we spent the 5,000 note and we created a 300 public uh entry and we created a private note with 4700.
And so and all the addresses associated with these things are visible but only to the auditor. Nobody else can see this. So they can go back and see the entire history of what's going on for compliance purposes. Now let's say that there's some unoured activity or some OFAC compliance, you know, OFAC blacklisted country that's done something stolen some funds and we wanted to freeze those uh the only person that can freeze anything as we talked earlier is the compliance officer and the compliance officer can't see anything. So they have to work with the auditor to say okay what wallet needs to be frozen right now. And if we go down to their compliance tools um they do have kind of the emergency escape button which is pause the whole contract. So once the contract is in a pause state, nothing can happen. So this would be like major blockchain outage or you know massive exchange hack or something like that. Um in that case it would be just like pause everything till we figure it out type of thing. So that's the emergency escape hatch they have. Uh they also have the ability to freeze a private balance.
Um, so they would have to specify a target shielded address. They can add some optional evidence reference and execution references. Those are just internally for their own memos.
And then they can do the freeze action on that particular account. And once frozen, that account can no longer spend. They can still receive, but they can't spend.
Uh the same thing is is available on the public side.
Um so you can target a user account from a shielded address and you can do the compliance evidence and execution references if you want.
And so you could freeze a public balance as well.
And then only once a note is uh frozen um you have to se you have to seize based on particular notes and the auditor has to hand off those exact particular UTXOs that have been frozen in order for the compliance officer to uh seize anything. Now when the compliance officer seizes they do not get control of it the issuer does. So all three are involved with the most big e big brother evil type of uh thing which is seizing someone's money. All three have to collude in order to do that compliance action.
So that's kind of how ShieldUSD works.
Um you know you can also look at compliance history. I haven't done anything on this contract right now because I want the people testing it to actually uh really hammer on it well and give it a good good test without doing any freezes and seizes until they get get comfortable with the main transferring functionality and and then we'll get into testing some of the stuff a little more.
But that is um basically Shield USD and the Perdict wallet. Um I hope you had fun watching with what I've come up with. And with that, nerd out.
[music] >> [music]
Related Videos

Multi Vendor Multisig w/ Seed Signer, Hodl Dee & QnA
BitcoinMagazine
985 views•2024-09-05

Oasis Week in Review: Latest blog articles, workshops and more
OasisFoundation
135 views•2024-10-18

Kaspa: How ZK Turn Blockchains Into Settlement Layers (Part II)
cxc
1K views•2025-12-19

以言會友 EP13|當比特幣屢破紀錄 區塊鏈技術能帶來什麼?
dotdotnews
293K views•2021-01-05

Soroban Development: Ecosystem Growth, and the Rise of 70+ Smart Contract Projects
SorobanOfficial
1K views•2023-07-19

Balaji Srinivasan I The Fiat Crisis | Pragma Tokyo 2023
ETHGlobal
37K views•2023-05-06

$22 million NFT scammers arrested (insider evidence)
coffeezillaextras
806K views•2025-02-03

SYMMETRICAL TRIANGLE HOLDS THE KEY TO NEXT MOVE" DON'T IGNORE
xrpfuturemillionaire
800 views•2026-03-15
Trending

MIC DROP: Smithsonian Director Called Out For Woke Propaganda
TheAmalaEkpunobi
37K views•2026-07-23

2.4 BILLION Records Got Leaked...
DeepHumor
15K views•2026-07-22

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23