Category: Cryptocurrency News

Cryptocurrency News and Public Mining Pools

CoinEx Security Team: The Security Risks of THORChain (RUNE)

According to THORChain’s treasury report for Q1 2022 released on April 1, the chain registered a growth in revenue despite the twofold impact of persistent market sluggishness and highly unstable geopolitical factors. Public data shows that THORChain recorded $2.17 billion in revenue in Q1 2022. THORChain, acclaimed as the “cross-chain version of UniSwap”, gained a foothold in the cross-chain trading market relying on its unique advantages and earned extensive recognition among investors. Behind all these glamours, THORChain is also deeply troubled by hacking. The chain suffered frequent security breaches since it was launched on Ethereum, a fact that casts doubt on its security. On April 11, THORChain tweeted about phishing attacks, warning users not to interact with [DeTHOR] or other unknown tokens within their wallets, which once again raised concerns about its security issues. While building a sound security system for CoinEx products, the CoinEx security team also keeps track of security incidents in the blockchain space to help users better understand the security of different projects from the perspective of technical security and mitigate the investment risk. Aiming to improve the security criteria for the blockchain sector, the CoinEx security team has analyzed the security risks of THORChain (RUNE). The team hopes that THORChain could note and mitigate the following risks by optimizing the relevant smart contract codes. In addition, this article is also a warning for users, reminding them to be more aware of asset security and avoid asset losses. How secure is THORChain (RUNE)? Through analysis of the contract code and logic of THORChain (RUNE), the CoinEx security team has found the following risks: To begin with, let’s check out the contract code of THORChain (RUNE): https://etherscan.io/address/0x3155ba85d5f96b2d030a4966af206230e46849cb#code We can tell that RUNE is a pretty standard ERC-20 token. It should be noted that apart from the ERC-20 interface, THORChain (RUNE) offers an additional interface: According to transferTo (as shown in the picture above), THORChain (RUNE) uses tx.origin, which is one of the causes behind its security risks. Here, we should explain the difference between tx.origin and msg.sender: The below picture describes what happens when a regular address calls the smart contract: In such cases, msg.sender = account.address, and tx.origin = account.address, which means that msg.sender is just the same as tx.origin. The following is what happens when an account calls contract A, and contract A calls contract B: When contract A calls contract B (as shown above), we can tell that msg.sender equals tx.origin in contract A. However, in contract B, msg.sender = contractA.address, while tx.origin = account.address. Therefore, tx.origin is like a global variable that traverses the entire call stack and returns the address of the account that originally sent the transaction. This is the key issue: to date, almost all known attacks against THORChain (RUNE) relate to tx.origin. Let’s now find out how attackers steal users’ RUNE tokens through tx.origin: Attack No.1: Pilfer a Goat from a Herd Addresses on Ethereum are divided into external addresses and contract addresses. Transferring ETH to these two types of addresses through external addresses is fundamentally different. The Official Documentation of solidity states that a contract address must implement a receive Ether function before making transfers. In light of the features of tx.origin, hackers may build an Attack contract: When the Attack contract receives an ETH transfer from a user, it will “pilfer a goat from a herd” — the contract will steal the user’s RUNE tokens in the process. Attack No.2: Internal Attack An Internal Attack is a special type of attack. When trying to steal a user’s RUNE through an Internal Attack, the hacker needs to have a medium token. Moreover, the token must also call third-party contracts. According to the transfer records of RUNE on Ethereum, some attackers hacked RUNE through AMP Token transfers. AMP Token uses the ERC-1820 standard to manage Hook registration and examine whether Hook is registered upon each transfer. If Hook has been registered, then the Hook will be called. The contract code of AMP Token shows that the final implementation of the transfer is: _transferByPartition. Meanwhile, there are two calls involving transferHook: _callPreTransferHooks (before the transfer) and _callPostTransferHooks (after the transfer). In particular, _callPreTransferHooks is for the from address, while _callPostTransferHooks is for the to address (i.e. the receiving address). For regular users, stealing tokens from themselves is pointless. Therefore, attackers may exploit _callPostTransferHooks. Let’s now check out the codes of _callPostTransferHooks. IAmpTokensRecipient(recipientImplementation).tokensReceived() We can tell that the only callback that attackers could exploit is IAmpTokensRecipient(recipientImplementation).tokensReceived() Next, we will illustrate how this call can be used to transfer a user’s RUNE while making an AMP Token transfer. Step 1: A call contract is needed (as shown below): Step 2: Deploy the contract to obtain the Attack Address. Step 3: Call the ERC-1820 contract interface (setInterfaceImplementer) to register the interface. ERC-1820 Address: 0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24 Contract interface: setInterfaceImplementer(address toAddr, bytes32 interfaceHash, address implementer) In particular, toAddr is the receiving address of the AMP transfer, interfaceHash为AmpTokensRecipient的hash: 0xfa352d6368bbc643bcf9d528ffaba5dd3e826137bc42f935045c6c227bd4c72a interfaceHash is the hash of AmpTokensRecipient: 0xfa352d6368bbc643bcf9d528ffaba5dd3e826137bc42f935045c6c227bd4c72a Implementer is the Attack Address obtained in Step 2. Step 4: Lure a user to transfer AMP to the toAddr to trigger a callback, and steal his RUNE at the same time. Attack No.3: Phishing Attack As its name suggests, in a phishing attack, the attacker promises to give away incredible benefits to lure users into performing certain contract operations. Here, we will introduce a common phishing attack. Step 1: The attacker issues an ERC-20 token, and may write it into any contract interface that involves signatures. Step 2: Create a trading pair on Uniswap or any other swap; Step 3: Offer airdrops to all users/addresses who hold RUNE tokens; The initial work of the phishing attack is basically completed through the above these steps. Next, the attacker only has to wait for users to trade on a swap, and users risk losing their RUNE once they perform operations such as approve, transfer, etc. In addition, in order to further verify the security risk of THORChain contract code, CoinEx has discussed with the security team from SlowMist and PeckShield, two well-known security agencies in the industry. Confirmed by SlowMist and PeckShield, the security risk mentioned above does exist. So far, we have covered several types of attacks, as well as the security risks that users are exposed to. How should the project team optimize the contract code to make itself more secure and protect users’ assets? The only answer is to be cautious about using tx.origin. How can regular users mitigate risks and protect their assets in the face of attacks that seem unavoidable? The CoinEx security team offers the following suggestions: For Attack No.1: When making a transfer, keep track of the estimated Gas consumption. For a regular ETH transfer, a Gas fee of 21,000 is more than enough. Be careful if the Gas consumption far exceeds that figure. For Attack No.2: Isolate your tokens by adopting different wallets. You can store different tokens in different addresses. Extra caution is needed when it comes to the hot wallet address offered by exchanges. For Attack No.3: Greed is the source of all evil. Do not blindly participate in any airdrop event. Security has always been a top concern in the blockchain sector. All players, including project teams and exchanges, should prioritize security during project operation, keep users’ assets safe and secure, and jointly promote the sound growth of the blockchain industry.

Ravencoin Logo NFT’s limited price drop to 25RVN https://tinyurl.com/2j7k5mdr

submitted by /u/ancientaddict [link] [comments]

SEC just completly changed their arguement on a key speech from it being a “personal opinion” to “official approach on regulating digital assets”.

Just this week the judge ordered the SEC to present their documents from a key 2018 speech from Hinman (former SEC director). That's was the key speech where the SEC accused Ripple of not accepting that they were a security. Well in the same speech Hinman said that ETH was not a security. Since then,…
Read more

ETH Mixer Tornado Cash Reveals Blocking OFAC Sanctioned Ethereum Addresses via Chainalysis Oracle Contract

According to the project’s official Twitter account, Tornado Cash, the ethereum mixing service that allows participants to shuffle ether, is blocking flagged ethereum addresses listed on the Office of Foreign Assets Control’s (OFAC) Specially Designated Nationals And Blocked Persons list (SDN). The decision follows the recent OFAC update, that lists the Ronin exploiter’s ethereum address, […]

Introducing Wildland. An open-source protocol for data management & privacy that empowers developers and end-users.

Hello r/Ethereum!! I wanted to mention a project called Wildland. From the leaders of Qubes OS and The Golem Project, we're developing a set of open-source protocols and software with the aim of giving users back control over their digital data. What this means is that we are developing a new layer where your data…
Read more

Benefits of Centralized vs Decentralized Exchanges

Buying or selling cryptocurrencies usually starts with exchanges or, in other words, digital marketplaces where most crypto trading happens. For example, Binance, a leading centralized exchange (CEX), handles over $24.27 billion in daily volumes. Similarly, UniSwap is the world’s largest decentralized exchange (DEX) with over $7.25 billion in Total Value Locked (TVL). While centralized exchanges now hold market dominance, decentralized exchanges are providing strong competition with rising volumes. And, although both CEXs and DEXs facilitate crypto-transactions, they differ greatly in terms of security, cost, and transparency. In fact, both CEXs and DEXs have their own set of advantages that make them unique, as discussed in this article. Centralized Exchanges CEXs often go against the spirit of blockchain technology, but th+ey also offer a few major advantages, including the following: Liquidity Centralized exchanges keep enough assets on hand to allow quick deposits and withdrawals. Thus, anyone wanting to exchange, say, their BTC for USD, is able to do so instantly on a CEX. Liquidity is in fact a CEX’s trump card, which is why they invest a lot into supplying consumers with high-speed transactions with minimal slippage. Blockfinex, for example, offers a highly secure and robust exchange with deep liquidity for more than 500 crypto assets. Regulation Most CEXs seek operating permissions in several countries, demonstrating their stability and competence to financial regulators. They also follow investor protection measures and issue risk alerts to clients regarding the non-reversible nature of transactions. This builds trust among consumers, allowing them to use the platform with confidence. Easy-to-Use CEXs usually offer user-friendly interfaces, which makes trading crypto very simple at any time. They also allow users to set trades in seconds since custody and orders are all centralized, making them a go-to place for big trades. Blockfinex is one such exchange that offers an easy-to-use interface for trading crypto. The platform allows traders to buy/sell with huge volumes without slippage and in just a few clicks. Decentralized Exchanges Operating DEXs is like turning on the advanced settings in an app. They work in an open-source, trustless, and permissionless manner, providing users full transparency over their funds. And, they also bring some of the best benefits to the table including: Privacy DEXs do not usually seek sensitive information while onboarding. In other words, DEXs do not implement procedures like KYC (Know-Your-Customer). Everything from wallets to transactions is anonymous, which ensures utmost privacy. Self-Custody of Assets The rule of thumb in DeFi is this—not your keys, not your crypto. DEXs adhere to this principle and are non-custodial, enabling users to exercise self-custody. In simple terms, DEX users retain control over their private keys, and thereby enjoy genuine ownership of their assets. Lower Transaction Fees Decentralized Exchanges eliminate the need for involving middlemen, resulting in cheaper transactions overall. Most DEXs currently run on Ethereum which leads to high gas fees at times. However, blockchains are rapidly innovating solutions to ensure negligible fees for end-users. For example, a transaction worth $100,000 costs only a few dollars on Polygon Network. What to Choose? It is entirely up to the user to choose which exchange to use according to their needs and demands. CEXs are ideal for those who are primarily seeking convenience and are not comfortable with self-custody. And, platforms like Blockfinex are the best bet that provide maximum convenience when trading crypto. However, DEXs may be the way to go if you are all for privacy and ownership of your funds. On that note, both CEXs and DEXs have their share of benefits and it would be naive to call one better than the other. They fulfill different purposes and are thus relevant to users under different circumstances. And together, they facilitate the broader blockchain-cryptocurrency domain, boosting adoption in the process.  

Trader Files Lawsuit Against Uniswap After Significant Losses

submitted by /u/bdinu89 [link] [comments]

How to Become a Smart Contract Auditor

submitted by /u/binaryfor [link] [comments]