🎛️ 프로토콜 구성

🖌️ 디자인 정체성

우리는 Alpaca Finance 프로토콜을 설계할 때 많은 파라미터들을 정해놨습니다. 초기 프로토콜 구성은 코어 개발자 팀에서 정하였지만, 향후 프로토콜 파라미터에 대해서는 거버넌스 커뮤니티의 투표를 통해 만들어 나갈 것입니다.

타임락 (Time Lock)

타임락 (Time Lock)은 프로토콜의 변경이 있을 때 변경될 내용들이 적용되기 까지 시간을 두는 스마트컨트렉트입니다. 알파카파이낸스의 주요 컨트렉트들의 오너이기 때문에, 변경이 되고자 하는 모든 내용들은 이 컨트렉트를 통해서만 적용이 되어 보안장치로서의 역할을 수행합니다.

코어 개발자 그룹인 관리자로부터 내려오는 모든 변경 사항들은 타임락 컨트렉트를 거쳐야 하며, 변경이 반영되기 까지 24시간이 소요되게 됩니다. 변경 주문에 대한 명령은 대기열에 올라가고 24시간이 지나면 반영됩니다. 이러한 장치는 커뮤니티가 향후 업데이트 되는 사항들을 체크 할 수 있게 합니다. 만약 의심스러운 사항이 발견되면 업데이트가 실행 되기 전 예치금을 인출할 수 있습니다.

Below are the contracts owned by Timelock

  • All Vault Contracts

  • FairLaunch Contract

  • All Worker Contracts

  • All PriceOracle Contracts

  • All WorkerConfig Contracts

⚙️ 조정 가능한 지표

본문에서는 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

      • _maxPriceDiff

Last updated