Skip to content

Instantly share code, notes, and snippets.

@slee981
slee981 / logging_example.py
Created February 17, 2021 04:51
Python Logging Example
import logging
# potential levels to log (hierachy):
# - DEBUG : everything
# - INFO : everything except debug
# - WARN : warn or error
# - ERROR : only error
# e.g. handle error in "try / except" block
#
# CHANGE THIS!!!!
@slee981
slee981 / starship-settings.toml
Created January 16, 2021 23:20
Starship Settings
# after install, need the following in .bashrc
# eval "$(starship init bash)"
add_newline = true
[character]
success_symbol = "[\n\\$](bold green)"
error_symbol = "[\n\\$](bold red)"
[jobs]
disabled = true
@slee981
slee981 / microsoft-terminal-settings.json
Created January 16, 2021 23:10
Microsoft Terminal Settings
// This file was initially generated by Windows Terminal 1.4.3243.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@slee981
slee981 / IDEX_Forkdelta_Attack.md
Last active October 19, 2022 01:43
Attack on IDEX and Forkdelta decentralized exchange

IDEX and Forkdelta exchange attack on HADE Token

On Sunday, June 3rd 2018, the account 0x0a010bd5067732bb062b52fdfb775b8f0a7648ae deposited an infeasibly-large supply of HADE Token into the decentralized exchanges Forkdelta and IDEX. After making trades, the attacker withdrew 26.5 ETH from the two exchanges.

What we know

  1. The HADE Token contract itself was unaffected. No fradulent transfers or changes to supply were made to the HADE contracts.
  2. IDEX and Forkdelta are not safe for trading HADE. The attacker effectively "tricked" the exchanges into believing she deposited tokens that she didn't actually own. Thus, the exchanges' liquidity pools inaccurately reflect the number of HADE tokens that they actually have and it's likely you will not be able to withdraw any tokens you purchase through them.

What happened

While the exchange contracts and the Hade contracts performed as expected on their own, the attacker use

@slee981
slee981 / HadePlatform_IDEX.md
Last active October 19, 2022 01:48
An overview of suspicious trading through the IDEX exchange.

Hade Platform and IDEX exchange.

Overview

According to a paper trail and word of mouth, an infeasibly large number of HADE tokens (more than the total supply) appeared for sale on IDEX on Sunday June 3rd, however, they have since been delisted so this cannot be documented. The result was a decrease in trading price and some questions.

What we know

  1. No new tokens were created. According to etherscan (a site that reads directly from the Ethereum blockchain), the total supply is still 75 million HADE, so no new tokens were created through the token's smart contract

  2. No suspicious transfers of HADE were made.