0xSplits / splits-contracts

Core smart contracts of 0xSplits
GNU General Public License v3.0
158 stars 34 forks source link

Sorting addresses on-chain #3

Closed dave4506 closed 1 year ago

dave4506 commented 2 years ago

In the docs, there is a note implying that the addresses passed needs to be ordered; is this requirement just a need of making the split deterministic?

If my protocol create splits can ensure the ordered addresses are in a order we understand would it work?

wminshew commented 2 years ago

no -- in the current deployment (v1), they must be sorted from smallest (address) to largest. The canonical ordering allows us to prevent duplicate immutable splits, match the hash & cheaply prevent duplicate recipients on-chain. In a future iteration (deployed in next couple of months?) it's likely we'll relax this requirement