Repository navigation
Description
Summary
DefindexAdapter::deposit asks the DeFindex vault to move funds out of the adapter but never registers the nested token authorization that move consumes, so under real auth the call traps. BlendAdapter::deposit handles the identical call shape with env.authorize_as_current_contract; DefindexAdapter has no equivalent, and the adapter's tests run under mock_all_auths_allowing_non_root_auth, which hides the gap. It only surfaces once DEFINDEX_VAULT_ID is configured.
Tasks
packages/contracts/defindex-adapter/src/lib.rs:175-193callsclient.deposit(&vec![...], &vec![...], &adapter, &true)afterrequire_vault_authbut adds noenv.authorize_as_current_contract(...)entry for the token transfer DeFindex performs from the adapter.packages/contracts/blend-adapter/src/lib.rs:123-133shows the required pattern for this exact class of nested call.packages/contracts/defindex-adapter/src/lib.rs:228-258has the same gap on the withdraw burn path.- Add a positive auth-tree test mirroring
blend-adapter'sdeposit_authorization_tree_matches_the_real_pool_call_shape, run withoutmock_all_auths_allowing_non_root_auth, so the requirement is exercised.
Scope
| Field | Value |
|---|---|
| Area | Contracts |
| Protocol affected | DeFindex |
| Network | testnet and mainnet |
| Breaking change? | No |
Acceptance Criteria
-
depositandwithdrawregister the nested token authorization the DeFindex vault consumes. - A test asserts the authorization tree without mocking all auths.
-
cargo fmt --all,cargo clippy --all-targets -- -D warnings, andcargo test --allpass underpackages/contracts.
Additional Context
Found in a repository-wide code audit on 2026-10-18 and re-verified against the source at 66fad4d. Latent until DEFINDEX_VAULT_ID is set, which is also why no live test catches it.
Star the repo
Please star this repository before picking up this issue. It is a small ask that meaningfully helps the project reach more people.
Activity
MorsH14 commentedon Oct 18, 2026
@MorsH14 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @MorsH14 to this issue.
liutingqiu commentedon Oct 18, 2026
@liutingqiu has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @liutingqiu to this issue.
ibochivincent-lang commentedon Oct 18, 2026
@ibochivincent-lang has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @ibochivincent-lang to this issue.
drips-wave commentedon Oct 18, 2026
Congratulations, @ibochivincent-lang! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @ibochivincent-lang: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
grantfox-oss commentedon Oct 25, 2026
🎉 This issue has been marked as completed on GrantFox!
@ibochivincent-lang's PR #1173 was approved and merged by @collinsezedike.
🏆 @ibochivincent-lang: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (796 total points). Track your full progress on GrantFox.
👏 Great work, @ibochivincent-lang! Keep contributing to drydocs.
drips-wave commentedon Oct 25, 2026
This issue has been completed by @ibochivincent-lang as part of the Stellar Wave Program's 10th Wave 🥳
😎 @ibochivincent-lang: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.