Skip to content
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

Adding RewardsWithdrawn event to TACoApp contract #275

Closed
manumonti opened this issue Jun 13, 2024 · 0 comments · Fixed by #276
Closed

Adding RewardsWithdrawn event to TACoApp contract #275

manumonti opened this issue Jun 13, 2024 · 0 comments · Fixed by #276
Assignees

Comments

@manumonti
Copy link
Member

Interface for Threshold applications includes an event RewardsWithdrawn intended to be emitted with the withdrawRewards is called (if it succeeds).

https://github.com/threshold-network/solidity-contracts/blob/8fcf42c6fcb50bb7730155bd5b99239b7b30382d/contracts/staking/IApplication.sol#L26

But in TACo application this event is not emitted. RewardPaid is emitted instead.

emit RewardPaid(msg.sender, _stakingProvider, beneficiary, value);

So, if we want to fit with this interface, a RewardsWithdrawn event should be emitted.

Considering that IApplication's RewardsWithdrawn has two parameters and TACoApplication's RewardPaid has four parameters, I see two feasible solutions:

  1. withdrawRewards function in TACoApplication contract emits the IApplication's RewardsWithdrawn event in addition to the currently emitted RewardPaid event.

  2. Modify IApplication's RewardsWithdrawn event so the parameters are the same as RewardPaid (sender | stakingProvider | beneficiary | reward instead of stakingProvider | reward). This solution is probably less realistic since this will need to update deployed contracts like tBTC and RandomBeacon:

https://github.com/keep-network/keep-core/blob/7b46b2179e525e848ced5fe67445c109da8f3dfb/solidity/ecdsa/contracts/WalletRegistry.sol#L364

Related issue: threshold-network/solidity-contracts#156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant