Tweet fijado
dango🍡
8.3K posts

dango🍡 retuiteado

My favorite piece of code in @dango's upcoming perp DEX is how we incorporate dimensional analysis in the Rust type system.
A challenge in programming complex financial apps is sometimes you lose track of what a number mean. Does this "123.456" mean 123.456 USD or 123.456 USDC (too very different things)? If it's USDC, is it the human unit or the base unit (1e-6 USDC)?
In this code snippet, we encapsulate the three dimensions: asset quantity, dollar value, and time duration, in the Number type itself as a zero-cost abstraction. The Rust compiler ensure at compile time that a function always takes in and outputs exactly the right thing it's intended to.

English

Who said points programs can't be fun?
Not us.
dango🍡@dango
Intern snuck out some alpha 👀 No one tell @larry0x
English

Looking to add @dango in my list…👀🍡
Nemo@nopzty
My Perp DEX Farming Tier List 2026 🏆 ; Heavy weight: - @HyperliquidX - @Aster_DEX - @extendedapp Good one: - @tradexyz - @pacifica_fi - @edgeX_exchange - @OstiumLabs - @Backpack - @variational_io - @hyenatrade - @Lighter_xyz Underrate: - @hibachi_xyz - @etherealdex - @nadoHQ - @Dreamcash - @tread_fi - @DecibelTrade Indifferent: - @01Exchange - @BullpenFi - @BasedOneX - @grvt_io - @paradex What do you think? Let's discuss.👇🏻👀 มีใครฟาร์มตัวไหนอยู่บ้าง?
English

















