Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ownafarm.xyz/llms.txt

Use this file to discover all available pages before exploring further.

OwnaFarm’s smart contracts form the trustless backbone that handles all financial transactions.

Contract ecosystem

Contract summary

GoldToken (ERC-20)

Platform currency for all transactions.
PropertyValue
NameOwnaFarm Gold
SymbolGOLD
Decimals18
Initial supply100,000,000

GoldFaucet

Testnet token distribution.
PropertyValue
Claim amount10,000 GOLD
Cooldown24 hours

OwnaFarmNFT (ERC-1155)

Core contract for invoices and investments.
FeatureDescription
Invoice submissionFarmers submit for approval
Investment trackingPer-investor records
Harvest settlementAutomated claims

OwnaFarmVault

Yield reserve management.
FeatureDescription
Yield depositAdmin deposits reserves
WithdrawalOnly by OwnaFarmNFT
EmergencyOwner recovery function

Invoice status flow

StatusCodeCan investCan harvest
Pending0NoNo
Approved1YesNo
Rejected2NoNo
Funded3NoYes (after maturity)
Completed4NoNo

Access control

Roles
Owner (deployer)
  - GoldToken: mint()
  - GoldFaucet: setClaimAmount(), setCooldown()
  - OwnaFarmVault: emergencyWithdraw()

Admin role
  - OwnaFarmNFT: approveInvoice(), rejectInvoice()
  - OwnaFarmVault: depositYield()

Public
  - GoldFaucet: claim()
  - OwnaFarmNFT: submitInvoice(), invest(), harvest()

Yield calculation

Example
Principal = Investment amount
Yield = Principal x (yieldBps / 10000)
Total Return = Principal + Yield

Principal = 1000 GOLD
yieldBps = 1500 (15%)
Yield = 1000 x (1500 / 10000) = 150 GOLD
Total = 1150 GOLD

Development

ItemDetail
FrameworkFoundry
LanguageSolidity ^0.8.24
NetworkMantle Sepolia
Chain ID5003