Skip to content

Redefine incentives contracts#7

Merged
jkilpatr merged 10 commits intomainfrom
jkilpatr/new-incentives-contract-design
Nov 13, 2025
Merged

Redefine incentives contracts#7
jkilpatr merged 10 commits intomainfrom
jkilpatr/new-incentives-contract-design

Conversation

@jkilpatr
Copy link
Copy Markdown
Collaborator

@jkilpatr jkilpatr commented Nov 1, 2025

This modifies the structure of the incentives contract we have been working with to solve a key problem. Namely the accuracy was either unacceptable or the management of the contract (funding expectations) where intractable.

This has now been resolved with a new delegated claiming model that can be added to the existing althea l1 gassless tx ecosystem. This provides consistent updates that and allows for efficient operation and management in one package.

See the new contract for clear docs on how it works.

@jkilpatr jkilpatr force-pushed the jkilpatr/new-incentives-contract-design branch 2 times, most recently from 2ec9666 to 41a464c Compare November 1, 2025 21:18
This modifies the structure of the incentives contract we have been
working with to solve a key problem. Namely the accuracy was either
unacceptable or the management of the contract (funding expectations)
where intractable.

This has now been resolved with a new delegated claiming model that can
be added to the existing althea l1 gassless tx ecosystem. This provides
consistent updates that and allows for efficient operation and
management in one package.
@jkilpatr jkilpatr force-pushed the jkilpatr/new-incentives-contract-design branch from 41a464c to 7948fa8 Compare November 2, 2025 00:04
jkilpatr and others added 7 commits November 5, 2025 14:23
This new order is harder to mess up (user is separated from reward token
by pool id, resulting in fewer errors with the two addresses and more
closely matches the order of arguments in events for just generally more
consistency.
Makes life easier for the claimer by having a single function and not
having to do any math.
All the functions have been organized into:
1. Common user callable functions
2. Admin callable functions
3. Internal functions
The single function implementation was long and with multiple branching
cases became confusing to reason about. It has been broken into
_createProgramInternal() for new programs and _modifyProgramInternal()
for existing/old programs.
The MassiveRandom test only checked the deviation between ideal rewards
and claimed rewards without the inclusion of auto-claiming bots.

The new MassiveRandomBotClaiming test will simulate imperfect bot
execution and assert that the difference between ideal and claimed
rewards is much lower.

MassiveRandom produces a 30% deviation, while MassiveRandomBotClaiming
produces a less that 5% deviation. The deviation can be tuned by
increasing the share of rewards that go to bots when claiming, because
bots will claim more often.
@jkilpatr jkilpatr closed this Nov 13, 2025
@jkilpatr jkilpatr reopened this Nov 13, 2025
This patch fixes a number of test ordering issues and import issues to
allow parallel operation.

This only reduces runtime from 3 minutes 38 seconds to 1 minute 50
seconds on my machine but these improvements are still significant to
fix intermittent failures due to poor isolation between the tests
previously and a few test filse that simply would not run in isolation
because the imports where incorrect.
@jkilpatr jkilpatr force-pushed the jkilpatr/new-incentives-contract-design branch from 737db6e to e511cd8 Compare November 13, 2025 15:02
@jkilpatr jkilpatr merged commit e511cd8 into main Nov 13, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants