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.
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.
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
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
Returns the Distribution implementation every clone delegates to. The value is an immutable embedded in the factory's runtime bytecode, not a storage slot.