-
Notifications
You must be signed in to change notification settings - Fork 233
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
Reserve contract receives JS metering fees; IST fees distributed to reward pool and reserve #4399
Comments
@warner @michaelfig Need a vBank purse for the Cosmos layer to put fees into. |
@dckc Dan you are the primary on this. LMK if that is problematic. |
The Reserve pool now exists, so this should be unblocked. |
I'm looking at |
We will change the vbank from The reserve pool will get a virtual purse via bootstrap from a closely-held vbank |
Updated to include discussion on vault shortfall mechanics |
Discussed in RUN Protocol engineering meeting last week. Separating out ticket for reserve to cover shortfalls from liquidations: #5299 |
We need to make this as small as possible to handle fees in MN-1. Maybe we don't even need this if we only use Cosmos-level feed. |
@dtribble suggested we get more clarity on what are all the fees collected in the system and where they go. I offered to give it a whirl. @arirubinstein I hope to get your help. |
Survey of fees in the systemSolid lines are implemented; dotted lines are planned. This "JS metering" ticket seems to be about the x/swingset fees. graph LR
x/swingset -->|msg fee pt1| x/distribution
x/swingset -.->|msg fee pt2| Reserve
Vaults -->|mint fee| Collector[Reward Collector]
Liquidation -->|penalty| Reserve
AMM -->|swap fee| Collector
AMM -.->|initial liquidity| Reserve
PSM -->|swap fee| Collector
Boost -->|mint fee| Collector
Collector --> VBANK --> x/distribution --> stakers
Collector -.->|overflow| Reserve
TODO:
Liquidation penalty is #5367 AMM, Vaults, runStake/BoostWhen Inter protocol is started, in agoric-sdk/packages/run-protocol/src/proposals/econ-behaviors.js Lines 534 to 539 in e570a8d
This uses a vat created at bootstrap: (ISSUE: why? why not a contract in the Inter protocol?) agoric-sdk/packages/vats/src/distributeFees.js Lines 42 to 48 in e570a8d
Finally, each of the 3 contracts collects fees, for example, at AMM swap
creator may collect them: agoric-sdk/packages/run-protocol/src/vpool-xyk-amm/multipoolMarketMaker.js Lines 90 to 91 in e570a8d
Swingset message feesagoric-sdk/golang/cosmos/x/swingset/keeper/keeper.go Lines 185 to 189 in e570a8d
agoric-sdk/packages/cosmic-swingset/src/sim-params.js Lines 35 to 40 in e570a8d
TODO:
|
#5377 will add a requirement that AMM creation enforces a minimum initial liquidity. The corresponding liquidity tokens should be sent to the Reserve. |
today's Inter meeting discussion:
|
This ticket covers inflows to the Reserve as well as how the Reserve covers shortfalls from vault liquidations
Inflows to the Reserve should include:
Reward distribution mechanics
The text was updated successfully, but these errors were encountered: