eliza icon indicating copy to clipboard operation
eliza copied to clipboard

feat: plugin Solana web3.js V2 & automated LPing on Orca

Open calintje opened this issue 11 months ago • 0 comments

Background

What does this PR do?

  1. Adds plugin-solana-v2, leveraging the latest features of @solana/web3.js v2
  • This plugin can be used alongside existing plugins that use @solana/web3.js v1.
  • Other protocols can use this plugin to integrate their functionality, if their tooling leverages @solana/web3.js v2
  • The pluting-tee uses Keypair from @solana/web3.js v1, while v2 uses CryptoKeyPair from the web api. To account for this, I added some utils that add TEE functionality for solana-plugin-v2 as well (tested locally).
  1. Adds autonomous LP repositioning capabilities on Orca
  • Automatically repositions liquidity positions if the center price of the position deviates from the current pool price by more than a user-specified threshold (repositionThresholdBps).
  • Maintains the original width of the position during repositioning.

What kind of change is this?

Features (non-breaking change which adds functionality)

Why are we doing this? Any context or related work?

Future proof Eliza for new projects that build on top of the new Solana SDK.

Documentation changes needed?

My changes do not require a change to the project documentation. I added a README to the plugin.

Testing

I'm currently still testing the stability of the repositioning functionality. The behavior of the agent is at times unpredictable. I would like one of the core devs to give me guidance on the following:

  • explain in detail the inner workings of provider-evaluator loop,
  • explain what information each of the components needs,
  • how all three components interact with state and memory
  • how to control the timing of the loop to control the amount of API/RPC calls,

Where should a reviewer start?

TBA

Detailed testing steps

TBA

Discord username

@calintje

calintje avatar Jan 10 '25 21:01 calintje