The contract can reallocate over seats, which commits the staged
allocation for each seat. On commit, the staged allocation becomes
the current allocation and the staged allocation is deleted.
The reallocation will only succeed if the reallocation 1) conserves
rights (the amounts specified have the same total value as the
current total amount), and 2) is 'offer-safe' for all parties
involved. All seats that have staged allocations must be included
as arguments to reallocate, or an error is thrown. Additionally,
an error is thrown if any seats included in reallocate do not
have a staged allocation.
The reallocation is partial, meaning that it applies only to the
seats passed in as arguments. By induction, if rights conservation
and offer safety hold before, they will hold after a safe
reallocation, even though we only re-validate for the seats whose
allocations will change. Since rights are conserved for the change,
overall rights will be unchanged, and a reallocation can only
effect offer safety for seats whose allocations change.
Deprecated
Use atomicRearrange instead
The contract can reallocate over seats, which commits the staged allocation for each seat. On commit, the staged allocation becomes the current allocation and the staged allocation is deleted.
The reallocation will only succeed if the reallocation 1) conserves rights (the amounts specified have the same total value as the current total amount), and 2) is 'offer-safe' for all parties involved. All seats that have staged allocations must be included as arguments to
reallocate
, or an error is thrown. Additionally, an error is thrown if any seats included inreallocate
do not have a staged allocation.The reallocation is partial, meaning that it applies only to the seats passed in as arguments. By induction, if rights conservation and offer safety hold before, they will hold after a safe reallocation, even though we only re-validate for the seats whose allocations will change. Since rights are conserved for the change, overall rights will be unchanged, and a reallocation can only effect offer safety for seats whose allocations change.