Skip to content

Instantly share code, notes, and snippets.

@naddison36
naddison36 / ParaSpace.svg
Last active March 17, 2023 07:45
Para.Space Hack
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@naddison36
naddison36 / README.md
Last active April 12, 2021 01:56
mUSD V3 Upgrade Flash Loans

DyDx Flash Loans to rebalance mUSD

The Flash Loans transactions used to rebalance the mUSD basket as part of the mUSD V3 contract upgrade.

  1. Swap out TUSD from mUSD
  • Flash loan 1m USDC from DyDx
  • mUSD swap 1m USDC->TUSD
  • Swap 0.5m TUSD->USDC using Curve Y pool
  • Swap 0.5m TUSD->USDC using Curve TUSD pool
  • Loan shortfall 634 USDC
@naddison36
naddison36 / README.md
Last active February 25, 2021 01:05
Punk #1737
@naddison36
naddison36 / BTFinance.svg
Last active February 9, 2021 01:30
BT Finance exploit
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@naddison36
naddison36 / README.md
Last active February 5, 2021 03:52
Yearn DAI v1 vault exploit

The Yearn DAI v1 vault exploit transaction is 0x6dc268706818d1e6503739950abc5ba2211fc6b451e54244da7b1e226b12e027.

The below svg file was generated using the tx2uml tool that generates UML sequence diagrams from Ethereum mainnet transactions.

tx2uml.ts 0x6dc268706818d1e6503739950abc5ba2211fc6b451e54244da7b1e226b12e027 -n nether -v -f svg -o ./v1yDAI.svg

You need to have access to an archive node to run the above command.

did:muport:QmbXLN1dF7oyNjo66crvtxJ8CbWnAVzWUXe6KNXBYbJsCV
3Box is a social profiles network for web3. This post links my 3Box profile to my Github account!
✅ did:muport:QmbXLN1dF7oyNjo66crvtxJ8CbWnAVzWUXe6KNXBYbJsCV ✅
Create your profile today to start building social connection and trust online. https://3box.io/

Keybase proof

I hereby claim:

  • I am naddison36 on github.
  • I am naddison (https://keybase.io/naddison) on keybase.
  • I have a public key ASCHXvU5ZkdmIIihIukvKCmfwGZXQ4GJNcrJ71jsocUlCAo

To claim this, I am signing this object:

@naddison36
naddison36 / gist:8802db240399651ca99a277b70ec16fc
Last active June 13, 2017 13:06
Percentages in node 8 console.log

The following code in node 6.10.3

console.log('percent: %d%, fraction: %d', 10, 0.1);

prints percent: 10%, fraction: 0.1

In node 8.1.0 it prints percent: 10 fraction: 0.1. Notice the % is no longer printed.

The following code gets back to the original node 6.10.3 output

@naddison36
naddison36 / keybindings.json
Created May 22, 2016 12:05
Adding compile shortcuts to the VS Code Solidity extension
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+c", "command": "solidity.compile",
"when": "editorTextFocus" },
{ "key": "shift+ctrl+c", "command": "solidity.compile.active",
"when": "editorTextFocus" }
]