REME, LUKI, CAP → REME conversion & swap bridge contracts (Solana + EVM)
This repo contains the on-chain logic for the ReMeLife token ecosystem:
- $REME – Primary utility/governance token (fixed supply).
- $LUKI – Solana SPL utility token powering the LUKi AI engagement layer.
- CAP → REME Converter – Off-chain oracle + on-chain mint logic for Care Action Points.
- Swap Bridge – Trust-minimised bridge to swap $LUKI ↔ $REME (SPL ⇄ ERC20).
- Treasury / Vesting / Airdrop contracts.
- Access control & upgradability scaffolding.
This code is public for transparency & external audits.
- Solana: Anchor framework (SPL tokens, PDA state).
- EVM: Foundry (forge) or Hardhat (solc 0.8.x), OpenZeppelin libs.
- Bridge Relayer: Off-chain Rust/TS relayer posting signed proofs.
- Testing:
- Solana: Anchor tests (Mocha/TS).
- EVM: Foundry (forge test), or Hardhat + Waffle/Chai.
- Static Analysis: Slither, MythX/ConsenSys Diligence (optional).
- CI: GitHub Actions (lint, build, test).
remelife-smart-contracts/
├── README.md
├── LICENSE
├── solana/ # SPL side
│ ├── programs/
│ │ ├── luki_token/ # $LUKI mint/authority logic
│ │ ├── cap_converter/ # CAP -> REME proof verifier (if on Solana)
│ │ └── bridge_listener/ # Bridge verification program
│ ├── Anchor.toml
│ ├── Cargo.toml
│ ├── tests/
│ └── scripts/
├── evm/ # ERC20 side
│ ├── src/
│ │ ├── REME.sol # ERC20 REME token
│ │ ├── Bridge.sol # Bridge vault & proof verify
│ │ ├── Vesting.sol # Linear vesting/lockup
│ │ └── Treasury.sol # DAO treasury hooks
│ ├── script/ # deployment scripts (Foundry)
│ ├── test/ # forge tests
│ ├── foundry.toml
│ └── lib/ # OpenZeppelin, etc.
├── bridge/
│ ├── relayer/ # Off-chain signer/relayer service
│ ├── schemas/ # attestations / proof formats
│ └── README.md
├── audits/
│ ├── checklist.md
│ └── <future_reports>.pdf
└── .github/
└── workflows/
├── solana_ci.yml
└── evm_ci.yml
# prerequisites: rust + anchor + solana toolchain
cd solana
anchor build
anchor test
Deploy (devnet example):
solana config set --url https://api.devnet.solana.com
anchor deploy
# save program IDs in Anchor.toml & env files
Mint $LUKI locally:
anchor run mint_luki --amount 1_000_000_000
cd evm
forge install
forge build
forge test
Deploy to testnet (Sepolia):
export RPC_URL=https://sepolia.infura.io/v3/<id>
export PRIVATE_KEY=0xabc... # dev key
forge script script/DeployREME.s.sol --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
-
Lock & Mint model:
- User sends $LUKI to Solana bridge program → emits event.
- Relayer signs proof → submits to EVM Bridge.sol → mints wrapped $LUKI (or swaps to $REME).
-
Reverse direction:
- Burn on EVM side → submit proof to Solana program → unlock native $LUKI.
-
Security:
- Multi-sig on relayer keys.
- Rate limits & pause switches.
- Future: light-client / zk-proof based validation (phase 2/3).
See bridge/relayer/README.md
for implementation details.
- CAP is off-chain point tracked by backend.
- Daily conversion batch signed by oracle key; on-chain contract mints REME accordingly.
- Signature scheme: EIP-712 (EVM) / ed25519 (Solana).
- Anti-sybil: daily caps per wallet, backend KYC/eligibility signals.
- Unit tests: 100% branch coverage for core token & bridge logic.
- Property tests: fuzz with Foundry (
forge fuzz
). - Static Analysis:
- Solana:
cargo audit
, Anchor lints. - EVM:
slither .
, Mythril.
- Solana:
- External Audit: mandatory before mainnet.
- Bug bounty: TBD, announce post-launch.
- Finalize token metadata (name, symbol, decimals)
- Set multisig owners & threshold
- Activate pause/guardians
- Publish program/contract addresses in
DEPLOYMENTS.md
- Freeze mint authority if required (post initial distribution)
- Verify contracts on Etherscan / Solscan metadata
- Solana:
Anchor.toml
+.env
for keypairs. - EVM:
.env
withRPC_URL
,PRIVATE_KEY
,ETHERSCAN_API_KEY
. - Bridge relayer:
.env
for both chains’ RPC + signer keys.
- ZK-bridge or Wormhole integration for trust minimisation
- On-chain CAP attestation (if cost-effective)
- DAO-controlled parameter changes (fees, limits)
- Cross-chain governance module
This repo is open for review & community audits, but PR write access is limited to core devs.
- Fork & PR with clear description.
- Include tests and gas report diffs.
- Follow coding standards (Solidity style guide, Anchor best practices).
MIT License – to maximise auditability & reuse of generic components.
Add via GitHub’s “Choose a license template” or paste MIT text into LICENSE
.
Transparent contracts. Secure bridges. Real utility.