[feature] Swapper Clout
Preface
Today, the network has a "delayed outbound" feature. This was implemented after hacks years ago in our early public beta of MCCN. Its intention was to slow roll outbound capital to give the community time to respond to any potential hacks or exploits, stopping funds from leaving the network before they are lost forever.
This, of course, has some drawbacks. It can cause swaps to take up to an hour longer while it wait in outbound purgatory. This creates UX issues for swappers, especially in UIs like Trust Wallet where there isn't much visibility into the state of the swaps.
In addition, delaying outbounds txns for arbs can reduce their efficiency and effectiveness. We saw this happen recently with a large amount of swap volume and arbs had a hard time keeping the pool price synced to the market price.
How does the network maintain the security features of delayed outbounds, while improving the UX to have more immediate and faster swaps? Enter swapper clout
Introduction to Swapper Clout
Clout is established by fees paid (in rune) for swaps/trades. The more fees paid, the higher the clout. Swappers with a high clout have proven themselves to be highly aligned to the project and therefore can reap the rewards by getting faster trade execution. The higher the clout, the less their outbound txns are delayed, even removed in some cases.
Implementation Detail
For each swap, the fees paid (in rune) are divided by 2, and associated with the ingress and outgress addresses. This number only increases. When/if the feature is implemented, devs will do a historical chain analysis and create every address's initial clout score, based on historical trades.
When the outbound delay is calculated, the clout score is subtracted from the outbound value (in rune), causing the delay amount to be reduced (maybe even eliminated). If there is already a scheduled outbound with the same address, the value of the clout applied reduces (or removes) the clout applied to this outbound txn (increasing delay). This is to ensure that clout is collectively applied to all current outbounds, not on a one-by-one basis. This is to ensure that an individual cannot have a clout score of 100 rune, and make infinite zero-delay swaps of 100 rune value simultaneously.
To calculate delay
ov = outbound value
c = clout score
cu = current clout utilization
delay = delaycalc(ov - (c - cu))
Conclusion
This feature rewards power users and arb bots to get a better trading experience, getting potentially near instant trade execution. Specifically, it helps arb bots operate more efficiently and better manage the pool prices.
Since the vast majority of trade volume is from arb bots and power users, their outbound value won't contribute (or at least reduced) to the delay of infrequent organic traders. This means that even a one-time trust wallet trade will have significantly reduced delays, but not someone who is moving a large volume from a random wallet. The result is that the delayed outbound is more targeted or "smart". It focuses on unusual or suspicious trades, and less on ordinary trades.