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

Basin on Arbitrum #11910

Merged
merged 6 commits into from
Oct 18, 2024
Merged

Basin on Arbitrum #11910

merged 6 commits into from
Oct 18, 2024

Conversation

soilking
Copy link
Contributor

Updated adapter for Basin protocol to include tvl on Arbitrum. Otherwise, none of the other info/metadata etc is changed.

@llamatester
Copy link

The adapter at projects/basin exports TVL:

arbitrum                  6.85 M
ethereum                  6.08 k

total                    6.85 M 

@llamatester
Copy link

The adapter at projects/basin exports TVL:

ethereum                  6.07 k
arbitrum                  0

total                    6.07 k 

@g1nt0ki
Copy link
Member

g1nt0ki commented Oct 14, 2024

@soilking can you check if my implementation is correct? I manually checked all the wells on arbitrum, maybe the upgraded event pulls unrelated contracts?

@g1nt0ki g1nt0ki self-assigned this Oct 14, 2024
@soilking
Copy link
Contributor Author

The arbitrum wells can be upgradeable, the addresses emitted in the BoreWell event in this case are the underlying implementations. The other logs call I added was to search for which contract (if any) emitted that Upgraded event. If there is such an event, then the pooled tokens are not in the implementation address but rather in the address emitting Upgraded.

@g1nt0ki
Copy link
Member

g1nt0ki commented Oct 14, 2024

The arbitrum wells can be upgradeable, the addresses emitted in the BoreWell event in this case are the underlying implementations. The other logs call I added was to search for which contract (if any) emitted that Upgraded event. If there is such an event, then the pooled tokens are not in the implementation address but rather in the address emitting Upgraded.

do you have an example?

@g1nt0ki
Copy link
Member

g1nt0ki commented Oct 14, 2024

*like a transaction with ungraded event

@soilking
Copy link
Contributor Author

Here is an example: https://arbiscan.io/tx/0xe530c3ced2dd6ff9e7e8a4e8b721150ebd3de3420935d9b06ac557f296bb7532#eventlog

What are you trying to achieve? I believe the original code I submitted was accounting for this properly.

@g1nt0ki
Copy link
Member

g1nt0ki commented Oct 14, 2024

hmm, I see what you are doing, but the issue with that implementation is, as time goes by, there will be more event log calls, in my implementation, it is always against one contract, but in your case, it grows.

It is sort of hidden, but we cache each of these event log result (per target), and if we dont cache, it is too expensive. But my implementation is wrong, is there some other way to get the upgraded contract? the new contract is not verified

@soilking
Copy link
Contributor Author

Unfortunately this is the only way to get it on chain currently. Would it work for you if instead we pulled the list of wells from our subgraph? The upgradeable wells have a hardcoded mapping there until an on chain solution can be developed.

@g1nt0ki
Copy link
Member

g1nt0ki commented Oct 17, 2024

Unfortunately this is the only way to get it on chain currently. Would it work for you if instead we pulled the list of wells from our subgraph? The upgradeable wells have a hardcoded mapping there until an on chain solution can be developed.

yup, this is a good solution

@g1nt0ki
Copy link
Member

g1nt0ki commented Oct 17, 2024

*pulling list of wells from subgraph

@llamatester
Copy link

The adapter at projects/basin exports TVL:

arbitrum                  6.69 M
ethereum                  5.98 k

total                    6.69 M 

@soilking
Copy link
Contributor Author

Great, this is done

@g1nt0ki g1nt0ki merged commit b9be118 into DefiLlama:main Oct 18, 2024
1 check passed
@llamatester
Copy link

The adapter at projects/basin exports TVL:

arbitrum                  6.79 M
ethereum                  6.07 k

total                    6.80 M 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants