Skip to content

Add EVM redeem failure recovery to claimRedeem#217

Open
loic1 wants to merge 5 commits intomainfrom
loic/pkm-460-add-evm-redeem-failure-recovery-to-claimredeem
Open

Add EVM redeem failure recovery to claimRedeem#217
loic1 wants to merge 5 commits intomainfrom
loic/pkm-460-add-evm-redeem-failure-recovery-to-claimredeem

Conversation

@loic1
Copy link
Collaborator

@loic1 loic1 commented Mar 16, 2026

Changes:

  • Make claimRedeem permissionless with a timelock guard (intended to address comment). When EVM redeem reverts, shares are recovered back to the user in AutoBalancer
  • Add claim outcome tracking for backend confirmation

Follow-up to #210

Description


For contributor use:

  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the standards mentioned here.
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@loic1 loic1 marked this pull request as ready for review March 16, 2026 19:39
@loic1 loic1 requested a review from a team as a code owner March 16, 2026 19:39
Comment on lines +1118 to +1129
if assetsReceived == nil || assetsReceived! == 0 {
self._recoverSharesToAutoBalancer(yieldVaultID: yieldVaultID, info: info)
handler.setClaimOutcome(yieldVaultID: yieldVaultID, outcome: "failed")
emit RedeemRecovered(
yieldVaultID: yieldVaultID,
userAddress: info.userFlowAddress,
vaultEVMAddressHex: info.vaultEVMAddress.toString()
)
handler.removePendingRedeem(id: yieldVaultID)
handler.removeScheduledTx(id: yieldVaultID)
return
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would nice to be able to differentiate between when the assetsReceived == nil and the assetsReceived! == 0 error, right now either error will go into the same code path and emit the same event.

Maybe this could be added to the RedeemRecovered event

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good call, added in fcf47b8 - thanks!

@loic1 loic1 requested a review from sid42 March 16, 2026 21:43
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