# Vishalsai Daswani > Founder-engineer building high-stakes systems, from trading platforms moving $1B a month to fleets of AI agents. - Site: https://vishalsaidaswani.com - Email: hello@vishalsaidaswani.com - Twitter/X: https://x.com/vsai12 - GitHub: https://github.com/vsai - LinkedIn: https://www.linkedin.com/in/vishalsaidaswani - Structured version of this content: https://vishalsaidaswani.com/site.json ## About **I build high-stakes systems, from trading platforms moving $1B a month to fleets of AI agents.** Founder-engineer in Hong Kong. $600M through Cega, a Cisco patent, 0 → 1 more than once. **Lately:** at [Agent Manager HQ](https://www.agentmanagerhq.com) I design, run and recover autonomous agent fleets, and I build with them daily. [See my work](/work/) [Get in touch](mailto:hello@vishalsaidaswani.com) ## Work ### Agent Manager HQ — Founder (Jun 2026 — Present) - URL: https://www.agentmanagerhq.com Helping medium-to-large businesses become AI-native with fleets of AI agents — always available, always within budget, always recoverable. Videos: - Demo — BUIDL Demo Day @ Google HK: https://www.youtube.com/watch?v=5bn_Vfun-a8 ### BONKbot — Senior Staff Engineer & Engineering Manager (Nov 2024 — Jun 2026) - URL: https://bonkbot.io Building a low-latency, on-chain crypto trading platform for Solana memecoins on Telegram and web. - Both led and built — owned core systems hands-on while managing the team behind the platform that drives 80% of revenue. - Owned the Telegram bot, web user API, authentication, infrastructure, the swap execution layer, and portfolio/PnL paths. - Project lead for Multiwallet v1. - Led Auth v2 — passkey authentication integrated with our proprietary signer. - Drove an observability and team-structure push that cut swap latency (p50 1.1s → 0.8s, p90 1.5s → 1.1s) and portfolio/PnL latency (p90 5.3s → 3.8s). - Also shipped referrals, internal tooling, and more. Stats: ~1.5M lifetime users; ~$1B peak monthly volume; −27% swap latency (p90) Topics: low-latency trading, observability, passkey auth, multiwallet, infra Stack: TypeScript · Node.js · Postgres · GCP · Claude Code · Codex (some exposure: ClickHouse) Writing: Planning for certainty, not speed (https://vishalsaidaswani.com/2025/11/21/planning-for-certainty-not-speed.html); Observability as a prioritization lever (https://vishalsaidaswani.com/2025/10/27/observability-as-a-prioritization-lever.html) ### Cega — Founding Engineer · First full-time hire (Aug 2022 — Nov 2024) On-chain tokenized structured option products — Fixed Coupon Notes, Dual Currency Swaps, and Shark Fin notes. - Architected and shipped the v1 EVM smart contracts. - Owned the backend operational and settlement layers. - Sole developer of all on-chain contract indexers. - Built the PnL engine for the Pendle integration — staking yields on SY tokens held in our vaults, via a sliding-window model forked from SY's on-chain yield logic. Stats: ~$600M total volume; ~$45M peak TVL; 0 → 1 built from scratch; 0 security incidents Topics: DeFi, structured products, EVM contracts, on-chain indexers Notes: Acquired by BONKbot Stack: TypeScript · Node.js · Solidity · Supabase · React (some exposure: Rust (Solana)) Writing: Attributing continuous yield across a vault lifecycle (https://vishalsaidaswani.com/2024/09/23/attributing-continuous-yield-across-a-vault-lifecycle.html) Videos: - Panel — BUIDL Vietnam 2023: https://www.youtube.com/watch?v=-2zP8ibCkvo ### MyPropty — Founder & CTO (Dec 2017 — May 2022) Property-management software for small and mid-size landlords in Hong Kong. - Founded the company and ran engineering as CTO, building the product end-to-end. - Drove sales and business development too — not just the technical side. - Still in production today, managing ~40 properties. Stats: ~$200M peak property value on platform; ~40 properties live today Topics: proptech, 0→1, sales & BD Notes: Cyberport Incubation Programme ↗ (https://www.cyberport.hk/en/about_cyberport/entrepreneurship/cyberport_incubation_programme); Still running Stack: Ruby on Rails · React · Postgres Writing: Midland Realty partnered with Carousell to create a new property listing portal. Here's why this doesn't matter to landlords. (https://vishalsaidaswani.com/2020/07/20/midland-realty-carousell-property-listing-portal.html); How to convince a technical co-founder to join your startup (https://vishalsaidaswani.com/2020/06/23/how-to-convince-a-technical-co-founder-to-join-your-startup.html) Videos: - Panel — Powering Real Estate through PropTech (HK General Chamber of Commerce): https://youtu.be/bGBHvauf_dw?t=1401 - Panel — How Technology Is Changing Real Estate (PropTech Institute & Xccelerate): https://youtu.be/FK_TdOo5X_8?t=1539 - MyPropty — Platform Preview: https://www.youtube.com/watch?v=WvxhmEismCQ - MyPropty — WhatsApp Assistant: https://www.youtube.com/shorts/5ekSMAAlxhg - The CLOUD — Technology Consultant (for Star Properties): https://www.youtube.com/watch?v=7F8-GMygQk4 - The CLOUD — TV Commercial (for Star Properties): https://www.youtube.com/watch?v=l5symo3xkcU ### Cisco Meraki — Security Appliance Team (Aug 2014 — Jan 2017) On the MX security-appliance team, part of Meraki's cloud-managed networking platform — devices that phone home to a central dashboard for configuration, monitoring, and firmware, instead of being managed box by box. - Co-invented and built an uplink-monitoring system — a sliding-window monitor that let MX owners catch uplink latency and connectivity issues from the cloud dashboard. - Spanned the stack: C++ components on the device, a Rails backend, a React frontend, and Scala collectors polling connection data from fleets of deployed appliances. - Also worked across firewall configuration and other app-level features. Topics: cloud-managed infra, firewall, uplink monitoring, networking Notes: Patent WO2016182772A1 ↗ (https://patents.google.com/patent/WO2016182772A1/es) Stack: Ruby on Rails · React · Postgres (some exposure: C++ · Scala) ## Projects ### Digital mailroom for an accounting firm (Workflow) - URL: https://vishalsaidaswani.com/projects/digital-mailroom/ - Tags: Document AI, OCR, Accounting Paperwork arrives, gets classified, read and filed under the right client automatically. Outcomes: - < 5 min from arrival to filed - < 1% documents misfiled - ~6 min saved per document - ~30 hrs saved per week at 300 documents Every business that sends its books to an accountant also sends a stream of paperwork. This pipeline reads each document, works out what it is, pulls out the numbers and files it under the right client. #### How it works 1. **Arrives.** A document lands in the shared inbox, as a scan, photo or email attachment. 2. **Classify.** The system decides what kind of document it is, such as an invoice, receipt, bank statement, loan document or government letter. 3. **Read (OCR).** Optical character recognition turns the picture into text and pulls out the key fields, such as supplier, date and amount. 4. **File.** The document is routed to the right client's folder, ready for the books. #### Human in the loop When the system is not confident about a document, such as a blurry photo or an unfamiliar layout, it flags it and a person checks the type and fields before it is filed. Most documents skip this step. #### Document types Sales invoices, purchase invoices, receipts, bank statements, bank letters, loan information and government letters. The companies and documents shown in the animation are made-up samples. ### File cleanup and index for an accounting firm (One-time project) - URL: https://vishalsaidaswani.com/projects/file-cleanup/ - Tags: Document AI, File organisation, Search index A one-time project that re-files years of client documents, fixes file names and builds a searchable index for staff and AI agents. Outcomes: - 332 client folders reorganised - ~95% files filed automatically - 1 naming scheme date, type, party, amount - Seconds to find any document An accounting firm's server holds years of files for hundreds of clients: invoices, receipts, bank statements and letters, saved under names like `scan0012.pdf` in folders that grew without a plan. This one-off project cleans it up. #### How it works 1. **Your files.** This is the shared drive today. Some folders are already organised by client and some are not. Nothing is changed yet. 2. **Identify.** Each file is opened to work out what it is, which client it belongs to and its date, whether or not it sits in the right folder. 3. **Propose and approve.** Each file gets a clean name and the right folder, with a preview so a person can approve it. Files already in the right place are left alone. 4. **Refile.** Approved files are moved and renamed. A log of every move is kept. 5. **Index.** An index is built so staff and AI agents can find a document by client, type, year or amount in seconds. #### What the firm gets - Every file in a consistent client, year and type folder, with a clear name. Files already in the right place are left alone. - A person approves each proposed move with a preview of the document. A log of every move is kept. - A searchable index, so people and AI agents can find documents by client, type, year or amount. #### Keeping it tidy The cleanup is a one-time fix. To keep new documents organised from day one, pair it with the [digital mailroom](/projects/digital-mailroom/). ## Consulting I work with a small number of founders and teams who want senior help turning strategy into shipped product — especially in crypto, trading systems, and applied AI. Below are a few ways to work together. ### Advisory A focused, senior read on the decision in front of you. - **Fractional CTO Advisory Call** — $280 · 60 minutes: One hour on whatever's blocking you — architecture, hiring, fundraising, a stuck technical call. You bring the problem, we work it live. You leave with a decision, an action plan, and expected KPIs. Book: https://buy.stripe.com/9B64gyahC6s63vb5NW3wQ02 ### Practical AI Get AI working in your business — from a hands-on team session to a built system. - **AI Workflow Lab** — $998 · 3 hours: Three hours, hands-on, with your team. We pick one real process from your business and build the AI workflow for it together, live, on your own stack. Outcome: your team leaves able to build the next one themselves — no dependency on me. Book: https://buy.stripe.com/dRm14m3TeaIm5Djeks3wQ00 - **AI Workflow Engine** — $1,490 · fixed scope: I scope one real process in your business and build the production AI workflow for it myself, end to end. Handed over running, with prompts and tooling documented so your team can operate and extend it. Book: https://buy.stripe.com/bJe5kCgG0dUyghX4JS3wQ01 ### Long-term Deeper engagements — a full review, or an ongoing hand on the technical tiller. - **Technical Due Diligence** — Custom · ~1 week: I review the codebase, architecture, and how the team actually ships — firsthand, over about a week. You get a clear, decision-ready report: what's solid, what's not, and what it means for your call. Enquire: mailto:hello@vishalsaidaswani.com - **Fractional CTO**: I plug in as your CTO — setting technical direction, unblocking the build, reviewing what ships. Ongoing, week over week, not a one-off project. You get a senior technical partner without a full-time hire. Enquire: mailto:hello@vishalsaidaswani.com ## Recommends ### Books - Shoe Dog, Phil Knight - Zero to One, Peter Thiel - Delivering Happiness, Tony Hsieh - Blitzscaling, Reid Hoffman & Chris Yeh - Losing My Virginity, Richard Branson - The Last Lecture, Randy Pausch - That Will Never Work, Marc Randolph - Hidden Potential, Adam Grant - The Psychology of Money, Morgan Housel - Same as Ever, Morgan Housel - Atomic Habits, James Clear - Effortless, Greg McKeown - Never Split the Difference, Chris Voss - Indistractable, Nir Eyal ## Writing ### Planning for certainty, not speed - URL: https://vishalsaidaswani.com/2025/11/21/planning-for-certainty-not-speed.html - Date: 2025-11-21 - Company: bonkbot BONKbot was remote-first. Everyone worked from a different city, in a different timezone, with different experience and different context on the codebase. In my first 8 months, no project landed within a month of its scheduled date. Plans were thin. Priorities shifted weekly with each new urgent bug. Everyone optimized for finishing as fast as possible, but nothing had a structure around it. Then two large launches were scheduled around the same time. I was assigned tech lead and project manager for both. #### Speed as a byproduct Remote work is hard. Every handoff costs context. Asking for help means booking a call "within the next 8 hours." Nobody can lean over for a quick update. When someone is pulled onto another project, their work disappears into a Slack thread, invisible to the team. They lose the thread, and so does whoever picks it up. That changes what planning is for. The goal is certainty: a date we trust and everyone on the same page. Speed follows from that. When everyone knows the plan, the risks, and where they can help, handoffs shrink and context switches drop. > Slow is smooth, and smooth is fast. #### The two projects | | Project 1 | Project 2 | |---|---|---| | Stakeholders | CTO, CPO | CTO, CEO, senior security advisor, UI team lead | | People | 6-8 engineers | Me, plus the stakeholders above | | Shape | Wide, many engineers | Extremely complex, scope changed several times | The first needed coordination across many engineers. The second needed careful decisions across a small group with a lot of authority. Both used the same planning process, written as a Google Doc per project. I ran both at once, so each got part of my week. The whole effort took about 4 weeks end to end, and 80-90% of the work happened in the last 2. #### The process ![Planning loop: user journeys and code changes, then a day estimate and certainty score, then risks, then mitigations, looping back to re-score until each journey reaches 3-4. Schedule risks feed into the risks step. The output is the parallel work, blockers and headcount needs.](/assets/diagrams/planning-loop.png) The examples below follow one illustrative journey. It is not from a real project. ##### 1. User journeys and code changes We broke each project into the user journeys it had to support. Then we broke each journey into the actual code changes: a migration, model changes, new controller endpoints for create, read and update, and so on. Each change became a line item someone could own. ``` Journey: User exports their transaction history Code changes: - migration: add table for exports - model: create the export model - controller: new endpoint for export - content generation script ``` ##### 2. An estimate and a certainty score Each journey gets an estimate in days, with a +/- range, and a certainty score from 1 to 5. - **1:** low confidence. - **5:** guaranteed to finish in that window. The range tracks the score. Uncertain work gets a wide range. Certain work gets a narrow one. Days beat calendar dates. When one date slips, every date after it has to be rearranged. A day count only has to be re-added. The score is the owner's honest read, not a target. ``` Estimate: 6 days +/- 4 Certainty: 2 ``` ##### 3. Risks Every score has to be justified with risks, in three groups: - **Feature unknowns.** Parts of the build nobody has done before. - **Codebase unknowns.** How the feature behaves with other services. - **Latency and UX.** Problems that could surface only under real use. A 5 usually has no risks listed. A 1 usually has many. We wrote all of them down, as exhaustively as we could. ``` Risks: - Feature: unsure the generation script handles accounts with large histories - Latency/UX: unsure how the endpoint behaves when an export takes long ``` ##### 4. Mitigations Each risk gets a way to shrink it: - Talk to someone on the team who knows the area. - Build a prototype, or spike a smaller version of the feature. - Talk to users, read logs, or set up telemetry. Then I re-scored. The aim was to move every journey toward a 3 or 4 by retiring its biggest risks first. ``` Risk: generation script on large histories Mitigation: spike it against a copy of a large account Risk: long-running export from the endpoint Mitigation: ask the teammate who owns background jobs Re-scored: 6 days +/- 2, certainty 4 ``` ##### 5. Risks outside the code The plan also listed risks to the schedule that no engineer controls: - On-call incidents taking time from the feature. - A mid-project switch to another priority. - Team members pulled onto other work, with the context-switching that follows. Each one was written down with its expected effect on the date. | Risk | Expected effect | What we need | |------|-----------------|--------------| | On-call load | Up to 2 days lost in a bad week | On-call rotated off the owner during the build | | Priority switch | Restart cost of 3 days | A heads-up before any switch, so we can re-plan | ##### 6. Parallel work and blockers With the journeys, estimates and dependencies on paper, the parallel work separates from the sequential work. The blockers become visible too. If the timeline looked too long, the doc showed exactly why, and exactly what more engineering resources would change. Asking for headcount became an argument from the plan, not a request. #### Why document the outside risks Decision makers shape timelines through choices like a re-prioritization or an unplanned pull onto another project. Those choices are reasonable on their own. The cost only shows up when it's written next to the schedule. The doc made that cost explicit before it happened. Everyone had agreed on the priorities and on what the plan needed from each of them. When something changed mid-project, we could point at the doc and discuss the trade-off with the numbers in front of us. It also changed how resourcing worked: - **Faster staffing.** Each part of the spec was clearly scoped. When a part needed more hands, I pointed at that section and people joined immediately. - **Engineers raised concerns in the doc.** Risks and certainty scores gave them a place to flag problems early. - **Senior managers resourced against those concerns.** Both groups worked from the same page. The doc works as a tool for getting the resources the team needs. Management can still push back. If the estimates look too long and scope can't shrink, a shorter range goes into the doc as a higher-risk option, with the risk written down. Used this way, the doc is a tool for the team, not a way to hold the team accountable. #### Template This is the layout of the Google Doc. Copy it per project and fill in one row per journey. > **Project: \** > > **Goal** > One sentence: what ships and who it's for. > > **Launch expectations** > What we expect to measure and see after launch. > > **Journeys** > > | Journey | Code changes | Estimate (days +/-) | Certainty (1-5) | Owner | > |---------|--------------|---------------------|-----------------|-------| > | | | | | | > > **Risks and mitigations** (one table per journey) > > | Risk | Type | Mitigation | Certainty after | > |------|------|------------|-----------------| > | | Feature / codebase / latency and UX | Ask, spike, read logs, add telemetry | | > > **Schedule risks** > > | Risk | Expected effect | What we need | > |------|-----------------|--------------| > | On-call load | | | > | Priority switch | | | > | Team pulled to other work | | | > > **Parallel work and blockers** > > | Can run in parallel | Sequential | Blocked on | > |---------------------|------------|------------| > | | | | > > **Resourcing** > What changes in the date if we add engineers, and where. #### Results | Project | Outcome | |---------|---------| | Project 1 | Shipped on time, 3 weeks after the final spec | | Project 2 | Shipped within 1.5 weeks of the final spec'd plan | Against a baseline where no project landed within a month of its date, both landed close. Project 2 is the one I'm prouder of. Scope changed several times, the last only 3 days before the original timeline. Each change went into the doc, and the plan showed what it did to the schedule. #### The takeaway The hard part of project planning is the thinking before the build. Getting every risk, dependency and outside pressure onto one page takes effort, and that effort is what produces certainty. A team that knows the plan can hand work off, absorb a change and ask for help without losing days. That is where the speed comes from. ### Observability as a prioritization lever - URL: https://vishalsaidaswani.com/2025/10/27/observability-as-a-prioritization-lever.html - Date: 2025-10-27 - Company: bonkbot BONKbot is a trading bot for low-market-cap Solana tokens, better known as memecoins. Every trade is a swap, one token for another, executed on-chain as a single transaction. These tokens move fast. A price can drop 90% in seconds. So the latency between a user clicking buy and the transaction landing decides how close their fill is to the price we quoted. Slower means a worse fill, or a missed entry. Speed is the product. A faster bot gives better fills, and users notice. So when swap latency climbed, we set out to bring it down. #### The proposals We talked it through as a team, and everyone converged on the same stage: transaction submission, where a signed transaction leaves our infrastructure for the chain. The question they wanted to answer was how to get RPCs to land our transactions on-chain faster. - **Submit to multiple endpoints in parallel.** Send the transaction to [Jito](https://www.jito.network/) and a second RPC provider at once and take whichever lands first, hedging against a slow or congested path. - **Raise the default priority fee.** Solana orders pending transactions partly by the priority fee attached to them, so a higher fee buys earlier inclusion. - **Shrink the transaction body.** A smaller serialized transaction moves through an RPC faster. This is the most involved option: every change to the transaction layout means re-validating it against every DEX we route through, to keep the transaction valid everywhere. I wasn't convinced. Each of these would help, but no one could say by how much, or rank them against each other. They all rested on the same unproven assumption, that submission was where the latency piled up. It didn't feel like the real bottleneck to me, but I had no more data than anyone else, so my doubts didn't carry. We were about to commit the team on a hunch. #### Measuring where the time goes To move the conversation, I needed evidence that we were aiming at the wrong stage. So I audited the whole pipeline, from the user's tap to on-chain confirmation, and timed every step: | # | Stage | What happens | |---|-------|--------------| | 1 | Button tapped | The user taps buy in the app | | 2 | Request received | The swap request reaches our backend | | 3 | Route built | The route builder returns the optimal route for the trade | | 4 | Transaction signed | The key-gen and signing service signs the transaction ([how our key management works](https://bonkbot.io/blog/a-hardware-wallet-in-the-cloud-introducing-bonkbot-s-next-gen-key-management-system)) | | 5 | Submitted | The RPC accepts the transaction for submission | | 6 | Processed | The RPC reports the transaction processed (included in a block) | | 7 | Confirmed | The RPC reports the transaction confirmed by the cluster | Our existing setup had two blind spots. First, Grafana tracked a single number end to end, request received to confirmed. It told us the swap was slow, but not which stage was responsible. I added a graph for every hop in between, so each stage carried its own latency. Second, those graphs only showed aggregates, and aggregates hide outliers. One very slow swap barely shifts an average, so the worst cases disappeared into the mean with nothing obvious to act on. To catch them, I logged each stage's timing to a Postgres table, queryable down to a single swap, or a single user. Between the per-stage graphs and the per-swap records, we could finally see where the time went, and for whom. #### What the data changed The measurements contradicted what the proposals assumed. Submission wasn't the dominant cost. The largest and cheapest wins sat in the earlier stages and in how transactions moved between services. That reordered the work: the submission ideas dropped down the list, and three changes no one had proposed moved to the top. ##### Signer transport: HTTPS to NATS Calls to the signing service ran over HTTPS, opening a new request each time. That per-request overhead made the calls spiky, and the tail dominated the signing stage. Moving the communication to [NATS](https://nats.io/), which holds a persistent connection instead of negotiating a new request per call, cut the variance sharply and brought the p90 baseline down roughly **20%**. It was the highest-impact change, and it had nothing to do with submission. ##### Act on processed, repair on confirmed On Solana, a transaction reaches *processed* once it lands in a block, and *confirmed* slightly later, after the cluster votes on it. We were waiting for the confirmed event before treating a swap as complete. The data showed that the large majority of processed transactions go on to confirm, so we started treating processed as the completion signal and acting on it immediately, with a repair mechanism on the confirmed event to handle the minority that don't. That cut the confirmation wait out of the perceived completion time, around **60–120ms**. ##### Fewer network hops The route builder already holds an open websocket to the RPC, but transactions detoured through another service before reaching it. We let the route builder submit directly, to the signing service and then to the RPC over that open connection. Another **60–90ms** gone. #### Results | Change | Effect | |--------|--------| | Signer transport HTTPS → NATS | p90 baseline down ~20%, much lower variance | | Act on processed, repair on confirmed | ~60–120ms off perceived completion time | | Direct submission, fewer hops | ~60–90ms off the path | None of these were the optimizations the team came in wanting to build. The instrumentation moved them to the top of the list. And because we'd measured the gains instead of debating them, the team aligned on the order of work quickly. #### Prioritizing what's next With the pipeline instrumented, we make the next decision from data rather than intuition. The route builder runs multi-region; pointing the frontend straight at it would cut real network latency for distant users and drop another inter-service hop on the way in. We can estimate that payoff now, before building it, and weigh it against the submission optimizations still on the list. #### The takeaway The hard part of this work wasn't the engineering. Each of these changes was straightforward to build. The hard part was being sure we were building the right ones, in the right order. That's what the instrumentation gave us. It didn't make anything faster on its own. It showed where the time actually went, replaced competing hunches with a ranked list, and kept us from pouring effort into the stage we'd only assumed was slow. The metrics were cheap to add. Knowing we were working on the right thing was the real return. ### Attributing continuous yield across a vault lifecycle - URL: https://vishalsaidaswani.com/2024/09/23/attributing-continuous-yield-across-a-vault-lifecycle.html - Date: 2024-09-23 - Company: cega Cega builds structured-products vaults. Each vault tokenizes an options product. Banks sell these off-chain as private notes: Fixed Coupon Notes, Dual Currency Swaps, Shark-Fin Notes. They're real-world assets, the same products traded in traditional markets. A user deposits. Their principal backs an options trade run by a market maker. At settlement they collect a coupon. If the trade goes against them, they get a converted payoff instead. We wanted deposits to work harder. So we let users deposit [Pendle](https://www.pendle.finance/) Yield Tokens. Pendle splits a yield-bearing token in two. One part is a principal token, which you redeem at maturity. The other is a **yield token (YT)**, which earns the underlying yield until then. Hold the YT and you collect that yield, block by block. You claim it from Pendle. ![How Pendle splits a yield-bearing token into a principal token (PT) and a yield token (YT). PT accretes to par by maturity; the YT streams the yield and expires worthless.](/assets/diagrams/pendle-split.png) *See Pendle's [yield-tokenization basics](https://docs.pendle.finance/pendle-academy/pendle-101/chapter-2-yield-tokenization-basics) for the details.* The YT's underlying was weETH, [Ether.fi](https://www.ether.fi/)'s staked-ETH token. Holding weETH exposure earns Ether.fi loyalty points. So one YT deposit earned two rewards at once: Pendle's yield and Ether.fi's points. Both rewards reduced to one problem: the YTs sat pooled in Cega's treasury, not attributable to any one depositor. The yield accrued as one balance. To Ether.fi, the treasury looked like one big holder of weETH. But the rewards belonged to the depositors underneath. We had to split both back to them, per user. This is the engine we built to do that. #### Why this was hard Three things made this hard. **Rewards are earned continuously, but paid out only at discrete moments.** The YT earns yield every block. But nothing lands until someone claims. Between claims, value builds up with no transaction to mark it. A user earned an exact amount between Tuesday and Thursday, but no on-chain event records it. Points work the same way: earned continuously, credited on Ether.fi's own schedule. **The treasury pooled every vault's YT, each vault at a different lifecycle stage.** A single balance held deposits from all of them. Each vault ran its own lifecycle: deposits queue, funds lock when the trade goes live, they settle when it ends. Entitlement to the yield shifted with the stage. While a trade is live, the yield belongs to the vault, not to any one depositor, until settlement tells us who kept their principal. So the whole treasury had to be normalized across every vault at once, not read one vault at a time. ![The vault lifecycle. Yield accrues to the held token the entire way through, but who is entitled to it shifts as funds move from queue to locked to settled.](/assets/diagrams/lifecycle.png) Pendle sees only the token. As long as the YT sits in a Cega address, it keeps accruing. **The claim, and its timing, belonged to the user.** A claim pulls the pooled yield into Cega's treasury, with nothing on-chain to say whose it is. Points are Ether.fi's to grant; it accrues them off the balances we report. Someone can deposit, withdraw, or take their share at any block. By then we already have to know what they're owed. A redemption is also all-or-nothing. Pendle redeems for whoever holds the YT. That's the whole pooled treasury. To pay one user, we redeem the lot, hand them their share, and leave the rest. Split that against the wrong ownership and the yield lands in the wrong hands. So at any block, for any user, we have to reconstruct what they're owed from on-chain state alone: > For any span of blocks, which users were entitled to the yield that accrued? During that > span, some were queued, some were locked in a live trade, some had asked to withdraw, and > a trade may have settled partway through. Everything below answers that. #### Measuring yield without claiming it Splitting yield between users needs the amount that accrued in each window. No contract exposes that number. The only way to read it is to run the redemption. One option is to claim. Pendle's redeem function pays the accrued yield into the treasury, and the balance change is the amount. But claiming every few hours just to measure costs gas, and changes real state on mainnet. Instead, we measured on a copy. At each measurement point, we **forked mainnet at that exact block**. We ran the claim on the fork and compared the treasury balance before and after. The number is exact, and mainnet never moves. ``` measure_accrued_at(block N): fork = fork_mainnet_at(N) # ephemeral copy of the chain before = fork.treasury_balance() fork.simulate(redeem_yield()) # claim runs on the fork only after = fork.treasury_balance() discard(fork) return after - before # accrued, unclaimed, as of N ``` ![Measuring accrued yield on a fork. Read the balance, simulate the claim on the forked chain only, read the balance again. The difference is the yield accrued but not yet claimed as of that block. Then throw the fork away.](/assets/diagrams/fork.png) This number is a running total: how much sits unclaimed at that block. To get a period's amount, difference two snapshots and add back anything claimed between them. #### Slicing time into windows To measure each period, we slide a fixed-size window across the chain. Each window covers about eight hours. We process them in order, catching up to the chain head. For one window, the yield that accrued comes from three quantities: ``` accrued during window = claimed during # real claims that landed inside the window + balance at end # simulated on a fork at the end block - balance at start # the previous window's end, reused ``` ![The accrual identity for one window: the pool balance at the end, plus what was claimed during the window, minus the balance at the start, equals what accrued during the window.](/assets/diagrams/accrual.png) The claimed-during term keeps the count honest. Without it, a window with a claim would look like almost nothing accrued, and everyone in it would be under-credited. Say the pool holds 100 when the window opens. Another 30 accrues during the window. Midway, someone claims 50. Now the fork at the end reads `100 + 30 − 50 = 80`. End minus start is `80 − 100 = −20`. Nonsense: the 50 wasn't lost, it was real yield, already collected. Add it back, `80 + 50 − 100 = 30`, and you get the true accrual. Two details keep this cheap. We reuse the previous window's *balance at end* as the next window's *balance at start*, so windows tile with no gap and no double-count. And *claimed during* comes straight from the on-chain claim events, indexed by block. One fork per window, and the arithmetic closes. #### Who held the exposure? The second input is ownership: each address's share of the exposure at the window's edge, held fixed across the window. Windows are short, hours not days, so a user who joins mid-window rounds to the nearest edge and the error stays small. The snapshot comes from a few buckets, because "holding the exposure" means different things at different points in the lifecycle. | Bucket | Who it credits | Why | |--------|----------------|-----| | **Queue** | the depositor | Funds in the deposit queue belong to whoever deposited them. | | **In-vault** | each user, by share | Inside a live vault, a user's exposure is their share of the vault's holdings. | | **Locked** | the vault itself | While a trade is live, we park the vault's exposure at the vault and redistribute it on settlement. | | **Excess** | a reconciliation address | Anything the treasury holds beyond what users account for. Swept aside so we never misassign it. | A vault's status (open, auctioned, locked, settled, converted) decides how much exposure it holds, and whether the locked bucket parks at the vault or flows back to users. We sum the buckets, then split the window's accrual across addresses in proportion to their exposure: ``` user's cut = window accrual × ( user's tokens / reconciled total ) ``` The reconciled total is every bucket summed: Queue, In-vault, Locked, and Excess. It equals the treasury's actual YT balance. A guard sits around that total. The buckets must sum to the treasury's *actual* yield-token balance. If the treasury holds more than users account for, the surplus goes to a capture address. If it holds less, that's impossible, so the run fails loudly. ##### Settling up At settlement, the parked yield is distributed by trade outcome. If users kept their principal, it splits among them by shares held. If the trade converted (the downside hit, the market maker took the principal), the market maker earned the yield too, and the whole parked amount goes to it. Shares are counted as of the window's start, not its end. By settlement, some users may have withdrawn, which would skew the split. The start captures who actually held the position while it was locked. We add each window's result to a running per-user ledger. Users claim on their own schedule, so this ledger is what makes payouts work. It always reflects what each person is owed. When someone claims, we subtract what they've already taken and settle the rest. Persisting it also lets the job restart after a crash without double-counting. #### One engine, two consumers The points feed reuses the same engine. Attributing Ether.fi's points needs what the yield engine already produces: each depositor's exposure, computed individually rather than as a pooled total. Only one thing changes: a flag that governs what happens to locked funds. ![One ownership engine, two consumers. The same per-user exposure model feeds both, switched by one flag: locked funds either park at the vault for later redistribution, or credit straight to the user.](/assets/diagrams/two-consumers.png) For yield, the flag parks locked funds at the vault and redistributes on settlement. We don't yet know who will own that yield until the trade resolves. For points, it credits locked funds straight to the user. Points have no lock and no discrete claim to reconcile. Ether.fi accrues points off whatever balance you hold, so there's nothing to park. That one flag changes everything downstream: - **No fork.** Points accrue on a balance, not a redeemable amount. - **No sliding window.** We ask what each user holds at a block, not what accrued over a range. - **No ledger.** It's recomputed on demand, not accumulated. The yield path is a daily job that walks windows and persists a ledger. The points path is a stateless endpoint that answers a point-in-time query. #### How it runs Three pieces carry this in production. A **subgraph** indexes the chain: deposits, withdrawals, vault locks and settlements, and Pendle claim events. Any block's ownership and claims become queryable, with no re-scan. A **cron job** runs the yield path on a daily schedule. Each run splits the day into ~8-hour windows. That's short enough to catch the yield changes as they're earned. For every window, it pulls ownership and claims from the subgraph, forks mainnet at the boundary to measure accrual, attributes the yield per user, and appends that window's result to a persisted **ledger**. Two **endpoints** serve the output. One reads the ledger and tells the claim flow what each user is owed. The other is the points endpoint. It computes each user's exposure on demand, straight from the subgraph, and hands it to Ether.fi. ![The production wiring. A subgraph indexes on-chain events. A daily cron job reads the subgraph and forks mainnet to measure accrual, attributes yield per user, and writes a persisted ledger that a yield endpoint serves to the claim flow. A separate points endpoint computes exposure on demand from the subgraph and serves Ether.fi.](/assets/diagrams/infra.png) Yield needs history, so it runs on a schedule and builds a ledger. Points need only a snapshot, so they read live and store nothing. #### Key learnings The hard part was never the code. It was the many moving pieces: - **Non-linear accrual.** Yield lands unevenly, block to block. - **A shared pool.** Every vault and user accrues into one balance, each vault at a different lifecycle stage, each user with a different balance. - **Claims at any time.** Users can claim at any block, offsetting the balances we track. - **Claims we don't see.** They land outside our system, on Pendle and Ether.fi. - **No ground truth.** Nothing to test against, so no way to directly verify a result. The last one had no clean fix. With no source of truth, the only check was to build each part carefully and audit real balances against the on-chain totals, again and again, until the numbers held. The rest came down to one reduction. Break each concern into its own problem, then solve a single window exactly: how much yield accrued, and who held it. Chain the windows so each starts where the last ended. Get one window right, get the seam right, and the whole timeline follows by induction. ### Midland Realty partnered with Carousell to create a new property listing portal. Here's why this doesn't matter to landlords. - URL: https://vishalsaidaswani.com/2020/07/20/midland-realty-carousell-property-listing-portal.html - Date: 2020-07-20 - Company: mypropty ![A Hong Kong shopfront shutter covered in property agent advertisement flyers.](/assets/img/carousell-midland-cover.jpg) A month ago, news came out that [Carousell launched a property platform in partnership Midland Realty](https://www.forbes.com/sites/rubyleung/2020/05/25/singaporean-mobile-marketplace-carousell-launches-hong-kong-property-platform/#53ea8487fa33), one of the biggest brokerages in Hong Kong. I was shocked. Two giants with lots and lots of $$$ combining forces? Would this finally revolutionize the brokerage market in Hong Kong? Would this squeeze out many other PropTech players in the market? It won't. (Or at least I don't think it will...I've been wrong before.) But here's my logic for it: #### Competitive Landscape: [Carousell](https://hk.carousell.com/) is a listing portal. [28Hse](https://www.28hse.com/) is a listing portal. [Spacious](https://www.spacious.hk/en/hong-kong) is a listing portal. [Squarefoot](https://www.squarefoot.com.hk/en/) is a listing portal. [House730](https://www.house730.com/en-us/) is a listing portal. [Property.hk](https://property.hk/eng/) is a listing portal. [CNP](https://cnp.hk/eng/) is a listing portal. [EPRC](http://eprc.com.hk/index.htm) is a listing portal. [SmartME](https://www.smartme.com.hk/) is a listing portal. [Midland Realty](https://www.midland.com.hk/) has a website full of listings. [Centaline](https://hk.centanet.com/info/en/index) has a website full of listings. Almost every other agency has a website full of listings. Listing portals have been around for years and there is an overwhelming number of listings available online. Yet no single player has been able to dominate the market and be the go-to listing portal for all properties in Hong Kong. In addition, older portals haven't developed a strong competitive advantage over newer portals, making it easy for newer entrants, such as [House730](https://www.house730.com/en-us/) and [SmartME](https://www.smartme.com.hk/), to capture part of the market with only a sizeable advertising budget. On [Carousell](https://hk.carousell.com/), the main differences between real estate listings and other listings are: - higher transaction price - requires an offline component of visiting the flat - listings are less standardized and more complex (different buildings, different views, different furniture, etc.) and require more market knowledge Most people don't transact real estate regularly. And when they do, it's a significant enough decision that will activate them to visit a dedicated listing site, where they can see other market transactions and analysis too. [Spacious](https://www.spacious.hk/en/hong-kong) does a good job here, showing how the listing compares to others in the market on price. The biggest advantage of using Carousell is that users are already active on the app. This lowers the acquisition cost of new customers and potentially helps the listing reach more viewers. However, similar to previous listing sites, this does not change the fundamentals of why many individual landlords don't regularly use listing portals to directly advertise their properties anyways. #### Mindset & Nature of landlords: 1. **RISK:** Listing portals are riskier. Landlords are required to pay a fixed "advertising" fee with no guarantee of a tenant. Additionally, ads typically expire after 1-3 months, however, properties can stay vacant for longer, especially nowadays, making it feel like a potential waste of money. Property agents mitigate that risk as landlords only have to pay once an agent closes a deal. 2. **TIME > MONEY:** It's easier and faster to Whatsapp message several agents you've known for years than to create a listing in a system. Landlords need to do a lot more work when advertising their unit, such as organizing property details and sqft areas, taking photos of the unit, and arranging site visits. Outsourcing all this to a property agent makes everything much easier. 3. **AGE:** In Hong Kong, many landlords are older (over 55). They're comfortable with tools they use every day such as Whatsapp. They are not comfortable learning new tools constantly, especially if they only need to find a new tenant every 2-4+ years. 4. **SALES vs ADVERTISING:** Sales is an active process. Advertising is a passive one. Outward sales are much more effective in the short-term whereas advertising helps build brand awareness over the long-term. Landlords prefer to take an active approach, having agents push their property over others, instead of a wait-and-see approach. Every day their property is vacant counts. ![Bar chart showing the percentage of listings by agency versus by owner on Squarefoot, 28Hse, Spacious, and House730 — agency-posted listings dominate on every platform.](/assets/img/carousell-midland-listing-ratio.png) There are several listing portals in Hong Kong. But most are being used by property agents looking to advertise their listings. We looked at some of these listing sites to find the ratio of posts by agents vs landlords, and here are some results. (Note: this summary data was extracted on a random subset of the data available on these property listing sites) None have really been able to successfully crack the landlord market. So we're still going to need property agents for a long time to come. --- **Who am I?** I'm CEO & Founder of [MyPropty](https://www.mypropty.com), a platform helping landlords and property managers improve their portfolio returns by digitizing and automating their property management. We work with mid-sized professional landlords to help them manage their real estate portfolios with data and technology. ### How to convince a technical co-founder to join your startup - URL: https://vishalsaidaswani.com/2020/06/23/how-to-convince-a-technical-co-founder-to-join-your-startup.html - Date: 2020-06-23 - Company: mypropty ![Early MyPropty product mockups: paper wireframe sketches on a desk, hand-drawn phone screens, and screenshots of the resulting web app.](/assets/img/technical-cofounder-mockups.png) Have an amazing idea for a new technology startup? Ready to build "the next Uber or Airbnb"? Or even just have a simple new idea that you need a "tech guy" to work on? Here are a few tips on getting started. First, understand the talent market landscape in Hong Kong and what you're up against. Hong Kong is known for entrepreneurs constantly starting new businesses. But we have a shortage of good tech talent, most of whom work at large banks or well-funded companies. Finding the right person is tough. Convincing them to join you is tougher. So who am I? - I run a PropTech startup called [MyPropty](https://www.mypropty.com) - We help landlords and property managers save time and money by digitizing and streamlining their property management processes - I'm also part of an organization promoting Property Technology in HK - I'm technical, I love building cool products - A few startup founders have offered me roles - some were convincing, some were not Some of the founders I've spoken with were more convincing than others, and if I wasn't already working on MyPropty, I may be working with them right now. Here are some examples of how to increase your chances of closing your tech co-founder. Break down your pitch into two sections: 1. Your idea; AND 2. That you are a great person to work with And make sure to appeal to our logic and reasoning instead of making illogical emotional statements. #### 1. Idea When pitching your idea, make it seem like more than something you just thought of in the shower this morning. Do some personal validation of your idea and share your results with them. Ideas are cheap. Your ability to execute is key. **DON'T:** I have this amazing idea that will completely change the F&B industry. **DO:** In the F&B industry, restaurants on average employ 10 staff, with an average salary of $10,000. There are 50,000 restaurants in Hong Kong. 20% of this work can be automated. **EVEN BETTER (1):** I have spoken to 20 restaurants and here's a summary of my conversations with them. **EVEN BETTER (2):** I have built a website on Wix / Squarespace / Wordpress, and 2 restaurants have signed up. **EVEN BETTER (3):** I have 2 people that own restaurants that have each paid a $1000 deposit. Here's another business example: **DON'T:** I want to build "Rent the runway for Watches in Hong Kong" and it will change the luxury watch industry here. **DO:** The average cost of a high-grade men's watch in Hong Kong is $50,000. In Hong Kong, people attend on average 4 social events a month. **EVEN BETTER:** I have already rented my own watch for $1,000/night 3 times to a few of my friends over the last month. 99% of technical people will not be able to execute your business idea (or simply won't want to). Being open and transparent with them will allow you to receive some critical feedback, and might convince them to join you and help you execute it. Showing them that you can deliver results, regardless of how small, will go a long way. #### 2. Team Be a nice person to work with. This seems obvious, but most people don't seem to understand how difficult it is for us to understand a completely new industry. On top of that, building a product for an industry that we're clueless about? Out of the question. Help, guide, and discuss with your technical partner regularly. Being a team player early on will give you huge benefits in the long term. Large corporations have multiple teams: - Business Development / Sales - Product Management - Engineering Product management coordinates between BD/Sales & Engineering. At an early stage, your "Engineering" team doesn't have any clue about business requirements or even the market norms. You'll have to do a lot of handholding in the beginning. But if you're lucky to find a good tech lead, they'll quickly understand it and be able to take over that role. **DON'T:** I just need a tech guy to implement my idea **DO:** We will need a login page with Facebook & Google login, we will need a page like <<Screenshot of Craigslist/Carousell listing page>>, and a report like <<Screenshot of Google Analytics>>. What do you think? Would that work? **EVEN BETTER:** Here are some mock-ups/visuals I've made on what I think the user journey should look like. Could you take a look and let me know what you think? When I started MyPropty, I used hand drawings on pieces of paper, random shapes in Powerpoint or Keynote, and [Balsamiq](https://www.balsamiq.com/) for my mock-ups to visualize and understand the solution better. One business founder told me he used Excel and colored in different cells to convey his vision. If you can't figure out a way to create the first version of your designs, stop trying to build a tech product. Show them that you're ready to work with them, not that you just need them to finish their tasks. **DON'T:** Once you finish the product/feature X & Y, I'll go and get people to sign up. **DO:** Can you give me 5 non-functional screenshots so that I can try to get some pre-sign ups to the platform? **EVEN BETTER:** I made a landing page on [Wix](https://www.wix.com)/[Squarespace](https://www.squarespace.com)/[Wordpress](https://www.wordpress.com) and I'm putting out a few Facebook ads to get a few sign-ups. What are your thoughts? The more direction you can provide to a technical person to build a product, the faster it will take them to build it. An extremely well-defined feature that clients are actively providing feedback can take me a few days to build and iterate on. A vaguely defined feature that no clients will be using may take a month to build. Software engineers have to make a lot of assumptions about how the app will be used and the more well-defined the problem sets are, the simpler it is to build. As a business person, you can significantly speed up the tech person's ability to build the product, and not make it seem like all their work will be an utter waste of their time. By taking some of these additional steps for your pitch, you'll be able to show your potential tech co-founder that: - the idea makes sense - you will be honest with them - you can get stuff done - you view them as an equal - the idea is not as high-risk as it may seem More often than not, you will have a terrible idea or do an awful job with your prototypes. That's how every good business starts. As a technical person, we don't necessarily understand business and usually won't realize it's a terrible idea anyway, but we'd appreciate your effort and resourcefulness. We'll ask you more questions. We'll tell you what we like and what we don't. And as natural problem-solvers, we'll want to figure out how to solve this one with you too.