airswap-aips
airswap-aips copied to clipboard
AIP 7: New Token System
Summary
Following recent discussions in the AirSwap community, we introduce an sAST staking token that gives participants the right to vote and to earn protocol fees as a result of their governing the protocol. Participants stake AST to receive non-transferrable sAST at a 1:1 rate.
Voting power is weighted by sAST balance. A new protocol fee mechanism is introduced into AirSwap, with fees generated by the protocol pooled to be claimed by participants proportional to their sAST balance by an output function and only claimable after demonstrated governance activity.
Specification
Staking Contract
A new smart contract with token staking and unstaking functionality. https://github.com/airswap/airswap-protocols/blob/master/source/locker/contracts/Locker.sol
- Staked tokens are non-transferrable.
- Participants stake AST at a 1:1 rate.
- Participants may unstake 10% every 7 days.
Pool Contract
A new smart contract that that holds tokens for withdrawal by participants. https://github.com/airswap/airswap-protocols/blob/master/source/pool/contracts/Pool.sol
- Protocol fees are taken in a variety of tokens, so there is a variety of tokens in the pool.
- To withdraw, participants indicate which token they would like to claim.
- Withdrawal amounts are calculated based on a pricing curve.
Assessing Fees
We propose no changes to the Swap protocol. Instead, MetaMask Swaps will collect the AirSwap fees assessed on AirSwap trades and transfer them directly to the pool contract.
Calling Votes
Voting is run off-chain at https://vote.airswap.io/ using a tool called Snapshot.
- Participant voting power is weighted by staked token balance.
- At the completion of each vote, claims are enabled for that vote.
Earning Fees
Participants earn protocol fees from the pool contract by participating in governance.
- Participants must perform a vote to earn points.
- Points can be accumulated and do not expire.
- With points as input, the pool uses a function to determine output. Source
Note: Point values are multiplied by 10**4 to account for decimal places of AST.
(POINTS * BALANCE / (10**SCALE + POINTS)) * (MAX / 100)
Scale is initially set to 9
and max to 50
. Example output is as follows.
Points | Percentage |
---|---|
1K | 0.5% |
10K | 4.55% |
100K | 25% |
1M | 45.45% |
10M | 49.5% |
For example, a participant that has earned (through one or more votes) 10K points and can claim 4.55% of any one of the pooled tokens. After the initial voting cycle on February 12th, the community may discuss these parameters in terms of expectations and reality. Parameters may be changed by community vote.
Rationale
- Governance is of utmost importance and we believe that this proposal creates strong incentives for token holders to participate on an ongoing basis.
- Fees are assessed in a variety of tokens and therefore each participant will have a variety of tokens to claim. The AST+ contract may include a convenience function to convert tokens into ETH prior to transferring to the participant.
- Liquidity rewards as specified in AIP 3 could be distributed as AST+.
- This proposal aims to build on AIP 4 and AIP 6.
Copyright
Copyright and related rights waived via CC0.
My company is the rank 1 Airswap liquidity provider by volume and the rank 2 Airswap trader (rank 1 is the aggregator Metamask). We are strongly opposed for a number of reasons. For each reason we propose alternatives.
Summary: We (and, we suspect, all other LPs) would not be able to provide liquidity competitively in many markets if the fee exceeds 0.03%, and we would likely stop providing liquidity altogether if the fee exceeded 0.15%. We would have strong incentives to work with aggregators to supplant the official Airswap protocol to circumvent such a fee. Other systemic issues reflect this proposal's rushed nature.
Against flat taxes on Volume
LPs have alternatives
The alternative to providing Airswap liquidity is providing it on Curve or Uniswap. As with all other investments, there is opportunity cost, because the same liquidity could be deployed in yearn or an AMM. But the distribution of our capital changes according to where we are making the most.
Airswap LPs have obligations not required of AMM LPs
Airswap LPs have to serve a jsonrpc server that services 8-100 requests per second. This server has to be tightly integrated with Ethereum and other services. Deploying and maintaining it requires engineering resources. Running a server in the cloud can cost hundreds to thousands of dollars per month. Whereas AMMs just work and I don't have to do anything.
Flat taxes on LPs have deadweight loss
The taker fee would be a significant hindrance to the cometitiveness of Airswap on aggregators, which represent over 95% of our Airswap volume. Aggregators compare Airswap quotes to AMMs and CLOBs and take the best deal. Top AMMs Curve and Uniswap have fees of 4 and 30 bps respectively. If our maker fee is larger than that, we get no volume from those aggregators.
So, your protocol fee is a tax on LPs. The tax can be very large depending on the market. If we're competing with Curve and the protocol fee is 2 bps, it's a >50% tax on us, because we cannot charge more than 2bps. If it's 4bps, we cannot compete for those markets on Airswap. But because Airswap doesn't know our maker fee (and can't, really), it has to guess, and in doing so, it will blunder and export a significant portion of volume, if not all of it, to AMMs, and the LPs would follow the volume. Less volume obligates larger margins, and so it would be difficult to lure in any replacements.
Financial companies are taxed on profits and not volume. This is because their margins are small, and they make their money in volume.
Less volume, less ROI, less liquidity
If Airswap taxes itself out of competitiveness, volume will drop (by potentially more than 99%), and this would eliminate any remaining Airswap LPs.
You cannot incentivize your way out of this
Because LPs are paying the tax, you cannot bribe them with their own money, even if you obfuscate it with poniznomics like liquidity mining. Even if LPs got 100% of the "taker fee", after waiting and paying gas, they'd be behind. Without volume, the only people mining AST would be trying to sell it.
Alternative: Build an AMM
AMMs know their cut and can take from it accordingly.
Alternative: Per-market cuts voted on by stakers
Since maker cuts vary per market, I know how I would vote. It could be a weighed average. This adaptability could give us competitiveness with Curve and Uniswap, and any future AMMs. The adaptability would not be as good as my current adaptability because there would be a necessary revision.
Mandatory voting
Vote griefing
Mandatory voting is a gas obligation, but if you can burn someone else's stake by creating a great number of elections, you should.
Negligent voting
Mandatory voting is plagued with issues in countries that implement it, mostly because the voters who are affected are ambivalent about the result. They may cut corners on research or vote in favor of "joke" proposals that may be dangerous.
Alternative: mandatory participation
It seems a major goal may be to keep them active if they are staked for a long time, so that rewards aren't distributed to lost private keys or the zero-address. Instead of requiring that a staker vote in every election, you could just require they vote once per year. You could then have a penalty that gets harsher over time, and a process for immunizing smart contracts that aren't expected to vote.
Stake should be less-binding and fully transferrable
Incentive to split stake into smaller parts
Since the amount you can pull is the max of 100 or 10%, you should break your stake up among many accounts so you can pull it all out at once. Of course there are gas considerations, but for some this will be the way. You don't want to incentivize sybil; it would weaken your voting UI.
No reason to lock
The only reason it seems to be locked rn is so you can burn inactive tokens. You can do that without locking.
Composability
The inability to transfer stake is a major hindrance to its composability. Protocols like Yearn and Compound would not be able to stake as a strategy. Such protocols usually vote as a block, and there is considerable transparency to this process.
No migration
The hindrance for pull out would hinder any future migrations. Stakers would be stuck on the old contract.
Alternative: scheduled unstaking
There could be a 1-month delay on any unstaking, but after that you could withdraw your whole balance. Then there is no incentive to practice sybil.
Gas
SLOAD
Even if the fee is zero, it still has to be loaded.
fee transfer
With current gas prices, the fee transfer alone would increase the gas cost of an airswap trade by ~40%. This can in many cases exceed the fee value.
Alternative: Hold fees in the swap validator
Fees can be pulled on-demand by stakers, so the user would not have to pay for the fee transfer.
Alternative: Hold fees in the swap validator
Fees can be pulled on-demand by stakers, so the user would not have to pay for the fee transfer.
@dmosites has pointed out on discord that 3 transfers are still needed. This approach still reduces gas for those 3 if eip 2929 or similar happens, but not by as much as if the third transfer could have been avoided.
Thanks for this feedback @wjmelements several valid points and good ideas. Design and implementation are in active discussion where these are being considered and integrated. The specification will be continuously updated as it evolves.
The core proposal to add a protocol fee and enable active governance participants to claim those fees has been called to vote and is running for 72 hours starting now.