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

RUN rewards go first to pay off getRUN balance #4244

Closed
dckc opened this issue Jan 4, 2022 · 7 comments
Closed

RUN rewards go first to pay off getRUN balance #4244

dckc opened this issue Jan 4, 2022 · 7 comments
Assignees
Labels
BLD-Boost Issues relating to the BLD Boost contract and UI cosmic-swingset package: cosmic-swingset enhancement New feature or request Inter-protocol Overarching Inter Protocol vaults_triage DO NOT USE

Comments

@dckc
Copy link
Member

dckc commented Jan 4, 2022

What is the Problem Being Solved?

BLD stakers can getRUN to get liquid RUN in exchange for a lien on their BLD.

This is somewhat like a vault, but it doesn't liquidate. Instead, until the balance is paid off, any RUN rewards for the relevant account go to pay down the balance.

This ticket covers the functionality needed to intervene in the RUN rewards stream and pay down user debts.

Note: Current plan is this functionality does not launch with Mainnet 1

Description of the Design

Mainnet 1 Design: N/A; launch with manual payback

Future Design:
After each epoch, when RUN rewards are collected, service iterates over users with outstanding getRUN balances, calculates expected RUN rewards, and reduces balance in lieu of paying out RUN.

Acceptance Criteria

  • All user with no outstanding getRUN balance receives RUN rewards proportional to BLD staked
  • All users with outstanding getRUN balance receives no RUN rewards, but getRUN debt balance is reduced by the amount they should have received based on BLD staked
  • All users with getRUN balances which are paid off in full by the RUN rewards for an epoch show a getRUN debt balance of zero and have received the remainder of their RUN rewards

Security Considerations

Test Plan

cc @rowgraus @dtribble @Chris-Hibbert

@dckc dckc added the enhancement New feature or request label Jan 4, 2022
@dckc dckc added BLD-Boost Issues relating to the BLD Boost contract and UI Inter-protocol Overarching Inter Protocol MN-1 labels Jan 24, 2022
@Tartuffo Tartuffo added the cosmic-swingset package: cosmic-swingset label Jan 26, 2022
@Tartuffo
Copy link
Contributor

Investigate alternative mechanism - a tool to run through everything and pay off debts. @dtribble to find out fro Zaki what is new in the Cosmos space for this. Then Dan can pick it up, but lowest prio for MN-1.

@Tartuffo Tartuffo assigned dckc and unassigned JimLarson Jan 26, 2022
@Tartuffo
Copy link
Contributor

Tartuffo commented Feb 2, 2022

@JimLarson to add a ticket to do the design of doing this in Golang, using the hook Jim put in. They we will decide between implementing this in Go or in JS. Doing it in Go will likely be faster to impl.

@JimLarson
Copy link
Contributor

Wrote a rough design in #4466. It's complicated a little by the need to do some duplicate bookkeeping on the Golang side so it can synchronously know the remaining debt. The golang side could even be the record of truth for the getRUN state. But this interacts with the planned design of the JS level code.

@Tartuffo Tartuffo removed the MN-1 label Feb 7, 2022
@dckc dckc added the restival to be done before RUN Protocol Purple Team festival label Feb 14, 2022
@dckc
Copy link
Member Author

dckc commented Mar 22, 2022 via email

@Tartuffo Tartuffo added this to the Mainnet 1 milestone Mar 23, 2022
@Tartuffo Tartuffo modified the milestones: Mainnet 1, RUN Protocol RC0 Apr 6, 2022
@Tartuffo Tartuffo assigned JimLarson and unassigned dckc Apr 6, 2022
@JimLarson
Copy link
Contributor

Note that RUN rewards for clawback vesting accounts will first segregate the unvested fraction of the reward, then the getRUN (or WYLawayTheHours) repayment is taken out of the vested fraction.

@Tartuffo Tartuffo removed this from the Mainnet 1 milestone Apr 8, 2022
@Tartuffo Tartuffo modified the milestones: RUN Protocol RC0, Mainnet 1 Apr 8, 2022
@dckc
Copy link
Member Author

dckc commented May 9, 2022

@Tartuffo @rowgraus @dtribble @jessysaurusrex thoughts on priority of this for the May 30 target?

@Tartuffo should this be on my radar? It fell off a bit; the issue history shows I was un-assigned by you Apr 6.

@Tartuffo Tartuffo removed this from the Mainnet 1 milestone May 11, 2022
@ivanlei ivanlei removed the restival to be done before RUN Protocol Purple Team festival label Dec 4, 2022
@rowgraus rowgraus added the vaults_triage DO NOT USE label Jan 18, 2023
@aj-agoric
Copy link

Closing as discussed in today's Triage meeting.

@aj-agoric aj-agoric closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLD-Boost Issues relating to the BLD Boost contract and UI cosmic-swingset package: cosmic-swingset enhancement New feature or request Inter-protocol Overarching Inter Protocol vaults_triage DO NOT USE
Projects
None yet
Development

No branches or pull requests

7 participants