Skip to content

New Template: Vault Harvester#39

Open
ejacquier wants to merge 4 commits intomainfrom
new-vault-harvester-template
Open

New Template: Vault Harvester#39
ejacquier wants to merge 4 commits intomainfrom
new-vault-harvester-template

Conversation

@ejacquier
Copy link
Contributor

New Template: Vault Harvester

  • Automated DeFi vault harvesting. Same cron → read → check → write pattern as Keeper Bot, but with a yield-based profitability check (shouldHarvest() requires both time interval AND minimum yield threshold).
  • Contract tracks pending yield, total harvested, and harvest count.

@ejacquier ejacquier requested a review from a team as a code owner March 17, 2026 12:49
@github-actions
Copy link

👋 ejacquier, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!


const writeResult = vault.writeReport(runtime, reportData)

if (writeResult.txStatus !== TxStatus.SUCCESS) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could check receiver contract execution status here:

if (
  writeResult.receiverContractExecutionStatus !== undefined &&
  writeResult.receiverContractExecutionStatus !== 0
) {
  throw new Error(`Receiver contract execution failed: status ${writeResult.receiverContractExecutionStatus}`)
}

@@ -0,0 +1,153 @@
# Vault Harvester — CRE Starter Template (TypeScript)
Copy link
Collaborator

@miro-cl miro-cl Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, will do for all templates.

miro-cl
miro-cl previously approved these changes Mar 19, 2026
Copy link
Collaborator

@miro-cl miro-cl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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