airswap-aips icon indicating copy to clipboard operation
airswap-aips copied to clipboard

AIP 26: Consolidate Fee Token Pools

Open agriimony opened this issue 3 years ago • 1 comments

Summary

  • Current rewards claiming is inefficient because it is spread over 30 token pools.
  • New system enables smaller fee pools to be converted into a single stablecoin rewards pool.
  • Any staker (100+ sAST) can perform a conversion and earn 1% of the converted value.
  • Claims are configurable by setting “slope” and “max” parameters similar to the existing pool.
  • New rewards pool includes slippage protection and AIP 18 functionality.

Specification

The AIP proposes a new “rewards pool” from which participants who earn points through activities like voting and bounties can claim rewards from a single pool. This includes a “fee receiver” that holds multiple “fee pools” prior to being converted and transferred to the rewards pool.

Fee Receiver

A smart contract will be developed to receive protocol fees in a variety of tokens. Each balance of each token that it holds can be converted by calling a function on the contract, which swaps the balance for (stable)coin using an on-chain AMM. Once swapped, the (stable)coin will be transferred to the rewards pool contract.

The Receiver contract should have a consolidate function which takes in a swapFrom token address and performs an on-chain swap of the selected token balance to a chosen swapTo rewards token. The rewards token is then split

  • 1% of the rewards will be sent to the address of the wallet which calls consolidate
  • 99% is sent to Pool contract(s)

The addresses of the Pool contracts should be configurable by the contract owner. This will allow us to easily setup additional Pools in the future (e.g. for funding Dev work etc). The token to be swapped to should also be configurable, allowing us to change the rewards token easily in the future (e.g. if we decide to use AST as the rewards token)

Rewards Pool

A smart contract will be developed to receive a (stable)coin that can be claimed using points. The conversion of points to coins is based on a function with two parameters “slope” (formerly “scale”) and “max” which is the maximum withdrawable amount for each claim.

Because rewards will be in a single token we propose that slope starts at a value of 10 and max starts at a value of 20%. This means that a claim of infinite points will be able to withdraw a maximum of 20% of the rewards pool and 1M points approximately 10%. This will be similar to current claim rates (slope = 10 and max = 100%) when there are 5 equal sized pools to be claimed from.

This should be similar to the current Pool contract. However, an additional function is required for AIP18 which allows rewards to be compounded back as staked AST.

The new Pool contract will require a restake function which performs an on-chain swap of the chosen token amount to AST, and then sends it to the Locker contract using the stakeFor function.

Team and Budget

Implementation and auditing is to be led by the ConsenSys contributing team. For their contributions to this proposal, Lasse, astholder, VladislavW and Jortmoney will share AIP rewards according to the author.

Rationale

  • We currently have 30+ token pools of which only the largest four are being claimed from. There are rewards left on the table, which conversion solves.
  • Conversions are incentivized so we expect them to be often and at smaller sizes. This will ensure that there are not drastic increases to the size of the rewards pool.
  • While the reward asset is not specified, it will be either DAI, USDC, or USDT, to be discussed among coordinators and the community prior to contract deployment. In the future the reward asset can be set by configuration vote.

Copyright

Copyright and related rights waived via CC0.

agriimony avatar Aug 28 '21 03:08 agriimony

9 days later BeDreamin83 Apr 3

Yeah this seems sensible and a good idea. To avoid a huge spike in one pool. I would suggest consolidating all the small pools into the top 4 pools wETH, USDT, USDC, DAI in proportion of their weighting. So for example

Top 4 pools were as follows:

wETH - $23,000 USDT - $22,000 USDC - $21,000 DAI - $18000 Total of top 4 $84,000

Pools over $1000 equals $12,000. The $12,000 is converted as follows:

wETH - 12,000 x 23/84 USDT - 12,000 x 22/84 USDC - 12,000 x 21/84 DAI - 12,000 x 18/84

I’m not sure as to the reasoning behind being able to call it anytime? I thought it would make sense to do this at fixed times say 1 week after a vote for example (this helps reduce fastest finger first). This is for two reasons:

You may get someone call it just before they plan to claim and if others miss this, the pools are inflated briefly and then claimed by the person calling the consolidation

It requires someone with the authority to consolidate the pools to constantly be checking the communication channels in case someone has called for a consolidation

I might be missing the benefit though?


17 days later sephrok Apr 20

What if the smaller coin pools were allowed to be claimed on a different scale than the larger coin pools?

If someone is able to claim 10% of a pool based on their points… perhaps any coin that is equal to or less than the average amount that is claimable from the top 3 or 4 coins (or just top 1 coin?)

EXAMPLE Total Pool = 200,000 User’s Claim Size based on sAST = 10% of a coin

WETH is $40,000 therefor $4000 can be claimed USDT is $38,000 therefor $3800 can be claimed WBTC is $37,000 therefor $3700 can be claimed

Average of top 3 claims = $3833.33

Therefor any coin that has a value of $3833 OR LESS can be claimed at 100% by this user.


greypixel Apr 27

I don’t want to take credit for this as I’m pretty sure the idea came from @astholder originally, but I prefer the idea of buying AST on the open market with these smaller pools.

That AST could then go back to the treasury.

EDIT: we could potentially spin up our own AirSwap maker that serves quotes for [dust] → ETH/StableCoin at a competitive price to do this?


