-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add rewards
field to top-level appconfig
#1701
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
5ffc4c1
to
efc8686
Compare
efc8686
to
5fc7955
Compare
@@ -624,6 +614,14 @@ export async function getAppConfig({ | |||
tokens.push(sharesTokenConfig); | |||
} | |||
|
|||
if (rewards) { | |||
console.log("rewards", rewards); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extraneous console.log
@@ -624,6 +614,14 @@ export async function getAppConfig({ | |||
tokens.push(sharesTokenConfig); | |||
} | |||
|
|||
if (rewards) { | |||
console.log("rewards", rewards); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray console.log
047f067
to
ec5f558
Compare
Rewards are now a core feature of appconfig, allowing for greater flexibility in assigning rewards. You can now attach rewards to virtually anything, whether it’s a specific hyperdrive position, an entire pool, or any other element—anything can have a reward.
The
rewards
field in appconfig lets you specify a key that maps to a list of reward resolvers. For instance:• A reward for adding liquidity to a pool would use a key like
hyperdrive-lp/0xabc....
• A reward for opening a short position in a pool would use a key like
hyperdrive-short/0xabc....
This approach eliminates the need to store reward details in
HyperdriveConfig
orYieldSourceConfig
. To check if a pool has a reward, simply look up the corresponding key in the rewards object.