🎛️تنظیمات پروتکل

🖌 چشم انداز طراحی

ما پارامترهای زیادی را در Alpaca Finance طراحی کرده ایم که قابل تنظیم است. در حالی که پیکربندی های اولیه توسط تیم اصلی توسعه دهندگان تنظیم شده است، ما قصد داریم که به جامعه حاکمیتی اجازه دهیم در مورد آنچه باید از طریق رای گیری تغییر کند، تصمیم بگیرند.

​⏳ Timelock

قفل ساعتی یا Timelock یک قرارداد برای تأخیر در تغییرات پروتکل است. این قرارداد مالک کلیه قراردادهای اصلی در Alpaca Finance است. بنابراین ، هر تغییری باید از طریق این قرارداد اجرا شود، که باعث می شود به عنوان یک خندق امنیتی عمل کند.

در اصل، هر سفارش از طرف ادمین (گروه توسعه دهندگان اصلی) باید از طریق این قرارداد بگذرد و قبل از اعمال 24 ساعت به تأخیر می افتد. به طور خاص ، دستور اجرا برای سفارش به صف می رود و منتظر است تا با تاخیر 24 ساعته اجرا شود. این یک ویژگی امنیتی است که جامعه را قادر می سازد تا به روزرسانی های بعدی را ببیند و از قبل برای آنها آماده شود. اگر چیزی مشکوک به نظر برسد، می توانند قبل از اعمال به روزرسانی، وجوه خود را از پروتکل خارج کنند.

در زیر قراردادهای متعلق به Timelock آمده است:

1- کلیه قراردادهای vault(خزانه رمزنگاری شده)

2- قرارداد راه اندازی عادلانه((FairLaunch

3- کلیه قراردادهای کاری

4- کلیه قراردادهای PriceOracle

5- کلیه قراردادهای تنظیم کار (WorkerConfig)

​⚙ پارامترهای قابل تنظیم

در این این بخش همه پارامترها و عملکردهای قابل تنظیم در Alpaca Finance لیست شده است.

FairLaunch Contract

  • addPool(_allocatedPoint, _stakeToken, _withUpdate)

    • _allocatedPoint = How many points assign to this pool. This will affect the ALPACAs distribution per block.

    • _stakeToken = The address of a required staking token.

    • _withUpdate = A flag for updatePool calculation

  • setPool(_pid, _allocatedPoint, _withUpdate)

    • _pid = Pool ID that you wish to adjust the point

    • _allocatedPoint = New points to be assign to this pool. This will affect the ALPACAs distribution per block.

    • _withUpdate = A flag for updatePool calculation

  • setBonus(_bonusMultiplier, _bonusEndBlock, _bonusLockUpBps)

    • _bonusMultiplier = Multiplier that will be applied during the bonus period

    • _bonusEndBlock = The block number that bonus will be ended

    • _bonusLockUpBps = % of bonus that is earned in the bonus period to be locked

Vault Contract

  • updateConfig(_newConfig)

    • _newConfig = A new contract that is implemented IVaultConfig interface

  • setFairLaunchPoolId(_pid)

    • _pid = Pool ID on Fair Contract that the staking token is debtToken owned by Vault

  • withdrawReserve(_to, _amount)

    • _to = The address to receive amount

    • _amount = The amount to be withdrawn from the reserve

  • redeuceReserve(_amount)

    • _amount = Reduce reserve portion for treasury management

PancakeswapWorker Contract

  • setReinvestBountyBps(_newBountyBps)

    • _newBountyBps = A new bounty that the bounty hunter will get when they trigger reinvest

  • setStrategyOk(_strategyAddresses, _ok)

    • _strategyAddresses = Addresses for the strategy contract

    • _ok = Can be either true or false. If the _strategyAddresses above need to be disabled then set _ok = false

  • setCriticalStrategies(_addStrategy, _liquidateStrategy)

    • _addStrategy = Set default addStrategy

    • _liquidateStrategy = Set default liquidateStrategy

SimplePriceOracle Contract

  • setFeeder(_address)

    • _address = The address of a new feeder

SimpleVaultConfig

  • setParams(_minDebtSize, _interestRate, _reservePoolBps, _killBps, _wrappedNative, _fairLaunch)

    • _minDebtSize = The minimum required for borrower to loan from the pool

    • _interestRate = Interest rate per second

    • _reservePoolBps = % to be put in reserve pool in BPS

    • _killBps = % that bounty hunters will get when they liquidate the position

    • _wrappedNative = Address of the wNative token

    • _fairLaunch = Address of the fair launch contract

  • setWorker(_workerAddress, _isWorker, _acceptDebt, _workFactor, _killFactor)

    • _workerAddress = The address of the worker

    • _isWorker = The flag to set if this is worker

    • _acceptDebt = The flag to set if this worker is accepting the debt

    • _workFactor = The flag threshold to prevent user from over leverage

    • _killFactor = The flag threshold to mark if position can be liquidated, aka liquidation threshold

ConfigurableInterestVaultConfig

  • setParams(_minDebtSize, _reservePoolBps, _killBps, _interestModelAddress, _wrappedNative, _fairLaunch)

    • _minDebtSize = The minimum required for borrower to loan from the pool

    • _reservePoolBps = % to be put in reserve pool in BPS

    • _killBps = % that bounty hunters will get when they liquidate the position

    • _interestModelAddress = Address of the interest model

    • _wrappedNative = Address of the wNative token

    • _fairLaunch = Address of the fair launch contract

PancakeswapWorkerConfig

  • setOracle(_newOracleAddress)

    • _newOracleAddress = The new oracle address

  • setConfigs([ ]_WorkerAddress, [ ]_configs)

    • [ ]_WorkerAddress = address of worker

    • [ ]_configs = Config object including:

      • _acceptDebt

      • _workFactor = The flag threshold to prevent user from over leverage

      • _killFactor = The flag threshold to mark if position can be liquidated, aka liquidation threshold

      • _maxPriceDif

Last updated