Skip to content

Functions

DISCLAIMER // NFA // DYOR

This analysis is based on observations of the contract behavior. We are not smart contract security experts. This document aims to explain what the contract appears to do based on the code. It should not be considered a comprehensive security audit or financial advice. Always verify critical information independently and consult with blockchain security professionals for important decisions.

⊙ generated by robots | curated by humans

METADATA
Contract Address 0x00D19609...6d7f8E (etherscan)
Network Ethereum Mainnet
Analysis Date 2026-11-27

Function Selectors

SELECTOR FUNCTION SIGNATURE CATEGORY
0xf0f469ff create(address,uint32,string,(address,uint96,string,string)[],bytes32) User
0x0e787cce predict(bytes32) View
0x5c60da1b implementation() View

The runtime dispatcher matches these three selectors and reverts with empty data on anything else, including calls with fewer than four bytes of Calldata and plain ETH transfers.


Summary

CATEGORY COUNT
Total Functions 3
User Functions 1
Admin Functions 0
View Functions 2

The constructor is not counted. It runs once, at deployment, and deploys the implementation with CREATE2 at salt 0 (see the implementation() code). Because the factory is the implementation's deployer, the implementation's immutable factory is the factory's address. Every clone runs the implementation's bytecode, so every clone reads the same factory value and accepts init only from this factory.


User Functions

Function: create(address owner_, uint32 delay_, string description_, Beneficiary[] table_, bytes32 salt)

Deploys a Distribution clone at the address predict(salt) returns and initialises it with the given owner, delay, description and beneficiary table. Returns the clone's address. Any ETH attached becomes the clone's opening balance.

ATTRIBUTE VALUE
Selector 0xf0f469ff
Parameters owner_ (clone owner), delay_ (clone timelock in seconds), description_, table_ (array of {account, bps, name, note}), salt
Access External, payable. Restricted to the caller whose address equals the salt's top 20 bytes
Returns address distribution
Events Created(address indexed distribution, address indexed owner); the clone may emit Received(address(0), balance) from init
FLAG OBSERVATION
☑ The salt prefix check stops anyone except the salt owner from deploying at that salt's address
☑ CREATE2 and init run in one transaction, so no one can initialise the clone before its creator does
△ The clone address does not depend on owner_, delay_, description_ or table_. The salt owner chooses those at call time, whatever was published about the address beforehand
△ A reused salt reverts DeploymentFailed() only after CREATE2 consumes the gas forwarded to it (Low risk)
△ owner_ is not checked, and delay_ accepts any uint32 (Low risk)
◇ The init code is written with inline assembly rather than a library call. The resulting clone runtime on chain matches the PUSH0 minimal-proxy layout byte for byte
CONDITION REQUIREMENT
Salt prefix uint256(salt) >> 96 == uint160(msg.sender)
Address free No code at predict(salt)
Table size 1 to 107 rows (checked in the clone's init)
Table rows Every bps > 0; accounts strictly ascending (checked in init)
Table total Sum of bps equals 10,000 (checked in init)
STEP ACTION
1 Load implementation from bytecode
2 Compare the salt's top 20 bytes with msg.sender; revert SaltDoesNotStartWith() on mismatch
3 Write the 54-byte PUSH0 clone init code to scratch memory
4 CREATE2(msg.value, initCode, salt); revert DeploymentFailed() if it returns zero
5 Restore the overwritten memory word
6 Call init(owner_, delay_, description_, table_) on the clone; a revert there reverts the whole call
7 Emit Created(distribution, owner_) and return the address
VARIABLE CHANGE
Factory storage None — the factory has no storage
Factory nonce +1, as for any successful CREATE2
Clone storage owner, delay, description and the beneficiary table written by init
CONDITION REVERT MESSAGE
Salt's top 20 bytes are not the caller SaltDoesNotStartWith() (0x0c4549ef)
Code already at the target address DeploymentFailed() (0x30116425), after the forwarded gas is consumed
Empty table, more than 107 rows, a zero share, unordered or duplicate accounts, or shares not totalling 10,000 BadTable() (0x40da0647), raised by the clone's init
Malformed Application Binary Interface (ABI) arguments Empty revert
function create(
    address owner_,
    uint32 delay_,
    string calldata description_,
    Distribution.Beneficiary[] calldata table_,
    bytes32 salt
) external payable returns (address distribution) {
    address impl = implementation;
    uint256 prefix = uint256(salt) >> 96;
    if (prefix != uint256(uint160(msg.sender))) revert SaltDoesNotStartWith();

    assembly ("memory-safe") {
        mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3)
        mstore(0x14, impl)
        mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73)
        distribution := create2(callvalue(), 0x0e, 0x36, salt)
        if iszero(distribution) {
            mstore(0x00, 0x30116425) // DeploymentFailed()
            revert(0x1c, 0x04)
        }
        mstore(0x24, 0)
    }
    Distribution(payable(distribution)).init(owner_, delay_, description_, table_);
    emit Created(distribution, owner_);
}
sequenceDiagram
    participant S as Salt owner
    participant F as DistributionFactory
    participant C as New clone
    participant I as Implementation

    S->>F: create(owner, delay, description, table, salt) + ETH
    F->>F: salt >> 96 == msg.sender ?
    F->>C: CREATE2(value, PUSH0 clone init code, salt)
    F->>C: init(owner, delay, description, table)
    C->>I: delegatecall init(...)
    I-->>C: msg.sender == factory, table empty → write state, validate table
    C-->>F: ok (or BadTable → whole tx reverts)
    F-->>S: Created(clone, owner), return clone

View Functions

Function: predict(bytes32 salt)

Returns the address create would deploy to for a given salt, computed as keccak256(0xff ‖ factory ‖ salt ‖ keccak256(initCode)). It does not check the salt prefix, so it answers for any salt whether or not the caller could use it.

ATTRIBUTE VALUE
Selector 0x0e787cce
Parameters salt
Access External, view, anyone
Returns address
FLAG OBSERVATION
☑ Reproduces the standard CREATE2 formula, so the result can be checked independently with cast create2
◇ It does not report whether the address is already occupied. A caller must check the code at the returned address separately
function predict(bytes32 salt) external view returns (address) {
    address impl = implementation;
    bytes32 initCodeHash;
    assembly ("memory-safe") {
        mstore(0x24, 0x5af43d5f5f3e6029573d5ffd5b3d5ff3)
        mstore(0x14, impl)
        mstore(0x00, 0x602d5f8160095f39f35f5f365f5f37365f73)
        initCodeHash := keccak256(0x0e, 0x36)
        mstore(0x24, 0)
    }
    return address(uint160(uint256(keccak256(abi.encodePacked(hex"ff", address(this), salt, initCodeHash)))));
}

Function: implementation()

Returns the Distribution implementation every clone delegates to. The value is an immutable embedded in the factory's runtime bytecode, not a storage slot.

ATTRIBUTE VALUE
Selector 0x5c60da1b
Parameters None
Access External, view, anyone
Returns 0xc4eD7EA2...F8cB0A (etherscan)
address public immutable implementation = address(new Distribution{salt: bytes32(0)}());