HackerTrans
TopNewTrendsCommentsPastAskShowJobs

quentinadam

no profile record

Submissions

AWS Nitro Enclaves in Deno/Rust

github.com
3 points·by quentinadam·2 ปีที่แล้ว·1 comments

comments

quentinadam
·6 เดือนที่ผ่านมา·discuss
This is super useful ! A few more tools that I use regularly, if you are looking to expand: - Base58 encoding to Hex conversion - Hex to decimal and vice versa - Strlen - Compute SHA-256 of text or hex string - Compute Keccak-256 of text or hex string
quentinadam
·2 ปีที่แล้ว·discuss
No that’s not how it works. When a transaction is submitted on the blockchain to withdraw funds from an address it needs to be signed by the private key and it exposes the full public key. A bot that would monitor such transactions would therefore see the public key. With just the public key you can’t create a valid signature, you still need the private key, however for this particular case, knowing the public key reduces the entropy of the puzzle by a factor of 2 (from 66 bits to 33 bits), so this puzzle was easier to solve for the bot knowing the public key published by the person who found the private key. This is very specific to this specific puzzle which had 66 bits of entropy. In general, bitcoin transactions have 256 bits of entropy.
quentinadam
·2 ปีที่แล้ว·discuss
Near-zero dependency example of how to use AWS Nitro enclaves from Deno. Can serve as a code sample or a blueprint to understand the whole process, because I found the AWS documentation and process quite unclear and over-engineered. Parts of the code (the code to access the Nitro Secure Module and the HTTP Proxy that connects on a VSOCK) are written in Rust and accessed in Deno through FFI.
quentinadam
·3 ปีที่แล้ว·discuss
We run a medium sized trading system (20 microservices) in Deno for about a year now. There have been a few runtime quirks but they have currently all been ironed out. I love the approach that Deno takes with respect to permissions which allows you to strictly specify which urls your program can access, which files/directories can be read/written, etc.
quentinadam
·3 ปีที่แล้ว·discuss
Being able to allow custom behaviour via JS/TS in Rust is definitely something that I wanted to explore too. If you haven’t already you should check out these two articles from the Deno blog website which go a bit further:

https://deno.com/blog/roll-your-own-javascript-runtime

https://deno.com/blog/roll-your-own-javascript-runtime-pt2
quentinadam
·3 ปีที่แล้ว·discuss
Looks awesome! You should submit it to ProductHunt!
quentinadam
·4 ปีที่แล้ว·discuss
May I suggest the below insights to your point of view, which will allow you to have a better understanding of what is happening underneath the hood ?

USDC is issued by circle.com and the underlying assets are held on US bank accounts.

BUSD, which is Binance's USD stablecoin, is actually issued by paxos.com (see https://paxos.com/busd/) and the underlying assets are held on US bank accounts .

Binance definitely has accounts at both Circle and Paxos, that allow them to mint and redeem USDC and BUSD, by depositing or (respectively) withdrawing USD to Circle's or Paxos' bank account.

In September, Binance announced that all USDC deposits made on Binance would be converted to BUSD at 1:1 (https://www.binance.com/en/support/announcement/binance-to-a...). The move was indeed an attempt to boost the adoption of BUSD, which is the third largest stablecoin with a market cap of $19B, behind USDC which is the second largest with a market cap of $43B (see https://coinmarketcap.com/view/stablecoin/).

From a practical point of view, what Binance did was redeeming the USDC (by sending them back to Circle and withdrawing USD to it's bank account) and then subsequently minting BUSD (by wiring the USD to Paxos' bank account and receiving the corresponding amount of BUSD).

Binance also allows to "seamlessly" withdraw BUSD as USDC from it's exchange to your wallet.

Now you are starting to understand what happened today.

Following negative rumours, people started to massively withdraw BUSD as USDC from Binance. Binance fullfilled to first part of those withdrawal requests from it's hot wallets containing USDC, but past a certain amount it had no USDC left and temporarily halted withdrawals of USDC. A caveat to that is that Binance only halted withdrawals of USDC on the Ethereum and Tron chains. Withdrawal of USDC to Polygon and Avalanche for example have been running smooth all day, probably because less people choose those options, so there were still funds available on Binance's hot wallets on these chains.

Once the hot wallets were depleted of USDC on Ethereum and Tron, Binance could only continue to honor the withdrawal requests by converting the BUSD it held to USDC. That conversion requires to redeem the BUSD at Paxos, receiving USD on it's bank account, sending the USD to Circle, and receiving the corresponding amount of USDC. These steps involve regular wires between banks, hence why they could not be executed before the US banks opened.

That being said, the situation is now resolved and Binance has now re-enabled withdrawals of USDC.