agrimony Apr 28

Would also be possible. But I do think we need to keep a store of stable/ETH in the treasury which is much easier to transact in (e.g. dev payments or otherwise) and less liable to price fluctuations.

Perhaps we could look at periodic AST buybacks if our treasury grows to be quite big in the future? greypixel Apr 28

That works too. It’s either buy & hold AST in treasury now and sell for ETH/stable later, or sell AST for something more widely accepted at the point of using treasury funds for payments.


sephrok Apr 29

I like the idea of buying AST with alts but it should go back into the fee pool not the treasury.


sephrok Apr 29

Infact it should be done steadily / consistently so that there will always be a slow buildup of AST in the fee pool to be claimed !

PRE-POOL EXAMPLE: 5000 USDT 5000 WETH 800 AST 123 ABC (example coins) 43 QST (example coins)

@ every vote any coins with less than X value get converted/swapped to AST and fed back into fee pool.

POST-POOL EXAMPLE: 5000 USDT 5000 WETH 966 AST

Obviously used example coins value as obvious values for sake of argument.

That way people have the option to compound their interest or take profit or whatevs.

The treasury should never hold anything for speculated value imo… other than it’s own currency.


VladislavW Apr 29

Agree with sephrok, if we are not going to just convert smaller pools so we can convert that to AST to let people claim in AST so that there is a big chance they will stake it. All collected fees have to stay in the fee pool, stakers fee are not so huge to replenish treasury at current time, it could be changed in future but not now.


agrimony Apr 29

agreed. fee pools are still quite small so I don’t think we should start up the treasury just yet.

maybe at some point in the future (alongside our web app?) - but we will need that as an eventual goal to self sustain


sephrok May 5

Yea i’d like to see any conversions we do be converted to AST rather than DAI or any other tokens. Seems to be the most “neutral” conversion.

And also could be considered a better investment — investing in ourselves! This is assuming we keep growing the project and it’s value :smiley:


sephrok May 5

Something to keep in mind and likely plan ahead for regarding the fee pool —

Once we start collecting fees off the BSC network it may change the dynamic of the fee pools available.

We may want to have a top 3 (or 5 or whatever) fee pools on ERC20 network and a top 3 (or 5) on the BSC network.

I.e.

Top ERC20 = ETH, Dai, USDT, AST, etc Top BSC = BNB, BUSD, etc, etc, etc

Also something up for discussion… fees are much smaller on the BSC network , how will that effect the BSC fee pools? Maybe we only want to consolidate to 1 or 2 there actually? (Or I could be wrong with how i’m thinking about it here… gas fees may be smaller but perhaps Metamask/Airswap fees remain the same? but in that case they wouldn’t remain competitive with other swapping services)


agrimony May 5

Haha yes, as much as I would love to collect in AST, I think that using a stablecoin would be the most practical approach. Note that the new Pool contract will also be linked to a AST swapping function, which will allow you to collect your claim in sAST!

You are correct about BSC, there is lower gas fees but the metamask/AirSwap fees will likely stay the same. We would most likely do a similar fee pool structure on BSC to mirror that of ERC20. How the lower gas fees might affect our competitiveness is probably discussion for a different forum.


justin May 6

I am a very big fan of using this function to swap, via either an AMM or maybe a Maker, smaller pools for AST.

I fully understand the rationale and practicality of swapping for a stable coin like USDC, as it ensures the reward pools do not loose value. However, as it just so happens, the users who are claiming anything from the pools are already sufficiently committed to AST that they are staking some non-trivial amount of AST. In essence, we are all believers of AST.

Why not, then, create some new, wonderfully beneficial, tokenomics that benefit all sAST holders? If this pool swap function trades for AST, then ALL token holders benefit every time the function is called – as it creates a forcing function for AST price appreciation. Not only would this mean us holders could regularly claim AST from the rewards pools, but our existing stakes would also regularly increase in value.

This is a Win, Win, Win, Win, Win:

Smaller pools are consolidated into a large pool that is worth claiming
AST tokens can be claimed via the reward pools (presently it is rarely worth doing since pool is so small)
Creates a forcing function for price appreciation by creating consistent AST buy pressure on AMMs
AST would be moving from the weak hands that put the AST into the AMMs, and moving to the strong hands of loyal AST stakers who are very likely to convert their new AST into sAST – thus locking up even more AST, decreasing the supply side.
Mechanizes a powerful longterm feedback look for increasing the value of the protocol. As Airswap gets more Volume, there will be more opportunities to swap pools for AST, which increases buy pressure and price appreciation, which steadily puts Airswap on the radar of more users, which creates more Volume, ect…

Swapping to AST benefits all AST holders and the protocol itself on a regular basis. Swapping to stable coins only accomplished #1 above with a little downside protection.

I think we are all in this for the long run, so it only makes sense to put the money where our beliefs are. Swapping to stable coins helps short term reward claimers. Swapping to AST raises the tide for the entire Airswap ecosystem.


VladislavW May 6

Agree but would like to modify a bit: Just let the main 4 (WETH, USDT, USDC, DAI) pools untouchable and add the option to convert all other pools to AST.


sephrok May 6

I am also in agreement with both @justin and @VladislavW that AST should be one of the primary tokens in the fee pool.

agriimony avatar Sep 12 '21 14:09 agriimony