Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise MaxAppTotalTxnReferences (currently 8, extremely limiting) #3956

Closed
MetaB0y opened this issue May 6, 2022 · 1 comment
Closed

Raise MaxAppTotalTxnReferences (currently 8, extremely limiting) #3956

MetaB0y opened this issue May 6, 2022 · 1 comment
Labels
new-feature-request Feature request that needs triage Team Scytale

Comments

@MetaB0y
Copy link

MetaB0y commented May 6, 2022

Problem

I am trying to build composable DeFi on Algorand.

Currently, there are 2 things that make it next to impossible.

  1. Transaction can have at most 8 references total. There are 3 types of references: other apps, accounts, and assets.
  2. Each app has a specific account associated with it, so it takes 2 references: app and account. I think Smart contracts should be given access to accounts for apps specified in the foreign apps array #3723 is about this issue.

Why is it so limiting?

Suppose I want to build the simplest possible DEX aggregator which will use only 2 DEXes. There will be 3 applications (aggregator, DEX1, DEX2) that will take 3*2=6 resources. And 4 assets (asset A, asset B, LP token 1, LP token 2). It will be 10 in total, more than it is currently possible.

Even if the issue (2) will be fixed, it is still easy to exhaust available resources. My aggregator would take "only" 7 resources. But what if I want e.g. to aggregate 3 DEXes? It will be impossible.

Solution

To make it possible to build "normal" EVM chains like DeFi ecosystem, it is paramount to raise MaxAppTotalTxnReferences to at least 32 together with fixing the issue (2) and raising MaxAppTxnForeignApps and MaxAppTxnForeignAssets to at least 16.

I have no idea how complicated this is, but the natural first step would be to increase MaxAppTxnForeignApps to 16 which will be far from perfect, but much better than the current state. I believe most DeFi applications will be able to work under such conditions (given that issue (2) is fixed).

Urgency

I am building a pretty simple app and already being severely blocked by this problem, I think that a lot of people will stumble upon it in the next few months.

@MetaB0y MetaB0y added the new-feature-request Feature request that needs triage label May 6, 2022
@algoanne
Copy link
Contributor

Hi, we are taking a different approach to solving this problem - we will allow the references to be shared across the transaction group. See #4391 for this upcoming work.

@algoanne algoanne closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature-request Feature request that needs triage Team Scytale
Projects
None yet
Development

No branches or pull requests

2 participants