A
๐
DEX
๐
IS
๐
A
๐
CENTRALIZED
๐
PRICE
๐
ORACLE
1. Don't use low liquidity tokens
Any token that has low volume (meaning, it's not traded a lot, & often its market cap is low) can be easily manipulated.
If your protocol relies on a token that can be easily manipulated, you are headed to the @RektHQ front page.
2. Use a decentralized oracle network like @chainlink
There is a reason some of the biggest defi protocols like @AaveAave , @compoundfinance, and @synthetix_io all use Chainlink. This problem that has hacked so many protocols is LITERALLY one of the reasons why Chainlink exists
3. TWAP is scary AF
When using TWAP... You better know wtf you're doing.
TWAPs are subject to pretty easy manipulation, and there is caution after caution of using them, and hack after hack.
4. A DEX is a decentralized exchange NOT a decentralized price oracle.
๐ฑ Scream this from the rooftops ๐ฑ
A DEX is a single point of what the price of an asset is.
If you see ANY code getting price looks something like this.
Get.
Out.
Of.
That.
Protocol.
Please share and retweet this.
Web2 is fucking laughing at how we can't move past the same issue that has been plaguing us for years.
We as a community need to stop letting protocols go live that have these issues. It's unacceptable in 2022.
Auditors, please take notice.
I'm literally like, wtf do we need to do as a community to stop this?
A DEX is a centralized price oracle.
A DEX is a centralized price oracle.
A DEX is a centralized price oracle.
A DEX is a centralized price oracle.
A DEX is a centralized price oracle.
โข โข โข
Missing some Tweet in this thread? You can try to
force a refresh
If you set a goal, focus 90% of your effort on habitualizing the daily routines it takes to accomplish the goal - and track how often those daily habits brought you closer to the goal.
If not, after a specific time frame, alter the daily habit.
Some people spend so much time setting a goal, and telling other people about how amazing g the new they set is, they never do the work to reach it.
1. Set the goal 2. Set the DAILY routines it takes to get there 3. Reflect that those routines are helping.
Donโt tell people your goal.
Every time you tell people your goal, and someone goes โwow, what a great goal!โ - you sap motivation.
That positive praise should be reserved for when you complete your challenge, not before.
Often, you need every ounce of motivation you can get
Sometimes I won't be able to answer all your questions fast enough - and sometimes not at all. I really wish I could.
๐งต It's really a shame when you see stuff like this. Quick thread.
PS. If you find this person, please don't go after them. We all have bad days.
As a community, we have to be collaborative,
resourceful, and above all else kind. Otherwise, we will end up just rebuilding all the bad practices of web2.
Eventually, this person did exactly what they should do - being resourceful and finding the answer another way.
And sometimes, I know all of you are going to face stuff like this.
It happens.
But I encourage you to try to take the high road as often as you can. There are very few circumstances where more action than that will be needed.
1/11
๐พ Let's learn about storage in solidity!
A web3 educational thread ๐งต ๐
๐ Storage is where our state or global variables get stored in our smart contracts. Whenever we create a contract-level variable, in the background, solidity adds it to this "storage" data structure!
3/11
๐งฎ Now when we store a storage variable, in the background, solidity adds our variable to storage, which can be thought of as a sequentially indexed list.
The first variable we name will go in the 0th storage slot.
4/11
๐ซ The data is encoded to its bytes32 form in the storage data structure. So we can store any of our basic types like bool, uint, int, etc.
The second variable we name will go in the 2nd slot.
๐งฑ Top sites to visit to learn web3 and smart contracts!
๐ง๐พโ๐ป FreeCodeCamp
โ Chainlink Docs & Bootcamps
๐ง CryptoZombies
๐ DappUniversity
๐ Eat the Blocks
๐ธ Patrick Collins YT & Medium
โ๏ธ Chainshot
๐ฅพ Consensys Bootcamp
๐จ๐ฟโ๐ฌ Moralis Academy & Site
๐ฉ๐ปโ๐ Ethernaut
๐
๐ useWeb3
๐ SpeedRunEthereum / Austin Griffith
๐ Nader Dabit YT & Blog
๐ท Buildspace
๐ฉโ๐ซ Web3 University
And SO much more, the list keeps growing and growing!
Often times people ask me, "should I do a paid BootCamp if there is so much free material?"
And my answer to that is, it depends. Free content is awesome, but it can be a little tricky to get support sometimes. Paid bootcamps come with some wonderful hand holding.
The rules of the game will sometimes allow you to take corrupt actions without repercussions.
So then you have at least two options:
- Fight to change the rules
- Say โthatโs just how the game is playedโ
As much as possible, choose the first one - otherwise we never move up
I think this is especially true in web3.
There are plenty of chances to say โoh, this is broken, and it fucks over thousands of people - but thatโs their faultโ
We are in an experimental stage still, and things are broken and being fixed.
White hat hackers are a perfect example - they understand that in order for web3 to last, we need to work to fix the faults that exist. If all defi amounts to is hacks of people exploiting each other this whole movement will fade.