-
Notifications
You must be signed in to change notification settings - Fork 16
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
Entrypoint for receiving staking rewards #246
Comments
I think the delegation is transitive; so, I think it should be possible to set the checkers delegation to another contract, which itself has a baker as the delegate and collect the rewards. If my assumptions are correct, we might not need to change our contract(s). |
Thanks for the info, @utdemir, that has also been my working assumption so far. I couldn't find any info on this online, so I went ahead and tested this out. I created three implicit (tz) accounts on a local flextesa sandbox using the faucet:
I registered |
Nice find @dorranh! 👌 The least intrusive way I can see to address this omission is to have a default entrypoint for burrow contracts, that just wires the tez directly to the burrow owner. I am not sure if having an entrypoint with a unit type is a good idea (especially considering #18 (comment)) though. I am also thinking that this whole issue might be shifted elsewhere, if we proceed with #213. |
It looks like |
Deprioritizing this one for now. |
I guess adopting the whitelist of authorized depositors is not trivial, since the tez wrapper's vaults need to be able to receive tez from other vaults as well. Informing all vaults whenever a new vault is created (so that it can be whitelisted) would take linear time so that's not an option. We could instead ask the tez wrapper directly, but that would cost in gas and complications. I am thinking that online views would probably simplify this problem a lot. Either way, deprioritizing this one for now, assuming that users can always come to an agreement with delegates directly. |
While working on the design for #213, I noticed what might be an issue. We currently support delegation of burrow contracts, allowing users to specify a delegate in their call to
create_burrow
orset_delegate
. The delegation works as expected, allowing a Checker user to delegate their collateral. However, I'm not sure that we have a correct way of receiving delegation rewards from a baker. The burrow contract itself (defined here) is restricted to only accept calls from the main Checker contract, and does not support the kind of transaction that tools like tezos-reward-distributor would use to transfer rewards to the delegator burrow. If it did support these kinds of transactions, we would also need to take care that the transactions are recorded in the state somewhere to avoid underestimating the burrow's collateral. Any thoughts?cc @utdemir, @gkaracha
The text was updated successfully, but these errors were encountered: