Skip to main content

SC Implementation

Plenny is made of open-source software and a set of smart contracts written in Solidity. This programming language is designed for developing smart contracts that run on the Ethereum Virtual Machine (EVM).

Plenny provides smart contracts for empowering Lightning Nodes to extend their connectivity to other nodes, offer decentralized lightning services, and expand the capacity of payment channels on the Lightning Network through the Ethereum ecosystem.

The smart contracts of the Dapp and the DON are deployed on Arbitrum One (Ethereum L2).

Plenny consists of 26 smart contracts in total. The following 16 are the most important to understand

  1. PlennyContractRegistry: Contract address registry for all Plenny-related contract addresses.
  2. PlennyDistribution: Contains the logic for the initial token generation and distribution and uses an upgradable beacon pattern for managing the upgradability of the PlennyERC20 token.
  3. PlennyERC20: PlennyERC20 representation on Ethereum Mainnet L1.
  4. PlennyArbERC20: PlennyERC20 token on Arbitrum Optimistic Rollups (ORU). Representation of the PlennyERC20 token on L2 mapped to L1 token.
  5. PlennyCoordinator: Coordinator contract between the Bitcoin Lightning Network and the Ethereum blockchain. Coordination and storing of payment channel data. Allows users to provide info about their Lightning Nodes and channels and manages the specific Baseline Reward and the general Channel Rewards (i.e. NCCR-mechanism).
  6. PlennyDappFactory: Contract for storing information and parameters about Lightning Oracle Validators, calculates the oracle score, locking of Royalties and Channel Rewards, manages channel fees collected by the Dapp, and contains the PoS-Multiplier and Reputation Multiplier.
  7. PlennyOracleValidator: Runs channel validations (for opening and closing) and contains the logic for reaching consensus among the Lightning Oracle validators (a.k.a. “LORCA”) participating in the Decentralized Oracle Network (DON). This smart contract uses data from the Plenny DLSP module. In this role, Lightning Oracles compute transaction data off-chain and transmit it to the smart contract.
  8. PlennyValidatorElection: Contains the logic for the election cycle and the process of electing validators based on Proof of Stake (PoS) and transfers the Election Trigger User Rewards (ETUR).
  9. PlennyOcean: Manages the capacity market. This smart contract refers to the non-custodial Peer-to-Peer marketplace for payment channels to license liquidity of Lightning Nodes (i.e. inbound capacity). PlennyOcean uses data from the DLSP module, enabling Lightning Nodes to obtain the information that contains the payment channel data.
  10. PlennyLockingPoSLT (named PlennyStaking in. BETA release): Manages locking of oracle validator thresholds for Proof-of-Stake (PoS) and down payments by Liquidity Takers in the capacity market.
  11. PlennyLiqStaking (named Plenny LiqMining in BETA release): This liquidity staking contract allows LPs (a.k.a. “Plenny Whalers”) to stake LPtoken (i.e. SLP-PL2) from the liquidity mining contract on the Sushi V2 DEX using Arbitrum One (Ethereum L2) for “Fish Farming” on the Dapp and earn periodic rewards (i.e. PL2).
  12. PlennyRePLENishment: This contract collects all the fees, mints new tokens for inflation, manages the replenishment of the treasury, distributes the reward for the trigger user (RTUR), and performs automatic burning and buybacks via the Treasury HODL and over the liquidity contract on the Sushi V2 DEX using Arbitrum One (Ethereum L2).
  13. PlennyTreasury: Stores Plenny reserved for rewards (i.e. LN Channel Rewards and LOC Channel Rewards) via the Treasury HODL given within the capacity market and for oracle validations (OVR).
  14. PlennyReward: Stores token rewards reserved in the Reward HODL to reward staking of PL2 via DAO Governance and to reward staking of LP-token via the liquidity staking contract on the Dapp.
  15. PlennyStakeGovDelV (named PlennyLocking in BETA release): Manages staking for governance and the delegation of voting rights.
  16. PlennyDao: Governs Plenny via voting on community proposals.

In addition, Plenny uses several interface contracts that have no functionality implemented. Plenny also uses libraries with functions that can call smart contracts. Moreover, storage contracts are also used.