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.exampleand name it.env. - Run
pip install -r requirements.txtto 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].pyand place in theintegrationsdirectory. - Your integration must be a class that inherits from
Integrationand implements theget_balanceandget_participantsmethods. - The
get_balancemethod should return the balance of a given user at a given block. - The
get_participantsmethod 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_integrationto see the output. - The
get_balanceandget_participantsmethods 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_participantsand 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.