This repo offers a self service approach to Ethena Sats Campaign integrations.
For your protocol to be included and your users to receive sats, you should submit a PR to this repo. Here some guidelines to follow:
- Make a copy of
.env.example
and name it.env
. - Run
pip install -r requirements.txt
to install the required packages. - Add your integration metadata to
constants/integration_ids.py
. - Make a copy of
integrations/template.py
, naming the file[protocol name].py
and place in theintegrations
directory. - Your integration must be a class that inherits from
Integration
and implements theget_balance
andget_participants
methods. - The
get_balance
method should return the balance of a given user at a given block. - The
get_participants
method should return a list of all users that have interacted with the protocol. - Write some basic tests at the bottom of the file to ensure your integration is working correctly.
- Submit a PR to this repo with your integration and ping the Ethena team in Telegram.
- Integrations must follow this architecture and be written in python.
- Pendle integrations are included as examples of functioning integrations. Run
python -m integrations.pendle_lpt_integration
to see the output. - The
get_balance
andget_participants
methods should be as efficient as possible. - We prefer that on chain RPC calls are used to get information as much as possible due to reliability and trustlessness. For example one could cycle through events for
get_participants
and read from a smart contract forget_balance
. Off chain calls to apis or subgraphs are acceptable if necessary. If usage is not reasonable or the external service is not reliable, users may not receive their sats.