Skip to content

Instantly share code, notes, and snippets.

@staccDOTsol
Last active May 5, 2022 10:29
Show Gist options
  • Save staccDOTsol/5877c9358f61b283a0a5e19360aa815f to your computer and use it in GitHub Desktop.
Save staccDOTsol/5877c9358f61b283a0a5e19360aa815f to your computer and use it in GitHub Desktop.
Torn on Crek

GM

Wat

On tornado.cash, the process is basically this:

  1. deposit to contract
  2. so does everyone else
  3. these are then in predefined buckets: 1 eth, 10 eth, 100 eth
  4. now, you have a big tumbler with many funds
  5. you are given an 'unlock code'
  6. sometime after awhile (longer is better) you return and use your unlock code and ethereum sends money to an address you choose

wonderful, but we can do it much better on Solana

enter https://github.com/glasseaters/hydra https://github.com/stratafoundation/strata

  1. we have a stratafoundation token with a wonderful lovely curve
  2. you buy some
  3. meh everyone buys some. they stake some
  4. next, a torn user will visit site, and deposit 1 or 10 or 100 sol
  5. it is literally a transfer into hydra holdingAccount, but they must do it thru the ui
  6. as it generates a Keypair for them in the browser and downloads json
  7. next, they just watch n wait
  8. n wait
  9. now, on a cron the authority
  10. runs an rng (I have closedsource chill)
  11. 33.3% of the users in a given bucket win the prize
  12. the authority checks the value of our strata token vs how much it needs, does quik maths magic, and at that (predetermined/random) time of day it
  13. stakes on behalf of
  14. distributes to these users, permissionlessly
  15. unstakes them
  16. occurs within 1-2 tx
  17. wonderful
  18. removes the lil pubkey from the thinger that tracks em
  19. w o w

The other ppl will certainly distribute on behalf of selves, 2

wonderful

w o w

such torn way better

bout to burn this motherfucker down like I'm Left Ey3

@staccDOTsol
Copy link
Author

I hate markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment