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

getRUN contract, bootstrap integration (WIP) #4731

Closed
wants to merge 96 commits into from
Closed

getRUN contract, bootstrap integration (WIP) #4731

wants to merge 96 commits into from

Conversation

dckc
Copy link
Member

@dckc dckc commented Mar 3, 2022

goal: closes: #3788

Description

mostly asking the ci robots for review at this point

Security Considerations

IOU

Documentation Considerations

the usual for our contracts, at least

Testing Considerations

IOU, but see #3788 for some

dckc added 30 commits March 3, 2022 14:27
 - test: first steps toward borrowing RUN against BLD
 - test: prepare real attestation
 - docs: types for FP utilities
 - feat: terms are controlled by governance
 - fix: prevent forged attestation
   - test: forging an attestion should fail
 - replace getInvitation with makeLoanInvitation
   patterned after vault.js
   - HIGH_FEE, LONG_EXP
   - return uiNotifier, invitationMakers, vault
   - factor out makeLineOfCreditKit
     - add close OfferHandler
     - track debtAmount, vaultState
     - keep attestation in vaultSeat
   - stub adjustBalances
 - factor out makeCreditPolicy
 - document close()
 - refactor: push more down into startAttestation

test(runLoC): run tests from spreadsheet

 - ava tests have to be created synchronously, so
   turn the CSV data into a string constant
 - fix parsing of empty leading fields in CSV
 - add types to CSV parsing

test(runLoC): test close

  10 tests passed
  15 tests skipped

hush some logging
  10 tests passed
  15 tests skipped

 - adjust offer need not have want: Attestation
 - provide limited runMint access to makeLineOfCreditKit (WIP)
 - provide type for notifier (RunLoCUIState)
 - factor out creditPolicy.checkBorrow()
 - refactor test bootstrap
   - each part installs its own bundles
   - bootstrapAttestation caller provides bld brand, issuer, reporter
     - one reporter for many accounts / balances
     - add the reporter in bootstrap
     - factor out home.attMaker
   - bootstrapRunLoC caller provides timer
 - add testAdjust
  12 tests passed
  13 tests skipped

 - clarify close() offer handler a bit
 - test: clarify todo filter
 - never mind attenuating runMint
 - never mind burnSeat

feat(getRUN): vault-compatible naming

 - match invitationMakers labels
 - disregard address; attMaker handles it

test(getRUN): refactor stake reporter as mockBridge

feat(getRUN): only RUN balance can be adjusted, for now

 - clean up test logging a bit
 - style: organize imports

test(getRUN): misc refactor / clean-up

 - move contractRoots near imports;
   move test.before() bundle loading up
   - subordinate collection utilities in Collect
   - factor out theBundles type handling
 - move contract start types near usage
   - break lines in long type annotations
 - mockBridge: rename uBrand (underlying?) to stakingBrand

feat(getRUN): align types with vaults

 - makeLineOfCreditKit: move creditPolicy check inside
   in order to make documentation / design simpler.
   - document connection between debtAmount and minted RUN
   - use return value from creditPolicy.checkBorrow
     to clarify adjustBalances (up)
   - burn before updating debtAmount
   - never mind zeroRun
 - factor BaseUIState out of UIState;
   liened -> locked
   - vaultState doesn't seem to be part of UIState, so
     reduce it to a boolean
     - never mind assertVaultIsOpen; didn't carry its weight
   - makeAdjustBalancesInvitation on vault wasn't exposed; skip it
 - document CreditTerms
 - annotate types for minAmt()
 - extract from test-runLoC.js
 - declare StakingAuthority type
caller provides installations rather than bundles
 - committee caller reserves addresses
 - send poserInvitation to econ committee "chair"
provide to bootstrap as vatParameters.argv.economicCommitteeAddresses
dckc added 27 commits March 3, 2022 14:27
WIP: edit logging tweak in vats

 - format brands, amounts, ratios in error messages
 - test-getRUN: reuse startGetRun from econ-behaviors
 - startGetRun:
   - provide creatorFacet
   - add config for price, ratio
   - consume lienBridge rather than bridgeManager
Using lienBridge isn't something normal clients can do.
client should get it from attMaker
without earlier test harness
@dckc dckc changed the title getRUN contract (WIP) getRUN contract, bootstrap integration (WIP) Mar 6, 2022
@dckc dckc closed this Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RUNstake: borrow RUN against staked BLD
1 participant