AUM0 v4: the bounty is a price now
A rebalance is a purchase. So the fee for it should be a price, not a tip.
Until now AUM0 paid a fixed bounty to whichever worker showed up first. That
worker had every reason to route your trade through the pool that paid it the
most, because the pay was the same either way and the difference came out of
your wallet, not its own.
The bid edition prices the bounty. Every leg is measured against the official
feed at the moment it settles, and whatever the wallet lost on the fill is
subtracted from the worker's pay, dollar for dollar. A worker who takes a
percent of your trade for itself has already been paid by you, so there is
nothing left to collect.
And a worker no longer has to use a pool at all. It can be the counterparty:
hand the stock over out of its own inventory, at its own price, and take the
cash. The same wall checks that fill as every other one. Whichever route
delivered the better price keeps the money.
What that is worth, on the live chain
Ten thousand dollars into ASML, which sits in a thin pool on a one percent
fee tier:
through the pool wallet receives 5.6689 ASML worker keeps $0.00
from a maker wallet receives 5.8479 ASML worker keeps $99.99
The wallet gets 3.16 percent more stock, and the worker who delivered it is
paid in full instead of nothing. Both numbers moved the same direction at the
same time, which is the whole point: the only way for a worker to earn is to
give the wallet a better price than anyone else offered.
Nothing here is special cased for makers. On a rebalance where the pool
happened to price better than the feed, the routing worker kept the entire
bounty, checked by the same code.
Unchanged
Your stocks never leave your wallet. The contract holds nothing before a
trade and nothing after one.
Drift must strictly decrease or the whole rebalance reverts.
There is no destination parameter. The output goes to the owner because
there is nowhere else it can go.
Zero management fee. Zero performance fee.
Live
Bid edition 0xb0C34AC5e846e0159f711Db84802D512E916A51F
Chain Hood Chain (id 4663)
Assets USDG plus twenty six, stocks through treasuries
Web https://aumzero.com
Twelve tests on the mechanism, three of them against the live chain and its
real feeds.