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

Lock token and Oracles split #1527

Closed
jingyi2811 opened this issue Jun 6, 2022 · 2 comments · Fixed by #1475
Closed

Lock token and Oracles split #1527

jingyi2811 opened this issue Jun 6, 2022 · 2 comments · Fixed by #1475
Assignees
Labels
kind/feature New feature request needs/area Needs area label(s) needs/triage Waiting for triage to be accepted

Comments

@jingyi2811
Copy link
Contributor

jingyi2811 commented Jun 6, 2022

What would you like to be added:

Add the test units for

  1. v0/locks/token/[loan token number] to lock and unlock several Defichain activities
  2. v0/oracles/splits/[loan token number] to perform oracles split to double the token quantity in several contexts

setGOV variables.

Why is this needed:

DFI loan token needs to have the capability of token split after Amazon decided to split its share from 1 to 20 on 6 June at 9.30 pm Singapore time. Before splitting happened, the following activities are locked and prevented to be executed by the user, which are:-

  • updateToken
  • getFixedIntervalPrice
  • poolSwap
  • futureSwap
  • depositToVault (If loan token is a collateral token)
  • takeLoan
  • withdrawFromVault (If loan token is a collateral token)
  • paybackLoan

(Except for updateToken, all the RPCs abovementioned involve oracle pricing)

The lock is not a generic lock function and will be improved over time. Hence, enabling the lock function does not prevent the following activities that do not involve Oracle pricing to be executed, which are:-

  • placeautionbid
  • withdrawfutureswap
  • updateVault
  • closeVault
  • mintToken

Once the oracle splitting is finished, the lock will be taken away and users can execute all the activities back. Splitting the oracles affects the following Defichain objects, which are:-

  • token
  • pool
  • active and liquidated vault
  • auction
  • futureswap

Oracle splitting should double the quantity, but reduce the price by 2. The doubling activities happened automatically on the Defichain objects abovementioned, however, the new price (which is divided by 2) will be set manually by the price source (Exchange).

@jingyi2811 jingyi2811 added the kind/feature New feature request label Jun 6, 2022
@jingyi2811 jingyi2811 self-assigned this Jun 6, 2022
@jellyfishsdk-bot jellyfishsdk-bot added the needs/triage Waiting for triage to be accepted label Jun 6, 2022
@jellyfishsdk-bot
Copy link
Contributor

@jingyi2811: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details

I am a bot created to help the JellyfishSDK developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@jellyfishsdk-bot jellyfishsdk-bot added the needs/area Needs area label(s) label Jun 6, 2022
@jellyfishsdk-bot
Copy link
Contributor

@jingyi2811: There are no 'area' labels on this issue. Adding an appropriate label will greatly expedite the process for us. You can add as many area as you see fit. If you are unsure what to do you can ignore this!

You can add area labels by leaving a /area comment.

Details

I am a bot created to help the JellyfishSDK developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature request needs/area Needs area label(s) needs/triage Waiting for triage to be accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants