BlockSec Profile picture
Smart Contract & EVM Chain Audit | Boost Web3 through Next-Gen Security & Usability Innovations @Phalcon_xyz @MetaSleuth @MetaDockTeam 👉TG: https://t.co/owokTLaVkD
Apr 13, 2023 4 tweets 2 min read
1/ @iearnfinance was hacked with two consecutive attack transactions. The root cause is due to an (on-purpose?) misconfiguration which makes the rebalance of the pools rely on an incorrect underlying token. This misconfiguration has been there for more than three years. ImageImage 2/
Attack Tx1: explorer.phalcon.xyz/tx/eth/0xd55e4…
Attack Tx2: explorer.phalcon.xyz/tx/eth/0x8db0e…

Specifically, one of the strategy pools of yUSDT/ycUSDT, Fulcrum, had its address incorrectly configured. The underlying token of the misconfigured pool is USDC.
Apr 3, 2023 8 tweets 3 min read
1/ @samczsun explained that the attacker exploited the vulnerability in mev-boost-relay to drain MEV bots. After digging into the attack, we have two more findings. First, the attacker used a honeypot tx to lure MEV bots. Second, the honeypot tx has a self-protected mechanism. 2/ The attacker is a validator with a pre-knowledge that he/she will be selected to be the miner of block 16964664. Besides, a vulnerability in the mev-boost-relay will reveal the private transaction in flashbots.
Mar 13, 2023 4 tweets 2 min read
1/ @eulerfinance is attacked. The root cause is due to the lack of liquidity check in the function donateToReserves()
phalcon.xyz/tx/eth/0xc310a…

See the detailed attack steps below. Image 2/ Here is the key steps
a. Attacker flashloaned 30M DAI in AAVE
b. Attacker deposited 20M DAI and got back 20M eDAI
c. Since Euler Finance provides the capability of leverage borrow (docs.euler.finance/app/ui/mint), the attacker can mint 195M eDAI and 200M dDAI.
Mar 1, 2023 7 tweets 2 min read
1/ We have received queries about whether BlockSec is the “whitehat” behind the Jump "counter exploit". We are NOT involved in the Jump case, and the way of the Jump case is fundamentally different from the Platypus counter exploit we were involved in.

blocksecteam.medium.com/blocksecs-pers… 2/ The high-level idea for the Jump counter exploit is as follows.

The Exploiter’s Maker Vaults can be managed by Oasis AutomationBot smart contract since the Exploiter enables the automation sell and buy services offered by Oasis.

kb.oasis.app/help/what-is-a…
Feb 22, 2023 4 tweets 3 min read
1/ @fi_dynamic $DYNA on #BSC was hacked (bscscan.com/tx/0xc09678fec…) and the loss is ~73 BNB.

The root cause is that the StakingDYNA contract (bscscan.com/address/0xa7B5…) does not handle the deposit time correctly. ImageImage 2/ Specifically, users could deposit $DYNA and claim rewards, while the interest will be calculated as follows:
duration = now - lastProcessAt
interest = k * (stakeAmount * duration)

However, the user's lastProcessAt is only recorded for the first deposit/stake.
Feb 17, 2023 4 tweets 2 min read
1/ We have analyzed the recent @Platypusdefi attack and found that the attacker made a mistake in the first attack transaction, which prevented the attacker from withdrawing the profits. Here is the full story.

Thanks, @spreekaway for pointing out this direction. 2/ We identified two attack transactions, with the first one (phalcon.blocksec.com/tx/avax/0x1266…) leaving the profits in the attack contract and the second one (phalcon.blocksec.com/tx/avax/0x997b…) transferring the profits to the attacker.
Feb 7, 2023 4 tweets 2 min read
1/ Looks like 0x55a37a2e5e5973510ac9d9c723aec213fa161919 was added as a "solver" of @CoWSwap by the multisig in this tx:

phalcon.blocksec.com/tx/eth/0x7374b…

Then 0x55a invokes the tx to approve DAI to SwapGuard

phalcon.blocksec.com/tx/eth/0x92f90… Image 2/ Since DAI was approved from GPv2Settlement to SwapGuard, then the attacker can ask SwapGuard to transfer DAI from GPv2Settlement to arbitrary addresses.

phalcon.blocksec.com/tx/eth/0x90b46… Image
Jan 17, 2023 4 tweets 3 min read
1/ @omniestategroup was hacked, the loss is ~ 236BNB - due to the insufficient check of the arguments in the StakingPool contract.
The attacker can invest 1 wei and withdraw to claim rewards (ORT token), e.g.,
invest:phalcon.blocksec.com/tx/bsc/0x49bed…
withdraw:phalcon.blocksec.com/tx/bsc/0xa9166… Image 2/ Specifically, the reward is calculated by the _Check_reward function according to the deposit duration and amount. However, the duration is derived from the input parameter end_date, whose value is not checked. ImageImage
Jan 10, 2023 4 tweets 2 min read
1/ The $BRA token on BSC was attacked, and the total loss reaches 819 $WBNB. The root cause is due to a logic flaw of the BRA contract, which doubles reward the tax fee to the pancake pair without invoking the sync() function after transferring. Image 2/ The attacker repeatedly invoked the skim() function to increase the balance of the pair. Finally, the attacker swapped back WBNB. There are two attacks:
phalcon.blocksec.com/tx/bsc/0x6759d… profit: 144 WBNB
phalcon.blocksec.com/tx/bsc/0x4e5b2… profit: 675 WBNB
Jan 3, 2023 4 tweets 3 min read
1/ @GDS_chain GDS token on #BSC was attacked, and the total loss is ~$187K USDT. The attacker abused the LP Mining mechanism of the GDS token by first adding liquidity with flashloan, and then using multiple contracts to collect rewards.
phalcon.blocksec.com/tx/bsc/0x2bb70… 2/ Specifically, GDS token will reward the users who add liquidity to (GDS, USDT) pair in each epoch and the reward amount lpRewardAmount = x * LP token holding amount / LP token total supply (x is a global variable). Thus, the more staking amount, the more rewards users can get. Image
Dec 29, 2022 5 tweets 3 min read
1/ The @jaypeggerz project was attacked and the loss is around 15.32 Ether. It is a contract-level reentrancy attack that successfully manipulates the price of the JAY token.

phalcon.blocksec.com/tx/eth/0xd4faf… ImageImage 2/ Note that the price of the JAY token is the Ether balance of the JAY contract, divided by the total supply of the JAY token; the JAY contract allows the users to pass arbitrary ERC-721 tokens for the buyJay function. ImageImageImage
Dec 16, 2022 5 tweets 3 min read
Our short analysis of a logic bug identified in @SushiSwap's KashiPairMediumRiskV1 contract:

blocksecteam.medium.com/beyond-the-mar… 1/ This bug may cause the miscalculation of the token prices. Specifically, it lies in the borrow function, which uses the outdated exchangeRate to verify the borrowed share in the solvent modifier, i.e., in the _isSolvent function. ImageImage
Dec 13, 2022 5 tweets 3 min read
1/ Today, we wanna talk about MEV Bot. With the evolution of MEV Bot, the most recent explorations have been front-run by Bot. However, Bots are getting wilder, including anonymous deployments, refusal to return funds (in most cases), and aggressive tx fee strategies. 2/ Many Mev Bots started to deploy through @TornadoCash funding, e.g., the front-run Bot in today's @ElasticSwap exploit (0xbeadedbab...2967). This is by no means an isolated case, we have observed that more and more MEV Bots are deployed anonymously. Image
Dec 13, 2022 5 tweets 3 min read
1/ The @ElasticSwap has just been exploited. It is a price manipulation attack and the root cause is due to the mix/misuse of two accounting systems.

The attack tx:
phalcon.blocksec.com/tx/eth/0xb3648…
The loss is around 523 Ether. 2/ The exchange contract uses two accounting systems. For addLiquidity, it uses the internal accounting system; while for removeLiquidity, it calculates the tokens to return with the token-balance-based accounting system and reduces the internal accounting reserves.
Dec 7, 2022 4 tweets 2 min read
1/ BNB-AES pool is attacked due to the deflation token. During the transfer process, the token will claim fees if the To address is the specified one (i.e.,0x40ed17221b...07e3). The attacker abused this feature to manipulate the price of the BNB-AES pool
phalcon.blocksec.com/tx/bsc/0xca4d0… Image 2/ Specifically, the attacker burrowed 8000 BUSD and swapped into AES. After that, the attacker sends the AES to the BNB-AES pool and invokes the skim function repeatedly. In this process, the balance of pool is burned and the swapfee in the AES contract increased.
Dec 6, 2022 4 tweets 3 min read
1/ @RoastFootball $RFB token was attacked. The hacker exploits a weak pseudorandom number generation vulnerability in the lottery function and executes the transaction only when the lottery is won, otherwise reverts.
Exploitation tx: phalcon.blocksec.com/tx/bsc/0xcc8fd… 2/ @RoastFootball has a lottery mechanism that gives users a certain probability of getting a 10x reward when they buy the $RFB. The hacker buys $RFB only when he is sure of winning the lottery. Otherwise, the function will revert (only losing Gas). This hacker won 2 of 50 times. Image
Nov 23, 2022 4 tweets 2 min read
1/ $NUM of the @numbersprotocol seems to be exploited due to the token is incompatible with the @MultichainOrg Router. Specifically, $NUM does NOT implement the permit() function required by the Router; meanwhile, the token has a default fallback() which can be exploited. 2/ Here is the exploitation tx:
phalcon.blocksec.com/tx/eth/0x8a814…
The attacker created a fake anyToken, which uses the $NUM as the underlying token. Then the attacker tricked the @MultichainOrg Router to transfer any NUM token approved to it by calling the anySwapOutUnderlyingWithPermit().
Nov 3, 2022 4 tweets 2 min read
1/ @skywardfinance was attacked by explorer.near.org/accounts/5ebc5… in transaction explorer.near.org/transactions/9…. The loss is more than 1M $NEAR Tokens. @NEARProtocol 2/ The root cause is in function redeem_skyward (github.com/skyward-financ…), which is used to redeem the treasury from the protocol.
Nov 1, 2022 4 tweets 3 min read
1/ We are thrilled to release Rustle (github.com/blocksecteam/r…), the first automatic auditor for @NEARProtocol community.
@PagodaPlatform @proximityfi

blocksecteam.medium.com/rustle-the-fir… 2/ Rustle can help to locate tens of different vulnerabilities in #NEAR smart contract. We hope Rustle can help to increase the security of the whole #NEAR ecosystem.
Oct 27, 2022 4 tweets 2 min read
1/ UVT token was just attacked, and the loss is around 5,010 WBNB: phalcon.blocksec.com/tx/bsc/0x54121…
We suspect that the attack was due to the lack of sanity check, i.e., the second parameter of function 0xc81daf6e in contract 0x5ecfda78754ec616ed03241b4ae64a54d6705a1a.

@defiprime 2/ The attack contract (varg1) forges the function 0x95b81c68, hardcoded in the vulnerable contract. As this contract trusts the value returned by the function 0x95b81c68, it uses this value as the transfer amount to send ~100,499,018 UVTs to the hacker.
Oct 7, 2022 4 tweets 2 min read
1/ The Binance cross-chain bridge has been attacked. The root cause is due to the vulnerability in the message verification, as reported by @samczsun ().
In fact, bridges have been valuable targets for attackers. The figure shows the representative ones. 2/ Cross-chain bridges usually involve multiple parties in their implementation, including the contracts on both source and target chains and the relays (validators) sitting in the middle. Any vulnerability in either party can cause huge financial loss.