Describe the feature
Describe the feature
Description
In the current implementation of the AssetAuthVault contract, a supplier can call final_supply at any time, which may complicate the overall flow of the Lending protocol.
It is necessary to add supply goal logic to the AssetAuthVault contract. This logic requires the SUPPLY_GOAL compilation parameter and the already_supplied value in the Taproot storage of the AssetAuthVault contract itself. It is also necessary to add the is_finalized value to the Taproot storage.
This logic will also simplify the Lending contract, as it will no longer be necessary to pass LENDER_VAULT_COV_HASH and FINALIZED_LENDER_VAULT_COV_HASH (the same applies to the protocol fee parameters). Instead of these parameters, LENDER_VAULT_TAPLEAF_HASH and PROTOCOL_FEE_VAULT_TAPLEAF_HASH will be used, and the script hashes themselves will be calculated within the Lending contract.
Acceptance Criteria:
Describe the feature
Describe the feature
Description
In the current implementation of the
AssetAuthVaultcontract, a supplier can callfinal_supplyat any time, which may complicate the overall flow of the Lending protocol.It is necessary to add supply goal logic to the
AssetAuthVaultcontract. This logic requires theSUPPLY_GOALcompilation parameter and thealready_suppliedvalue in the Taproot storage of the AssetAuthVault contract itself. It is also necessary to add theis_finalizedvalue to the Taproot storage.This logic will also simplify the
Lendingcontract, as it will no longer be necessary to passLENDER_VAULT_COV_HASHandFINALIZED_LENDER_VAULT_COV_HASH(the same applies to the protocol fee parameters). Instead of these parameters, LENDER_VAULT_TAPLEAF_HASH and PROTOCOL_FEE_VAULT_TAPLEAF_HASH will be used, and the script hashes themselves will be calculated within the Lending contract.Acceptance Criteria:
SUPPLY_GOALparameter in theAssetAuthVaultcontractalready_suppliedandis_finalizedstorage in theAssetAuthVaultcontractfinal_supplyflow on theAssetAuthVaultcontract only whenSUPPLY_GOALis reachedLendingcontract