Skip to content

Instantly share code, notes, and snippets.

View maurelian's full-sized avatar
💯

Maurelian maurelian

💯
View GitHub Profile
@maurelian
maurelian / token_checklist.md
Created December 8, 2020 15:24 — forked from shayanb/token_checklist.md
Token Checklist Table
Token Feature Known Vulnerabilities Resources Examples
ERC20 Allowance Double withdrawal (front-running)

Make your Gitcoin Grants go further

Not sure which Gitcoin grants you want to support? We've curated a list of great projects to make it easy for you to decide AND make your donations go even further.

The Hashing it Out podcast, with support from Status.im and ConsenSys Diligence has organized a Staking Cluster, giving us access to a whole bunch of the PAN tokens allocated to this round of Gitcoin Grants. In total the HiO community has 29% of a pool of 1,424,551 PAN tokens (worth ~$50,000). (Learn more in episode 83 with Panvala Founder Niran Babalola)

How it works

When you donate with PAN tokens to any of the grants we've selected, your donation will receiving matching funds from the new Panvala issuance. The current multiplier is over 5x!

pragma solidity ^0.6.0;
contract Test {
uint public immutable something = 20;
constructor() public {
something = block.timestamp;
// TypeError: Immutable state variable already initialized.
// something = block.timestamp;
// ^-------^
@maurelian
maurelian / composability.md
Last active October 20, 2022 16:55
Composability Gotchas

Ethereum Composability Security Guidelines

The following is an informal compendium of ways you can screw up when mixing and matching smart contracts:

ERC20

pragma solidity ^0.5.0;
contract Foo {
ERC20 e20;
ERC20NoReturn e20NoReturn;
constructor() public {
// deploy both tokens
e20 = new ERC20();
@maurelian
maurelian / MinimumViableAgenda.md
Last active March 25, 2020 01:23
Let's make sure we get the most out of this meeting!

To help us get the most from the call, could you please include a point form agenda on the invite:

  • The main topic
  • Objective/desired outcome

Please also include following items if they feel relevant:

  • Context
    • Why now? What is the impetus for this meeting?
  • What information or orther background will help us achieve the outcome?
@maurelian
maurelian / or.md
Created February 10, 2020 16:28
Some optimistic rollups resources I found helpful

Start with these resources

About rust security and auditing

  • Review clippy warnings; most of the time these are benign or irrelevant, but they can help spotting red flags.
  • Build and run all the unit tests, assess the code coverage and keep note of the un(der)tested component.
  • Review the dependencies listed in Cargo.toml and Cargo.lock: Will the latest version be used? (preferable but not always the right choice) Are these established, trustworthy packages? You may use the subcommand cargo-audit (thanks @dues__ for the pointer).
  • Look for unsafe code blocks, and evaluate the risk (can an attacker control the input used in these blocks? etc.)
  • Look for risky uses of unwrap(), which can cause panics, as opposed to pattern-matched error
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:QmfDuJZ7fXN9PQCFEqpGdQuQhw5RePG6zBhmt75BZnpmh5 ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
======= /Users/primary/Projects/Audits/0x-monorepo/contracts/exchange/contracts/src/delegatesToLib.sol:Math =======
EVM assembly:
/* "/Users/primary/Projects/Audits/0x-monorepo/contracts/exchange/contracts/src/delegatesToLib.sol":25:312 library Math {... */
dataSize(sub_0)
dataOffset(sub_0)
/* "--CODEGEN--":132:134 */
0x0b
/* "--CODEGEN--":166:173 */
dup3