As of 2023, only 13% of founding teams include at least one woman, while only 3% consist of only one female (source: Forbes, Sep 13, 2023) ๐ณ
Which means - WE NEED MORE WOMEN IN WEB3!!!
If you're intimidated, disgusted, repulsed by the "bro culture" in #web3 or if you just simply seek some female support on your journey - join the #StarbuckBuilders to find a community to network, get advice or support, and feel included. DM @0xTrashPirate to get access to our private Telegram group!
When you feel outnumbered, you just need to find people that empower you to swim against the stream ๐ฅ
L-EARN!๐ง: What major change with arithmetic operations happened with Solidity 0.8.0?
Drop your answer and @base address below๐
Best answer will receive 100 $EARN!
Hint: ask ChatGPT ๐
LIKE, REPOST, AND FOLLOW!
@buyholdearn
Drop your #SOL#SOLANA wallet address!
LIKE, REPOST, and FOLLOW!
DCA and accumulate $EARN!
New ATH incoming! ๐
CA: 8CuPzHKuZQUyYbear8fi3u6iuTY652WVZT2cHZ2yeNbE
TG: https://t.co/aoysn2Pg8p
@PancakeSwap#ETH#AVAX#SOL#BASE#BNB @RaydiumProtocol
๐Congratulations! The total transactions on #TRON exceeded 8.9 billion.
#TRON now has over 271M total accounts and 8.9B total transactions. #TRONSCAN
Very close to being the last chance to get yourself an $EARN bag if you haven't yet.
This is a unique opportunity. IYKYK.
You've been warned.
0x0b61c4f33bcdef83359ab97673cb5961c6435f4e
@Uniswap@PancakeSwap @RaydiumProtocol
How are #EVM smart contracts and #Solana Runtime programs different?
Actually, quite a bit. Of course, #EVM contracts are written in Solidity and #Solana programs in Rust. But there is more to it:
๐๐ฐ๐ฏ๐ต๐ณ๐ข๐ค๐ต ๐๐ฏ๐ต๐ฆ๐ณ๐ข๐ค๐ต๐ช๐ฐ๐ฏ:
The EVM allows to invoke multiple functions of a contract by specifying a function selector. For example, we can call `mint()` or `transfer()` of a specific contract. However, each Solana program has only a single known "entrypoint" function. This entrypoint is the programโs main function that executes whenever the program is called and handles all operations by interpreting the instruction data.
๐๐ณ๐ฐ๐จ๐ณ๐ข๐ฎ ๐๐ต๐ณ๐ถ๐ค๐ต๐ถ๐ณ๐ฆ:
Solidityโs multi-function structure allows developers to split logic into dedicated functions. Each function can have modifiers, visibility restrictions, and distinct signatures, which simplify contract structure and readability. Solana programs however, require all possible instructions to be packed into one centralized processing function. This means that developers need to include extra logic in the program to handle different instruction types. But it also reduces overhead allowing instructions to be processed in a streamlined manner for low latency and high throughput.
๐๐ฏ๐ต๐ฆ๐ณ๐ฐ๐ฑ๐ฆ๐ณ๐ข๐ฃ๐ช๐ญ๐ช๐ต๐บ ๐ฃ๐ฆ๐ต๐ธ๐ฆ๐ฆ๐ฏ ๐ค๐ฐ๐ฏ๐ต๐ณ๐ข๐ค๐ต๐ด:
In Solidity, contracts can make internal calls to other functions within the same contract or even call external contracts. Solana lacks this ability, as it cannot make re-entrant calls or call other programs directly without specifying them as part of the transaction. Because all accounts required by a program must be provided upfront, Solana allows for more predictable access patterns and avoids issues like re-entrancy attacks.
๐๐ต๐ข๐ต๐ฆ ๐๐ข๐ฏ๐ข๐จ๐ฆ๐ฎ๐ฆ๐ฏ๐ต:
Solidity contracts directly manage state, which provides flexibility but increases complexity in securing and managing access to sensitive data. Solanaโs program model separates state from the program itself, storing it in individual accounts. This reduces the attack surface on the program and ensures that the program code is immutable once deployed, lowering the risk of certain types of attacks.
๐๐ต๐ฐ๐ณ๐ข๐จ๐ฆ:
EVM-based contracts typically maintain storage internally, making storage management less flexible and more costly over time, especially for contracts with large or dynamic state requirements. In Solana, instead of embedding all data within the program, users can manage storage more flexibly and cost-effectively in separate accounts. This design enables a separation of the program (code) and data (state) but also requires precise storage optimization and account management.
It is quite interesting how the two blockchain architectures were designed with different objectives in mind - ease of development and high efficiency and throughput. It will be interesting to see how both blockchains will evolve over time!
Do you need an audit of your smart contract?
As a developer you get this question a lot from people you work with. And obviously you are obliged to say yes. In general, unaudited code should not be deployed on the mainnet even if you "trust" the developer. Even the best and most trustworthy people might miss something that could put your users and your project at risk.
But as a project founder, you might consider a more nuanced answer to this question. It's true that unaudited code is generally bad but an audit also needs to make sense from the a business perspective.
Does it make sense to pay several thousand dollars to get your smart contract audited that at most might have a TVL of $500? Probably not. But if your protocol might have a TVL of a few thousands or millions (even in theory - because you never know... ), an audit might be absolutely needed.
So, the question is not only if an audit is technically needed but also if it is a good business decision. The most important thing at the end is, what is the outcome for the end user. Can the project reimburse them if they loose their funds? If not, get an audit...or several! ๐
Contracts for Stylus 0.1.0 is production ready๐
Stylus lets you write smart contracts for @arbitrum in Rust, offering faster execution and lower gas fees thanks to WASM's efficiency.
Check out the highlights of this release โฌ๏ธ
Use TWAP, not the token ratio of a liquidity pool! โ๏ธ
For some applications you might need the token price from a @Uniswap V3 pool. To get the token price you could simply use the ratio of the token amounts in the pool. However, that allows for short term price manipulation in your application, especially if the liquidity pool is small.
To circumvent that, you can use the so called time-weighted average price (TWAP) which is simply the average price over a certain time period. UniswapV3 pools have this conveniently built in.
@0xTrashPirate started to put together a little library to calculate the ETH or the USD price of a specific pool ๐
https://t.co/8uMpDzA9P3
Feel free to use it, give feedback, submit a pull request - and while you're at it give @0xTrashPirate a โญ on her repo ๐
Mistakes are your best teacher! ๐ง
"I recently tried to compile the latest @OpenZeppelin contracts library with Foundry but used the wrong #EVM version. It gave me compiling errors due to a new Opcode that was introduced with #Solidity 0.8.24 and the Cancun upgrade - TLOAD and TSTORE.
The transient storage opcodes TSTORE and TLOAD, as defined in EIP-1153, provide a new data location in the EVM. Transient storage behaves like a key-value store, but resets to zero after each transaction, making it cheaper to use than permanent storage, with a gas cost of 100 for both TSTORE and TLOAD.
As a comparison, regular SSTORE used 20000 gas for setting new and 2900 for updating existing storage while SLOAD uses 2100 gas for cold access and 100 gas for warm access.
Thus, for a simple reentrancy lock using both SSTORE and SLOAD in a function, regular storage might cost over 27000 gas for two storage updates and a load. The same logic using transient storage would cost only 300 gas.
So I learned all that from setting the wrong EVM version - mistakes are your best teacher!"
- by @0xTrashPirate
Mistakes are your best teacher! ๐ง
"I recently tried to compile the latest @OpenZeppelin contracts library with Foundry but used the wrong #EVM version. It gave me compiling errors due to a new Opcode that was introduced with #Solidity 0.8.24 and the Cancun upgrade - TLOAD and TSTORE.
The transient storage opcodes TSTORE and TLOAD, as defined in EIP-1153, provide a new data location in the EVM. Transient storage behaves like a key-value store, but resets to zero after each transaction, making it cheaper to use than permanent storage, with a gas cost of 100 for both TSTORE and TLOAD.
As a comparison, regular SSTORE used 20000 gas for setting new and 2900 for updating existing storage while SLOAD uses 2100 gas for cold access and 100 gas for warm access.
Thus, for a simple reentrancy lock using both SSTORE and SLOAD in a function, regular storage might cost over 27000 gas for two storage updates and a load. The same logic using transient storage would cost only 300 gas.
So I learned all that from setting the wrong EVM version - mistakes are your best teacher!"
- by @0xTrashPirate
@rarible The #EarnNFTBot just integrated the #TRON network. Looking for a easy to use and currently completely free NFT notification bot for your TG group?
This ๐
https://t.co/DLQtejKVFt