Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record and publish demo #10

Open
Tracked by #8
abailly opened this issue Jan 24, 2025 · 3 comments · May be fixed by #47
Open
Tracked by #8

Record and publish demo #10

abailly opened this issue Jan 24, 2025 · 3 comments · May be fixed by #47
Assignees

Comments

@abailly
Copy link
Collaborator

abailly commented Jan 24, 2025

Scenario

Context:

We want to share current state of work on deposit wallet with the community and provide a short and to the point overview of its main features

what it does

Main focus of the scenario should be on exchanges:

  • Create 2 wallets
    • 1 with signing key (generate mnemonics + signing ke) or an completely external wallet
    • 1 w/o signing but with same XPub (need to create a new wallet restoring from XPub)
    • Q: how much resources is it consuming (1.8GB, not persisted)
  • Check addresses
    • compute address for any customer number w/in the range
    • cannot compute address outside of range
    • make a deposit transaction to a selected address through another wallet (Nami,…)
  • Show deposits
    • new deposit is shown
    • we can see old transactions and time-based queries
  • Payments
    • Move funds out of the wallet to some external address from some user address
    • Need to separate signing transaction
    • We can show the spent amounts in the deposit window if spent selected this does not impact the deposited amount

how it does it

  • Why using Agda?, technical decisions
@abailly
Copy link
Collaborator Author

abailly commented Mar 4, 2025

Should probably use https://www.narakeet.com/ to generate clean voiceover from text. Here is a transcript of my first attempt at recording demo, need to clean it and write a proper script to use with text-to-speech

 >> Hello, this is Arno from the Hal team, and I'm going to give you a demo of the deposit
 wallet which is a prototype evolution of the existing Cardano wallets with some interesting
 new features.
 So let's start with the beginning.
 There is a proof of concept user interface which is just a way to show how the deposit
 wallet works and what are the main features which are part of this project.
 So let's start with creating a new wallet from scratch.
 As always, we'll need to generate a bunch of keywords, the mnemonics.
 We are going to copy them and we are going to create a new wallet.
 What's important and this is a key feature of the deposit is we can define how many customers
 we want to track and we want to be able to track within this wallet.
 So let's say for example that we want to be able to track 1,000 customers.
 We are going to define a passphrase which should be simple and then the restoration process
 will start.
 So when the restoration process starts, the wallet will synchronize with the whole chain.
 Note that obviously when we are creating a new wallet, this doesn't make much sense.
 We know that there aren't any transactions or any new deposits or payments which have
 even ever been made but in general, this is a feature where it makes it possible to restore
 an arbitrary wallet from an arbitrary point in time.
 Obviously in a more polished version, we would need to be able to define where we want to
 be able to start from or where the restoration points.
 But right now in this simple implementation, we just decided that we are going to start
 from fresh.
 So it won't be too long but it will still take a couple of minutes.
 Let me take this opportunity to give you a quick tour of the main ID behind the deposit
 wallet and it turns out that this main ID was specified and formally specified actually
 using the type language acta as in a so-called deposit wallet specification.
 This is a part of the repository of code where the specification leaves and it's pretty much
 a standalone.
 And from that specification, we are generating code and this code is what is used inside
 the implementation of the wallet to make sure that we are actually respecting the specification.
 What's interesting here is that the ID of the deposit wallet is that we want to be able
 to track an arbitrary number of customers.
 So we decided to use the 1000 but it could be 10,000, it could be 100,000, it could be
 1 million, it doesn't matter much.
 But some impact on the needed resources to map the numbers to accounts.
 But contrary to the existing behavior of the share of wallets, we are able to track any
 number of addresses and number of accounts, so to speak, or customer IDs and without a
 need to maintain and to have this cumbersome gap which derives from the B-54 specification
 and the CIPI grandfather.
 So in this specification, we state what are the main requirements and what are the main
 features of the wallet and we define and formally define those specifications and prove them.
 So in the case of deposit, what's really key here is the ID that really the main purpose
 and this is clarified here in terms of what are the requirements for outgoing transaction
 is that we want to guarantee that no fund will ever be sent to an address for customers
 that hasn't been explicitly specified during the payment generation.
 And this explains why we call that deposit wallets, it's really a way to track, make
 sure that the deposits that the customer sends to the wallets are somehow safe.
 They can't be, they need to be explicitly spent in order to be removed.
 And this is something that sounds quite, this is something that is really happened to be
 a problem that happened, that sometimes happened and a key point and a key risk for centralized
 exchanges and general emergence which received fund from the users and potentially managed
 friends on behalf of several users.
 And so these kind of guarantees are actually, like I said, formerly specified in this module
 and from this module, we generate the code that was where it runs with and yeah, I won't
 go into the tell, the interested users would need to go through it.
 You can see here the general idea of the derivation that we follow the standard B52 derivation
 process with some specific purpose identifier and we are using the index, the last position
 of the index to track the customer which is kind of, and which allows us to basically
 track up to 2 billion numbers.
 And then at the end of the final, this is where we are kind of stating and proving the main
 property for the infrastructure which is the false requirement, high-line before, that
 if we are creating a payment, then this payments requires any known address, any address in
 its nation to be part of a known address or not be present at all.
 This is basically the mathematical formulation of this, of this, so we created payments to
 some destinations and then for each address, which, for each address pertaining to a non-customer,
 then we are sure that this address doesn't pertain to these nations, nor that it pertain
 to the outputs, well, more precisely, if this address is not in the destination, then it
 is not in the outputs of the transaction, which is the important property that we need
 to be explicitly requiring this address to be present.
 So let's get back to our wallet so we can see here that the wallet has been fully restored
 and obviously it's if we look at, let's try to send something, I'm going to play the
 role of a customer and I'm going to send something.
 So let's imagine that I'm given an address to send funds to, so here I'm going to be
 assigned the number 42 and I'm going to use this address, so now from my wallet, let's
 say that I have a year or less, I'm going to send some amounts of ADAP, so let's say
 100 ADAP doesn't matter much, I'm going to review the transaction, confirm it, sign
 it, and then, yeah, send it.
 So now I, the wallet itself will need to wait some time.
 So the wallet behind the scene is tracking, keeps tracking the chain, following the, following
 the chain and interacting with the full note, and hopefully in a couple of seconds or minutes,
 the deposits related to this address will appear on the wallet.
 There is a, so when we track the address, we can see that the deposits related to this
 address, there is also a page where we can see all deposits, so here we can see that
 we have some deposits, this, and we can, there is a way here to design what's the window
 for the deposits, so this window is actually quite important because this is how exchanges
 or merchants provide some confidence and provide some guarantees to their customers on when
 friends have been received and what is the right window to receive funds and then send
 or spend those funds.
 So let's say, for example, that our window is 50 minutes, we can see here that we got
 some, from the customer 42, we got the transaction, and this transaction was received containing
 your hundreds TA desk, obviously the, from the wallets, we can make deposits, but we can
 also make payments, so let's imagine that I'm going to send back some amounts from to
 another address, so I'm going to use the same wallet just in order to simplify things,
 I'm going to here, I'm copying my address, and I'm going to send, let's say, a hundred
 data, so here I'm going to create a transaction, so we can define the transaction contents,
 and here you can see that, well, I cannot send one in related because I don't have enough
 funds, so, well, let's say I'm going to send 99 adas, here we can see that we have a transaction,
 this relation contains some inputs, it also contains some outputs sent to the address,
 so 99 root adas, and obviously it could also contain the fees.
 Let's create the transaction, I'm going to sign it, I'm going to submit it, and now this
 transaction should at some point appear in my wallet, obviously, so here if I'm looking
 for connections, I got my 100 adas cents, and hopefully in a couple of minutes I should
 see the 99 adas appearing in my wallet, so yeah, and what's interesting in that now we
 can see that, well, the payments, so we still have the deposits, if I look at the deposits,
 we still see that there is a deposit of 100, and if I look at all the deposits from my
 wallet, there is still there, the reason why is because the concept of the deposit wallet
 and in general the concept of a wallet the way an exchange or merchant uses them is that
 it decorates the actual lending of the funds inside the wallet, which is related to the
 owning of the keys from the tracking of the customers and the accounts to which the amounts
 per thing, and it's critically important that what's the deposit wallet offers is an infrastructure
 and tool to simplify and ease the tracking of these accounts or customer numbers, let's
 see if I received my friends from the wallet.
 [silence]
 [silence]
 [silence]
 [silence]
 [silence]
 [silence]
 Okay, it took a long to receive those 99 and do the ADA's, but they are back, so now you
 can see that the balance of the wallets is zero, basically, so there aren't any funds
 on the wallet, so let's try to send some more funds, let's use another address just for
 the sake of it, 12, I'm going to copy that, I'm going to send back some funds, let's
 see, a hundred gain, okay, so now I'm waiting for, yeah, and now we have the two deposits,
 so this was fast, we have customer 42 with 100 and customer 12 with 200, with 100.
 [silence]
 What's interesting with the wallet is that we can also, we can actually restore the wallet
 from just an account key, just an extended public key, so the goal of this account public
 key is to be able to separate the signing and the process of controlling the funds through
 signing and private keys and secret keys, signing keys from managing and tracking the
 operational aspect of the wallet.
 So let's imagine that we are going to play the role, I'm going to delete the wallets
 and I'm going to restore the wallet from the extending that public key, and it's actually
 quite important that I define how many customers I'm trying, so make sure that this is the
 same.
 So now I'm going to restore the wallet from the extended public key, and hopefully, once
 the wallet is synchronized with the network, we should see the same deposits, and the same
 deposits appear on the page, on the interface, so this is going to take a while, a few minutes.
 Okay, so we can see that the wallet is now synchronized, let's see what's happening in
 our deposits, and hopefully, yeah, we see that deposits for both of our customers are
 now part of the wallet.
 What's interesting in that if I try to make a payment now for this wallet, well, I could
 just do the same thing as before, let's copy my address for my personal wallets, let's
 say 99 ADA, great, and you can see here that the main difference is that I can't really
 sign the transaction anymore because I don't have the keys, so I will have to result to
 another means, so I can, and what's in the deposits, so the general idea here is that
 we are going to provide a seaboard for that transaction, that will be able to be signed
 by another tool, for example, it could be continuous CI, or it could be any other tool
 for that matter, and we can really distinguish and decorate the management of the funds, tracking
 of the deposits, and general interaction with customers from the actual transfer of the
 funds and the payments that are going to be made out of the wallet.
 I'm not going to do it, but just this was just a way to give an overall idea, and yeah,
 and that's basically it, there is not much more to, I mean, there could be more things
 to discuss, but I hope this presentation could give you a good review of what the deposits
 is.

@abailly
Copy link
Collaborator Author

abailly commented Mar 4, 2025

Also, used https://github.com/ggerganov/whisper.cpp to convert audio from demo recording into a text file

@abailly
Copy link
Collaborator Author

abailly commented Mar 4, 2025

Did some editing on the first version of the video, plus text-to-speech generation to have a more native-speaker sounding voice.
https://drive.google.com/file/d/1hxmFrClHwhPAvFzbOlHsvfQXajpeZ6kT/view?usp=sharing

@abailly abailly linked a pull request Mar 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant