-
- Flights for miami. Solana HH and Bitcoin 2022 next week.
- Connected all the React.ChangeEvent<HTMLInputElement> and React.FormEvent<HTMLFormElement> properly for controlled components.
- Robinhood offering 7am-8pm ET extended market hours. Stock jumped nearly 25%. Less concentrated liquidity, wider spreads, all the usuals. But still good.
- Axie Infinity hack, ~595m in ether and 25m in usdc.
- Ronin is an eth sidechain specifically made for Axie. It has a bridge for cross-chain transactions, and a DEX (katana) to swap game tokens on ronin.
- They hacked one of the 9 validator nodes (the gas-free axie dao rpc node) on ronin, which with the 4 Sky Mavis nodes (axie company) provided a majority. Then signed withdrawals to drain the assets in the bridge.
- https://etherscan.io/address/0x098b716b8aaf21512996dc57eb0615e2383e2f96
- Took a week to notice, and alert was from a user who couldn’t withdraw.
-
- Can point wireshark (clientside) at your SSLKEYLOGFILE to decrypt HTTPS traffic.
- They really improved the olympus dashboard, adding pages for the treasury, revenue, olympus pro, and proteus.
- JWST image!

- Uber listing nyc cabs starting in a couple months.
- Remember the relay chain (L0) of polkadot vs the parachains (L1s) that are connected on it, all sharing the same validators for consistent security/connectivity.
-
- Built a name service today on polygon (mumbai). Brian Name Service: https://brian-name-service.vercel.app/
- Wrote and deployed all solidity contracts, built/connected/deployed a client.
- Handles multiple wallets, proper network correction, error handling, all the usuals.

- Example transaction: https://mumbai.polygonscan.com/address/0x657132147406E0375E030987cc9d599eCd754637.
- Example on opensea: https://testnets.opensea.io/assets/mumbai/0x6C88E92b8Be2d0B6C10Ff2b1452213D008507eFd/0.
- A name is just an NFT, in practice.
- Remember msg is the transaction. msg.sender, msg.value (amount sent), etc.
- To calculate string length in solidity: https://gist.github.com/AlmostEfficient/669ac250214f30347097a1aeedcdfa12.
- Backend keeps maps of domains to addresses, constructor defines the tld (top level domain), and functions contain some logic for pricing based on domain length.
- And remember abi.encodePacked to convert strings into bytes so that you can combine them, measure length, etc (can’t do directly as strings).
- Remember for the NFT; base64 encode the svg, then encode that svg and the metadata into an nft json (name, description, image, link, etc).
- And for the 100th time: Metamask injects ‘ethereum’ into the window. You pass this to the ethers library to get a provider (node) and signer (wallet), then instantiate your contract (via address + abi) to interact with it.
- Users can come to the react site, connect wallet, mint a new domain (I set prices in the contract, longer=cheaper), then they get an NFT to represent it.
- This money goes to the contract. I added a function to withdraw it (for myself).
- Defined “error” which can be passed to “revert” in repeatable ways instead of “require()” everywhere.
- Added network checks and metamask switch network requests, since polygon/mumbai.
- Called the contract from the frontend to fetch properties (not just call methods like previously). Can grab state, whatever data you want onchain that the contract stores.
- Deployed on vercel. Easy with subdir frontend, even with backend sol contracts and everything in the same (small monorepo). And secrets as env vars.
- Import point on naming systems: anybody can create them. It’s just a smart contract with a dictionary. There could be 100 “.brian” naming systems. The win is critical mass of integration. If wallets support your NS, so that they perform the lookup against YOUR contract, and not the 100 others, you’ve won. This is what the big ones have achieved (ENS, bonfida, unstoppable domains, etc).
- The same question will occur for decentralized ISPs on web3. Where to route URL requests, domain-wise. One name system must prevail.
-
- Lots of work in the @solana/wallet-adapter-* libs as well as @solana/web3.js and @project-serum/anchor.
- Finished ChessDAO.
- ERC-721 is unique NFTs; ERC-1155 is where multiple accounts can hold the same NFT (not copies of an equivalent NFT). This is great for membership NFTs. Just make one, and all holders are members. More gas efficient than giving everyone the same NFT over and over. This is an “Edition” NFT.
- Thirdweb is great.
- Webapp/UI to deploy contracts. Then you just need to write js in your frontend to interact with them. They provide an sdk and react module.
- Many stock contracts available. NFT drops, governance, marketplaces, more.
- Kinda like metaplex too. Deploy your own nft minting contracts and/or apps, like candy machine. Can even do it all from the UI.
- Don’t need auth. It’s just like calling any contract.
- Simply calls like contract.claim, contract.balanceOf, more. Admin can make similar calls to configure the contract and more.
- Upgraded everything from thirdweb v1 to v2 (js libs and dashboard UI).
- https://testnets.opensea.io/collection/chessdao-edition-drop. Shows stuff like this:

