<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ting Yuen on Medium]]></title>
        <description><![CDATA[Stories by Ting Yuen on Medium]]></description>
        <link>https://medium.com/@ting.yuen123?source=rss-fdd011ce9bde------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*GBlBtZn9CzOCcl1Y.jpg</url>
            <title>Stories by Ting Yuen on Medium</title>
            <link>https://medium.com/@ting.yuen123?source=rss-fdd011ce9bde------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 21:43:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ting.yuen123/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Learnings we could apply from Traditional Lending to Crypto Lending]]></title>
            <link>https://medium.com/@ting.yuen123/learnings-we-could-apply-from-traditional-lending-to-crypto-lending-d773acd89748?source=rss-fdd011ce9bde------2</link>
            <guid isPermaLink="false">https://medium.com/p/d773acd89748</guid>
            <category><![CDATA[tradfi]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[crypto-lending]]></category>
            <category><![CDATA[lessons-learned]]></category>
            <category><![CDATA[defi]]></category>
            <dc:creator><![CDATA[Ting Yuen]]></dc:creator>
            <pubDate>Thu, 08 Jun 2023 14:14:31 GMT</pubDate>
            <atom:updated>2023-06-25T06:08:50.963Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is crypto lending?</h3><p>Crypto lending is the process of depositing cryptocurrency that is lent out to borrowers in return for regular interest payments. There are two main types of crypto lending platforms- decentralised and centralised platforms.</p><p>Centralized platforms mean there is a single entity or authority controlling all aspects of the platform.</p><p>Decentralized platforms mean there is no single entity having the sole authority. Network participants (lenders and borrowers in the context of a lending platform) interact directly with each other through the smart contracts, without the need of a person in the middle to manage the process.</p><p>We created a decentralized lending platform for retail customers on the BNB Chain in 2021. BNB Chain is the 2rd largest decentralized smart contract blockchain platform by market cap and 3rd largest by Total Value Locked (TVL). TVL is a metric used to measure the total value of digital assets that are locked or staked. The higher the TVL, the more trustworthy the platform is perceived to be.</p><p>On the other hand, Ethereum chain is the largest decentralized blockchain platform by market cap and TVL. The drawback of Ethereum is high gas fees. Gas fee is a commonly used term for the cost users pay to carry out a transaction. The average gas fee per transaction for Ethereum vs BNB chains for the month of May 2023 were $4.28 and $0.17 respectively.</p><p>Broadly speaking, decentralized lending is part of decentralized finance (Defi). Traditional Finance, commonly referred to as TradFi, refers to the conventional financial systems and institutions that have been in existence for decades.</p><p>Since we wanted to target retail customers, we chose BNB chain mainly for lower gas fees.</p><p>Below are the differences between (decentralized) crypto lending and traditional lending.</p><h3>Penculiar crypto lending “features”</h3><p>1. Advertised APR (annual percentage rate) is only an approximate rate. In crypto lending, the time is generally measured in blocks. The time it takes a blockchain to produce a block varies. APR is calculated on interest per block, multiple by the expected number of blocks in a year. Because the block times are not consistent, the expressed APR number in yearly term, will not be accurate. For BNB chain, the average block time is about 3 seconds. There are approximately 31,536,000 secs in a year. This translates to expected 10,512,000 blocks in a year. You see where I am going to this. The APR is an approximation of an average of an expected value.</p><figure><img alt="BNB Smart Chain Average Block Time Chart" src="https://cdn-images-1.medium.com/max/1024/1*g31CNwyk3HanWQprXKeHGw.png" /><figcaption>BNB Smart Chain Average Block Time Chart (1)</figcaption></figure><p>2. APR is dependent on the utilisation ratio of the asset pool. When the asset pool has lower utilisation, it has lower APR to incentivise more borrowing. Likewise, for higher pool utilisation, the APY goes up to decentivise borrowing and encourage more lending. It is discerning for users, as the rate can flutuate by 600% at the two extremes. The reason for this pricing extreme is to incentivise/penalise lenders and borrowers to maintain a healthy pool utilisation level. For the eagle eye, you would’ve noticed the lenders are earning more than what the borrowers are paying at 100% utilization, meaning the defi platform is operating at a loss.</p><figure><img alt="Chart depicting the APRs for borrowers and lenders at 1% utilisation." src="https://cdn-images-1.medium.com/max/496/1*8q-7ZMock-cC3GDu8TNGbA.png" /><figcaption>Borrowing and lending rates at 1% pool utilization.</figcaption></figure><figure><img alt="Chart depicting the APRs for borrowers and lenders at 100% utilisation." src="https://cdn-images-1.medium.com/max/497/1*y8sjnDyDsjqZI5vQm19-SA.png" /><figcaption>Borrowing and lending rates at 100% pool utilization.</figcaption></figure><p>3. Lending and borrowing period: There is no maturity date in the crypto world. Lending and borrowing is in perpetuity. Borrowers are not obliged to return the funds as long as they have enough collateral locked in the platform to cover the cost of the borrowed asset plus interest. When the collateral falls below certain levels, the loan is liquidated. In traditional lending, loans always have a maturity date.</p><p>4. When the pool asset utilisation (funds to lend) reaches 100%, no lender would be able to withdraw their assets until a borrower returns asset into the pool, or more lenders lend into the pool.</p><p>5. When a borrower wants to settle the loan, the person might not able to settle the loan in 1 transaction as interest is calculated per block and up to the current block. If the transaction cannot be confirmed in the next block, there will be a fraction of the interest owed to the platform. This is not a good user experience at all.</p><p>6. The Price Oracle is the most critical piece of crypto lending infrastructure. If the pricing of assets are not accurate, you could run into the risk of insolvency because the borrowed assets are under-collateralised or assets not been liquidated quick enough during a market down swing. Price down swings are a regular occurrence in the crypto space. In traditional lending world, asset prices are a lot more stable, and the use of price oracle for ongoing realtime monitoring is not required. Banks generally stay away from risky assets. Institutional lending from banks have complex financial instruments like derivative and hedging to handle risky assets. That is outside the scope of this article.</p><p>7. Liquidation Risks. The common lending/borrowing defi platforms at the time didn’t have automated liquidation feature. They rely on third parties to liquidate the under-collateralised assets to keep the platform healthy by providing financial incentives. For smaller crypto lending platforms, third party liquidators are non existent and hence it is crucial to automate the liquidation process from the get go. This meant additional capital requirement and extra development efforts for the team.</p><h3>Lessons from Traditional Lending</h3><p>Granted, the traditional lending space is heavily regulated, sometimes for good reasons. The crypto lending industry might have to adopt some of the traditional lending practices for broader appeal and familarity.</p><ul><li>If a bank advertised an APR of 5% and if it fluctuates, sometimes to your favour, sometimes not, that would not be acceptable in traditional lending. Why would that be acceptable in the crypto space? Maybe we should use another term instead of APR to avoid the confusion. Annual Blockhead Rate (ABR)?</li><li>Likewise, if the variable rate can vary by 600%, who would use it in the traditional lending world? Is there a better way to incentivise the participants to maintain a healthy pool utilization such as preventing further lending once pool utilization reaches certain ratio, or having a maturity on the loans?</li><li>If the banks said to depositors that they can’t withdraw the funds today, and need to come back another time because the utilization is at 100%, that would trigger a bank run. Cue Silicon Valley Bank (SVB) collapse.</li><li>If to repay a loan in full, your funds must reach the bank account within 3s, or else the bank has to recalculate the settlement amount you owe again, that would be insane. And at some point, the bank would mail you a notice of payment for an amount owed which is less than the postage itself. In the crypto lending, sometimes the amount owed is less than the gas fees. In these scenarios, it’s wiser to waive the debt or use a better method to avoid it in the first place.</li></ul><h3>Conclusion</h3><p>Despite the penculiarities of crypto lending, <a href="https://defillama.com/dexs/chains">billions of dollars</a> worth of digital assets are traded everyday.</p><p>I think if we could address the above issues, there would be easier and broader crypto lending adoption. The crypto lending world could apply some learnings from traditional lending space to better protect the users from the volatility of the APR and provide an overall better user experience.</p><p>Sources:</p><p>(1) <a href="https://bscscan.com/chart/blocktime">https://bscscan.com/chart/blocktime</a></p><p>(2) <a href="https://defillama.com/dexs/chains">https://defillama.com/dexs/chains</a></p><p>(3) <a href="https://www.crypto-news-flash.com/ethereum-average-fees-plummet-69-since-may-bullish-signal-for-the-network">https://www.crypto-news-flash.com/ethereum-average-fees-plummet-69-since-may-bullish-signal-for-the-network</a></p><p>(4) <a href="https://ycharts.com/indicators/binance_smart_chain_average_transaction_fee_es">https://ycharts.com/indicators/binance_smart_chain_average_transaction_fee_es</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d773acd89748" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lessons learned for Cryptocurrency Exchange security and how it could be applied to new industries]]></title>
            <link>https://medium.com/@ting.yuen123/lessons-learned-for-cryptocurrency-exchange-security-and-how-it-could-be-applied-to-new-industries-a7c8299df2dc?source=rss-fdd011ce9bde------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7c8299df2dc</guid>
            <category><![CDATA[exchange]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[startup-lessons]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Ting Yuen]]></dc:creator>
            <pubDate>Sat, 09 May 2020 11:57:36 GMT</pubDate>
            <atom:updated>2020-05-09T11:57:36.268Z</atom:updated>
            <content:encoded><![CDATA[<p>As a CTO for a startup cryptocurrency exchange during the 2017–18 crypto boom, the challenge to increase speed to market while dynamically addressing security threats proved to be a careful juggling act with high stakes for getting it wrong. How do you go about managing security threats in an industry that’s new to you? What are the processes? The purpose of this article is to shed some light on these thought processes and also share how Lex Exchange (Lex) used the five levers to address security risks. Hopefully these learnings could be applied to other new industries as well.</p><p>Every industry has its unique set of security challenges. The cryptocurrency industry, in particular, has had more than its fair share of security breaches. Just in 2019 alone, about <a href="https://cointelegraph.com/news/most-significant-hacks-of-2019-new-record-of-twelve-in-one-year">$290m worth of cryptocurrency was stolen from 11 notable security breaches</a>. Over <a href="https://selfkey.org/list-of-cryptocurrency-exchange-hacks/">40 highly visible breaches were documented</a> over recent years resulting in monetary losses in excess of a billion dollars for the victims. There may be many other security breaches which got brushed under the rug.</p><p>Exchanges are highly lucrative targets for hackers as the payoffs can be significant. Targeting exchanges is the most efficient way of stealing cryptocurrency funds due to <a href="https://www.forbes.com/sites/forbestechcouncil/2018/09/17/why-are-crypto-exchanges-are-hacked-so-often/#4d9663463421">centralized single point of failure</a>. A crypto exchange, at its core is essentially just a web application, and with that, it suffers all the same issues that plague any other web application.</p><h3>Understanding the business</h3><p>Naturally, the question of “<a href="https://www.business2community.com/business-innovation/how-to-create-a-business-case-to-buy-vs-build-software-02238233">buy or build</a>” the exchange came up in the early stages. White-label solutions were considered. One cannot automatically assume <a href="https://micky.com.au/hacked-up-to-100-crypto-exchanges-worldwide-could-be-affected/">white-label solutions are more secure</a>. They needed to be assessed thoroughly as people behind these companies are just human. After much deliberation, we went down the build route.</p><p>Using the divide and conquer approach, for web applications, the processes and frameworks for secured applications are well documented. The unique components for the exchange to be addressed are the cryptocurrency wallet services- deposits, and withdrawals. For the exchange, the wallet services are also the area with the highest security risks. Lex mitigated the risks through the 5 levers below.</p><p>Though the <a href="https://en.wikipedia.org/wiki/Threat_%28computer%29">security threats</a> are many, the levers of control can be broadly categorised into five areas, and they are as follows:</p><h3>The Five Levers</h3><h3>1. Cloud Infrastructure and Architecture</h3><p>Lex employed the <a href="https://en.wikipedia.org/wiki/Defense_in_depth_(computing)">defense in depth</a> approach in which multiple layers of defense are placed throughout the exchange as a web application should.</p><figure><img alt="Defense in-depth security layers" src="https://cdn-images-1.medium.com/max/1024/1*YX5gqgYsJyfkhunCSUra8w.jpeg" /><figcaption>Defense in-depth security layers [Source: Microsoft Azure]</figcaption></figure><p>We also kept the overall architecture simple to reduce the attack surface. An <a href="https://securitytrails.com/blog/attack-surface">attack surface</a> is defined as all the ways the apps can possibly be exploited by attackers. Instead of running our own blockchain nodes to access the native wallet services, we used 3rd party services for unified wallet service APIs with custodial service. With the five cryptocurrencies we initially offered, we had reduced the attack surface by a factor of 5.</p><p>At a later stage, we created our own wallet services to support cryptocurrencies of our choice. For the same, we leveraged on 3rd party services to avoid the operational complexity of maintaining blockchain nodes. We handled the critical security aspects of it, the wallet private keys, in-house. Simplified infrastructure and architecture reduces attack surface which in turn reduces security threat opportunities.</p><h3>2. Technical Process management</h3><p>Open Web Application Security Project (OWASP) is best-known for their <a href="https://owasp.org/www-project-top-ten/">OWASP Top 10</a> project, representing a broad consensus about the 10 most critical security risks to web applications.</p><p>Apart from the OWASP top 10, we use time delay for security policy changes, expiry of API keys, and spend limit on APIs that handle wallet services. For our own wallet services, we employed multi-signature wallet, smart contract auditing and a host of other web application security measures. To err on the side of caution, we had our application pen tested by third party as well.</p><p>It is said that most of the hackings were an <a href="https://www.cnbc.com/2019/12/17/hacker-behind-your-companys-data-breach-may-be-in-the-next-cubicle.html">inside job</a> so it’s important to secure the production deployment and secrets management processes. We employed separation of duties and least privilege practices to mitigate this.</p><h3>3. Business risk management</h3><p>Not all risks could be managed through technical means. The best approach is to use both technical and business levers for an optimal business outcome. The business could accept risks at its discretion, such as processes to replenish funds for the hot, warm and cold wallets. It’s analogous to a bank of having cash at the counter (hot), cash in the local bank vault(warm), and cash held in the central bank (cold). If an exchange is seriously compromised, only the funds in the hot wallets are at risk. A well known exchange used this process to <a href="https://securityintelligence.com/news/binance-hack-steals-41-million-from-hot-wallet/">minimise its losses</a>. The use of hot, warm, and cold wallets are good security practices which Lex also adopted.</p><p>Fraudulent users could also be managed through the business process by reduction of deposit and withdrawal limits, and extended the duration for withdrawals for all new users. Lex used a combination of technical and business levers at its disposal to mitigate the risks.</p><h3>4. Reports and monitoring:</h3><p>It’s critical to know which Key Performance Indicators (KPIs) are essential for the operations of the exchange and have these KPIs baked into reporting and monitoring channels to be readily available. For security purposes, if things went wrong, what were the key KPIs we needed to look out for. For Lex, we decided the key KPIs were proof of funds, pending deposits, pending withdrawals, and open unhedged positions. We kept a constant watch of these key business KPIs.</p><h3>5. Organisational knowledge base</h3><p>Fraud and threats come in many forms and guises. Phishing, email spoofing, fraudulent banking transactions, thinly veiled blackmailing, and many others. It is important to document, analyse and share the threats throughout the company and adapt the business processes quickly to minimise/neutralise the risk.</p><h3>Conclusion</h3><p>Essentially, exchanges are web applications, with unique cryptocurrency wallet services which are highly attractive to hackers. By using known security practices for web applications, and securing the wallet services using the five levers, we have built a highly secure exchange platform that minimised security threats and adapt to changes quickly.</p><p>Regardless of the industry, it’s important to identify the critical assets you wish to secure, understand their unique properties, and use a combination of technical and business levers to manage the security threats.</p><h3>References:</h3><ol><li><a href="https://cointelegraph.com/news/most-significant-hacks-of-2019-new-record-of-twelve-in-one-year">https://cointelegraph.com/news/most-significant-hacks-of-2019-new-record-of-twelve-in-one-year</a></li><li><a href="https://cointelegraph.com/news/most-significant-hacks-of-2019-new-record-of-twelve-in-one-year">https://cointelegraph.com/news/most-significant-hacks-of-2019-new-record-of-twelve-in-one-year</a></li><li><a href="https://www.forbes.com/sites/forbestechcouncil/2018/09/17/why-are-crypto-exchanges-are-hacked-so-often/#4d9663463421">https://www.forbes.com/sites/forbestechcouncil/2018/09/17/why-are-crypto-exchanges-are-hacked-so-often/#4d9663463421</a></li><li><a href="https://www.business2community.com/business-innovation/how-to-create-a-business-case-to-buy-vs-build-software-02238233">https://www.business2community.com/business-innovation/how-to-create-a-business-case-to-buy-vs-build-software-02238233</a></li><li><a href="https://micky.com.au/hacked-up-to-100-crypto-exchanges-worldwide-could-be-affected/">https://micky.com.au/hacked-up-to-100-crypto-exchanges-worldwide-could-be-affected/</a></li><li><a href="https://en.wikipedia.org/wiki/Threat_(computer)">https://en.wikipedia.org/wiki/Threat_(computer)</a></li><li><a href="https://en.wikipedia.org/wiki/Defense_in_depth_(computing)">https://en.wikipedia.org/wiki/Defense_in_depth_(computing)</a></li><li><a href="https://securitytrails.com/blog/attack-surface">https://securitytrails.com/blog/attack-surface</a></li><li><a href="https://owasp.org/www-project-top-ten/">https://owasp.org/www-project-top-ten/</a></li><li><a href="https://www.cnbc.com/2019/12/17/hacker-behind-your-companys-data-breach-may-be-in-the-next-cubicle.html">https://www.cnbc.com/2019/12/17/hacker-behind-your-companys-data-breach-may-be-in-the-next-cubicle.html</a></li><li><a href="https://securityintelligence.com/news/binance-hack-steals-41-million-from-hot-wallet/">https://securityintelligence.com/news/binance-hack-steals-41-million-from-hot-wallet/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7c8299df2dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>