0x…apus (@dev_apus) header
0x…apus (@dev_apus) profile picture

A crypto developer and defi specialist. Founder of @apusindustries . Builder of @supacore_xyz and @supadaofi

Blockchain
Joined June 2018
Photo by 0x…apus (@dev_apus)Photo by 0x…apus (@dev_apus)Photo by 0x…apus (@dev_apus)Photo by 0x…apus (@dev_apus)Photo by 0x…apus (@dev_apus)Photo by 0x…apus (@dev_apus)Photo by 0x…apus (@dev_apus)Photo by 0x…apus (@dev_apus)Photo by 0x…apus (@dev_apus)Photo by 0x…apus (@dev_apus)
Offset pagination has a quiet bug. You load 20 rows. A new one arrives. Page 2 skips 20 and starts one row early, so the last row of page 1 shows up again. A cursor fixes it. Ask for "rows after this one", not "skip 20".
15
Never rename a column in one deploy. During a rollout, old and new code can run side by side on the same database. One of them will look for a column that isn't there. Add first. Switch. Remove later.
19
"14:00" without a time zone is not a time. It's a guess. Store timestamps in UTC. Convert to local time only at the edges: when someone types it in, and when someone reads it. Sorting, comparing and lining up logs all get easier when everything shares one clock.
15
is_paid, is_failed, is_refunded. Three booleans, eight combinations, most of them nonsense (paid and failed?). Use one status field and list the allowed moves: created → submitted → settled → refunded submitted → failed Reject everything else at write time.
3
39
I merged Phase 0b of SupaCore to main yesterday: a composed payment flow with rail dispatch, in the Go backend I'm building. Pre-production proof of concept, not a live system. For people building in payments and interoperability: @Mastercard @keoneHD @bgarlinghouse
1
2
55
Don't UPDATE a balance. INSERT an entry. Store each movement as an append-only entry; the balance is their sum. You get an audit trail, no lost updates from racing writes, and fixes as reversing entries. Cache the balance for speed, but don't treat the cache as the truth.
2
23
0x…apus retweeted
Unit tests check the examples you thought of. Invariant tests check a promise: something that must hold after any sequence of calls. Write the promise in one plain sentence, then let a fuzzer try to break it. If you can't state it, you don't understand the design yet.
1
4
34
Unit tests check the examples you thought of. Invariant tests check a promise: something that must hold after any sequence of calls. Write the promise in one plain sentence, then let a fuzzer try to break it. If you can't state it, you don't understand the design yet.
1
4
34
An external call hands over control. When your contract sends ETH or calls another contract, that code runs before your function finishes, and it can call you back. So finish your own bookkeeping first: check, update state, then call out.
3
41
0x…apus retweeted
"Accepted" is one of the most misread words in payments. It means a system received your instruction and agreed to process it. It does not mean value has moved. A thread on the states in between: Industry research, not a product claim. SupaCore is pre-production.
1
1
1
9
0x…apus retweeted
Two records of the same payment don't agree. Now what? Classify the break: timing, missing entry, duplicate or wrong amount. Then give it an owner and a deadline. An unassigned break only gets older. Industry research question, not a product capability claim.
1
2
12
Ship the build you tested. If production gets a new build of the same code, it runs something staging never saw. Dependencies or settings can differ, and so can the result. Build once. Promote that exact artifact. General software-scoping guidance, not a client case study.
1
1
12
Integer maths means every division rounds somewhere. The real question is who the rounding favours. In a vault or pool, round against the caller: down on what they receive, up on what they pay. ERC-4626 spells this out. Round the other way and enough tiny calls can leak value.
3
41
I'm building SupaDAO as one exchange that can run three pool types: concentrated liquidity, bins and StableSwap. The architecture is a singleton. That choice looks simpler on a diagram than it is to engineer.
1
3
41
I would rather be precise about the stage than sound further along than the work is. A testnet is a place to learn. It is not a launch.
1
5
Less duplicated infrastructure is not the same as less complexity. Shared systems need stronger boundaries, especially while the design is still being proved.
3