- Created an edition drop, where users can come mint their membership NFT. The contract was deployed with thirdweb. Then the react app just calls it. Very easy.
- Then, based on membership, they can either vote+participate, or choose to join. Standard login fork, but based on NFT holdings, deployed without writing any solidity.
- Created the governance token, CHESS. Added to metamask.
- Minted to myself. Just a standard ERC20. https://rinkeby.etherscan.io/token/0x7F21dC43270EC39c49E0500146309090E15412ea.
- Then airdropped to a few of my other wallets. Did random numbers, but remember this can be any formula that you want.
- Remember locally (for my test scripts) auth is provided by copying my wallet’s private key and a node to communicate with the blockchain is provided via alchemy url. In the webapp, auth is provided by the injected metamask wallet and a node to comm with the blockchain is provided by metamask (which just calls alchemy too, iirc).
- Switched from the js-sdk primitives to the thirdweb react hooks, abstracts a few lines per call (in the app, not the test scripts, of course). These hooks inject the provider and signer and everything, no need to manually manage with thirdweb-dev/sdk.
- Created the vote contract, setting quorum to 0 (just for sandboxing). 6171 blocks (14 seconds apiece) is ~24hr for each proposal to close.
- Delegated and transferred 90% of CHESS to the treasury, the account of the voting contract. Gave it minting rights as well.
- https://rinkeby.etherscan.io/address/0xF1D4a7A6A9F4Cc20e9aCa5Ff61d5f3A1Be3d641C.
- Can allow users to vote via thirdweb UI, or via js-sdk in your app.
- Remove the mint role from your initial creator account. There should be no admin; only the treasury can mint more tokens (and only under certain/deterministic/prespecified conditions).
- Created brave community post to debug missing reward.
- Info found at brave://rewards-internals/
- Removed community topic and submitted ticket through their help center.
- Forge is another equityzen: https://forgeglobal.com/.
- Tokemak.
- Claimed TOKE (remember you have to pay gas for this) rewards from my DAI deposit a couple cycles ago.
- And then you have to stake the TOKE (more gas). This takes ~15min before you can vote (direct liquidity). And of course, you have to pay gas (just once though) to give access to your wallet’s TOKE.
- Then you can finally direct liquidity. This voting transaction is on polygon.
-
- Claimed my olympus bonds (have grown nearly 10% already in sOHM since bonds are autostaked).
- Ramp is at 8.1b val.
- Optimism is based in nyc; they just got 150m in their a16z-led series b.
- Finished the solana gifs dapp.
- If ProgramResult not found in scope, import with “use anchor_lang::solana_program::entrypoint::ProgramResult;”
- Remember SystemProgram (accessible in your rust programs, as well as from @project-serum/anchor web3) is a native solana program: https://docs.solana.com/developing/runtime-facilities/programs#system-program. This creates new accounts, links to programs, stores data on accounts, etc.
- I believe this is the src for system program: https://github.com/solana-labs/solana/blob/73e6038986d6fff6efced6378cfcd57cb34c220c/runtime/src/system_instruction_processor.rs

- Wrote a new dapp on solana for escrow.
- https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/#trying-out-the-program-understanding-alice-s-transaction.
- Tons of notes. All in gdoc.
- Installed the rust vscode extension in remote wsl ubuntu for proper syntax highlighting and compile errors.
- Remember that solana programs are compiled using LLVM (low level virtual machine) compiler infra. This contains a variation of the BPF (berkeley packet filter). The output of compilation is an ELF (executable and linkable format).
- Programs written in rust and c/c++ can target this.
- Overall solana_program crate: https://docs.rs/solana-program/latest/solana_program/
- PDAs are random bytes that are NOT on the ed25519 elliptic curve.
- Started the DAO build.
- Will finish the sandbox soon, then convert the supercontest.
- Remember DAOs are just voters with a shared treasury, a shared governance token. Voting regimes can be as custom as desired. It can be 1:1 proportional to tokens held, it can be fixed 1 for every holder, it can be custom. You can set the threshold for passing to be 51% votes, 100%, whatever.
- Built this one with thirdweb, which provides a lot out of the box. https://thirdweb.com/.
- Wallet support. Hardware, mobile, injected (extension), etc. Automatic connectWallet functions. Provider. Address. A lot.
- Ready-made contracts (https://github.com/thirdweb-dev/contracts) and a clientside sdk to interact with them.
- Web interface: https://thirdweb.com/dashboard.
- Thirdweb v1 is now legacy, and v2 is out.
- Tried to RDP to my windows desktop via remmina; forgot that you must have windows pro or enterprise (not windows home edition). This is true for both windows 10 and 11.
-
-
- 450m series D at 7B valuation for consensys.
- Aptos 200m led by a16z.
- Goki allows you to send transactions by holding an NFT (or other fungible tokens): https://github.com/GokiProtocol/goki. So you can essentially transfer ownership in your multisig cleanly, or many other use cases. Has a rust and js sdk.
- Full day hacker house again. Worked, saw Jordan (!), networked, couple talks/panels.
- Kyomi demo. AR with NFTs.
- Web3auth.
- IDL = interface description language.
- Added rust vscode extension.
- Wrote another full solana dapp.
- Solana (1.8.17) / anchor (0.22.1) / rust (1.59.0) / react (17.0.2) / phantom.
- Spun up a local node (solana-test-validator), deployed the program to it, then locally hosted cra to interact.
- First counter, then storing messages onchain.
- Remember “anchor test” spins up its own solana node, so if you already have one running on localhost (for other purposes, including testing), just reuse it to avoid conflict “anchor test –skip-local-validator”.
- Beanstalk, CREDIT-based stablecoin.
- https://beanmerchant.substack.com/p/updated-beanstalk-faq-?s=r.
- https://twitter.com/bean_merchant
- $BEAN
- Good legal overview for founders: https://handbook.clerky.com/.
- Again, create-react-app updated to webpack 5, which doesn’t polyfill a lot of stuff (including web3). Downgrade react-scripts to 4.0.3 to avoid them. Here is a good set of dep versions that are compatible:
- “@solana/wallet-adapter-base”: “^0.7.1”,
- “@solana/wallet-adapter-react”: “^0.13.1”,
- “@solana/wallet-adapter-react-ui”: “^0.6.1”,
- “@solana/wallet-adapter-wallets”: “^0.11.3”,
- “@solana/web3.js”: “^1.31.0”,
- “react-scripts”: “4.0.3”,
- Moralis appears to be an aggregate dev framework: https://admin.moralis.io/servers.
- Created an account to play with it.
- Frameworks for creating dapps, both frontends and backends. Supports eth, polygon, sol, bsc. So all dapps are compatible (automatically) across those chains.
- Basically create a server (on whatever network you want), get the ID of that server, and then add like 2 lines pointed at it in your app’s js. Then you have the Moralis object (like the ethers object, or the solana provider object). And then you can connect to the user’s metamask, query their transaction history, subscribe to new transactions on this account, etc.
- You can also define cloud functions, stored on moralis servers, that you can then call from your dapps.
- Example: https://bmahlstedt.gitlab.io/moralis-demo/
- Tokemak cycle rollover, 203 -> 204.
- Remember that if you deposit an asset into a pool, it becomes “earned” at the start of the next cycle, and then becomes “available” (to vote) at the start of the NEXT cycle.
- Cycle rollover occurs on wednesdays at noon ET (1pm during DST). So if you deposit an asset into a pool on a thursday, it’s nearly 2 weeks before you get the TOKE return.
- And yes, you can’t just stake TOKE; you have to vote.
- Figment tutorials: https://github.com/figment-networks/learn-web3-dapp. Did the solana one, but they offer a ton more chains.
- Created an account for datahub: https://datahub.figment.io/apps.
- Pretty cool tutorials. Fairly short. They’re open ended; asking you a task and linking to docs for you to create code yourself, rather than direct copy-paste.
- instructions = SystemProgram.transfer()
- signers array, each just an object of pubKey and secretKey.
- Then sendAndConfirmTransaction(connection, transaction, signers).
- “commitment” is what state fidelity you want when querying, eg processed or confirmed or finalized.
- Pyth has clients for rust, js, python, and go: https://docs.pyth.network/consumers/client-libraries.