While Anchor has been successful in proving market demand for high & stable savings for stablecoins, there are many improvements to be made to its core protocol.
These improvements are best implemented in 2 phases, one short-term, and one long-term.
- Short-term: Mostly code-level edits. Minor enhancements that were brought up by the community. Useful contract interfaces, sturdy price oracle, improved fee collection to ANC, etc.
- Long-term: More complex mechanism enhancements that requires code restructuring. Dynamic Anchor rate, tiered yield based on ANC stake, sharing bAsset yield with borrowers, etc.
For now, this post would only focus on the short-term. Additionally, new collaterals are not listed here as they will be developed on an on-going basis separate from the development below.
The short-term list goes as below. Note that the list is not final; it is to be finalized with community consensus.
1. Attach a flat % fee on UST repays, funneled to yield reserve / directly to ANC buybacks
ANCās value passively increases with continuous AUM growth, but not from increased user activity. A small, flat fee (e.g. 0.1%) could be put in when borrowers repay UST, which can be funnelled to the yield reserve (10% of which goes to buybacks), or directly to ANC buybacks.
With ~50m UST being repaid per day, a 0.1% fee would accumulate ~50,000 UST in daily fees. This leads to a 20% increase in ANC buybacks if supplied to the yield reserve, and a 200% increase if supplied directly to buybacks, leading to more value to ANC token holders.
Routing this fee to the yield reserve may be a better option as this would make the yield reserve more sustainable, allowing the community to increase the % of fees that go to buybacks from the current 10%. Right now this value is not good to be increased as this may put Anchor back in deficit.
However, this feature should be carefully considered as it could discourage borrowings, causing more harm than good.
Edit: maybe the % fee should go to redeemers of aUST? Love to hear how you think
2. New Price Oracle contract
Anchorās existing price oracle is currently centralized. With better solutions such as Chainlink now in the ecosystem, this can now be a rapid target for decentralization.
The new Oracle contract can accept multiple oracle feeds per asset type, further aiding with protocol redundancy & decentralization. Eventually this contract could accept various feeds such as:
- Chainlink
- Band
- Native L1 Terra oracle (i.e. LUNA/UST)
- Contract queries
- bLuna/Luna exchange rate
- Astroportās TWAP oracle
- Data feeds via Wormhole (cross-chain data feeds)
- e.g. bETH/ETH exchange rate
3. Message Interface to withdraw a specified amount of UST
Anchor has no option to withdraw a specific amount of UST from deposits. This is due to two reasons, being:
- aUST exchange rate may update during withdrawal Tx confirmation
- Terra tax applied during UST withdrawal transfer
The ability to withdraw a specified UST amount is useful for reducing confusion in integrations. A new interface that instead uses CW20 transferFrom
should be created in the Market contract, enabling the flow of withdrawing UST to be:
- Pre-calculate the tax amount required for transferring
amount
UST. ā Letās put this astax
- Query the current
a_terra_exchange_rate
- Increase aUST allowance to spend
((amount + tax) / a_terra_exchange_rate)
amount aUST - Issue
Withdraw(amount+tax)
msg to the Market contract, which performs atransferFrom
for((amount + tax) / a_terra_exchange_rate)
aUST - Market contract sends
amount
UST to the withdrawer, withtax
UST spent on tax.
4. Message Interface to repay a different addressās loan
Add a borrower address field to the RepayStable{}
message interface, making it to be RepayStable{borrower: String}
.
This would allow addresses to repay a different addressās loan, something that aids with building yield-farming strategies on Anchor borrows.
5. New governance contract & bANC ā (may spin off as a separate release)
Community participation is key for a protocolās success. The current Anchor governance system has failed to provide a robust framework for smooth, autonomous protocol development, with little-to-no incentives for the community to take part in core development.
The new governance system could instead:
- Give greater power to active community contributors via delegation systems
- Contain emergency voting logic for rapid bug fixes
- Incentivize active voting by giving better staking yield to voters
- Make governance stakes liquid (bANC)
- Support efficient dev bounties via bounty contracts
Would love for a sparked-up discussion & community consensus for the above.
All in all, expecting a tentative ship date (including audits) of Jan/Feb 2022.
Onwards.