Skip to content

Instantly share code, notes, and snippets.

@jmjatlanta
Last active April 20, 2020 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmjatlanta/45b1431f97cb2a7339bb85c65c407eac to your computer and use it in GitHub Desktop.
Save jmjatlanta/45b1431f97cb2a7339bb85c65c407eac to your computer and use it in GitHub Desktop.
A possible solution for accumulated fees (BSIP 74 and 87)

Accumulated Fees and BSIP74/87 Fees for margin calls and forced settlement should be deposited in a fee object of the asset object, later to be claimed by someone with authority to claim them (normally the asset issuer). An implementation issue is that the current asset_dynamic_data_object::accumulated_fees is always denominated in the asset itself. Fees for margin calls and forced settlement is collected in the collateral asset, not the debt asset. Therefore, the amount can not be added to accumulated_fees. To remedy this situation, it is proposed that an additional field be added to the asset_dynamic_data_object for the storage of margin call/forced settlement fees. It will always be denominated in the collateral asset. Such a change will require:

  • API calls to claim the balance
  • additional checks that the balance is 0 before permitting the collateral asset to be changed.

TBD: Will adding to asset_dynamic_data_object cause protocol serialization problems (no extensions field)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment