AmbireTech / adex-validator

AdEx validator stack reference implementation: sentry, validator worker
https://www.adex.network
GNU Affero General Public License v3.0
8 stars 11 forks source link

Distribute-fees-buyback to be adapted for V5 #350

Open Ivshti opened 3 years ago

Ivshti commented 3 years ago

In V4, earnings were withdrawn automatically through the relayer if over a certain min threshold. In V5, earnings are never withdrawn automatically because they have no expiry - they can be withdrawn at any time.

To adapt it for V5, we should do outpace.withdraw() in the same relayer txn as the Uniswap trade and use the respective total amount. This will be easy since we send the tx through the Identity, which means we can batch multiple calls.

Perhaps it may be easier to implement it via a SC that will be appointed as feeAddr that will claim all it's earnings from OUTPACE and use the total to buy ADX