near / nearup

Public scripts to launch NEAR Protocol betanet and testnet node
102 stars 33 forks source link

Restaking service #10

Closed ilblackdragon closed 3 years ago

ilblackdragon commented 4 years ago

Want to start the discussion about need to run restaking service. It has two functions:

We have the binary available - cargo build -p restaked in the nearcore repo.

The caveat is that this service needs to have access to full access key (or user must have contract deployed on their account that allows to issue StakeAction from a function call access key).

Thoughts @ailisp @bowenwang1996 @jimmy3dita how we should approach this?

stefanopepe commented 4 years ago

To be sure I understood correctly:

What we want to discuss is how StakeAction works, e.g.:

  1. pulls tokens from the user account automatically, via access key
  2. pulls tokens from a liquid smart contract, which could work as a separate account where 2 implies that users "purchase" the restaking contract storing some additional tokens into it
bowenwang1996 commented 4 years ago

Smart contract cannot act as a watchdog. We need a separate service (already implemented) to watch the account and also send ping periodically (once an epoch).